Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
(cherry picked from commit ad773cc01435e65fa5d8e84758b0642069e96c40)
|
|
get_global_sam_sid()
This avoids use-after-free errors and tdb database churn.
Andrew Bartlett
Change-Id: If7ab2e24556d9dffc7ad22c0489d665dd75a0cab
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
(cherry picked from commit cda32d4e47aa3efb040eb60f1a0332ea8dd58417)
The last 9 patches address bug #10701 - backport dsdb related crash fixes and
build fixes.
|
|
'RW2' smbtorture test fails when -N <numprocs> is set to 2 due to the invalid
status check in the second client.
Signed-off-by: Volker Lendecke <vl@samba.org>
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit bc5bd4010e8fedf19047ed6f7a793cd373f9f14f)
The last 3 patches address bug #8449 (simple use case results in "no talloc
stackframe around, leaking memory" error).
|
|
against talloc_tos() calls
BUG: https://bugzilla.samba.org/show_bug.cgi?id=8449
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr 2 02:36:08 CEST 2014 on sn-devel-104
(cherry picked from commit 014342746f5af1aaaf1c2f8b44098c3a944e4f0a)
|
|
leaking memory
Any code in source3 is permitted to use talloc_tos() at any point, so we must protect all the library interfaces
against memory leaks this way.
Andrew Bartlett
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 8f3a516acb8c95cd6d88bf80abd495ac0cafaae3)
|
|
Signed-off-by: Volker Lendecke <vl@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10699
|
|
Consider:
lock = start=110,size=10
pend_lock = 100, size=10
Should not overlap. However,
(lock->start <= pend_lock->start + pend_lock->size)
110 100 10
is true, so it returns true (overlap).
lock->start <= pend_lock->start + pend_lock->size
should be:
lock->start < pend_lock->start + pend_lock->size
https://bugzilla.samba.org/show_bug.cgi?id=10685
Signed-off-by: Jeremy Allison <jra@samba.org>
|
|
We only print valid share mode entries, stale ones don't count. In
traverse, let the callback decide about staleness.
https://bugzilla.samba.org/show_bug.cgi?id=10680
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 9f2e90754bcb7bf5f7159d07f0bc5fe754e71bf5)
|
|
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 28 20:25:56 CEST 2013 on sn-devel-104
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10688
(missing braces in nfs4_acls.c)
|
|
down.
Previous bug fix reversed the sense of the test for out of memory.
https://bugzilla.samba.org/show_bug.cgi?id=10280
Signed-off-by: Jeremy Allison <jra@samba.org>
|
|
Allow us to start if we bind to *either* :: or 0.0.0.0.
Allows us to cope with systems configured as only IPv4
or only IPv6.
Bug #10653 - Samba won't start on a machine configured with only IPv4.
https://bugzilla.samba.org/show_bug.cgi?id=10653
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
Reviewed-By: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jun 7 01:01:44 CEST 2014 on sn-devel-104
(cherry picked from commit 463311422ca1caad2e228deb630e9d12e212fae1)
|
|
In a ctdb setup, msg_read_got_ctdb did not set channel->pending_req to
NULL. In smbXsrv_session_close_loop in any error condition this leads to
a 100% loop. smbXsrv_session_close_loop continously retries, but because
close_channel->pending_req is != NULL, msg_read_send will always return
EBUSY, making smbXsrv_session_close_loop retry infinitely.
This patch makes sure that msg_read_got_ctdb correctly NULLs out pending_req.
msg_channel.c does not exist in master anymore, so this patch is 4.1 only.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10663
100% smbd cpu loop in ctdb setups
|
|
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10593
PANIC: assert failed at ../source3/smbd/open.c(1582): ret
|
|
samba: tag release samba-4.1.9
|
|
Bug 10654 - Segmentation fault in smbd_marshall_dir_entry()'s SMB_FIND_FILE_UNIX handler
https://bugzilla.samba.org/show_bug.cgi?id=10654
Signed-off-by: Jeremy Allison <jra@samba.org>
CVE-2014-3493
|
|
The Linux kernel has a bug in that it can give spurious
wakeups on a non-blocking UDP socket for a non-deliverable packet.
When nmbd was changed to use non-blocking sockets it
became vulnerable to a spurious wakeup from poll/epoll.
Fix sys_recvfile() to return on EWOULDBLOCK/EAGAIN.
CVE-2014-0244
Signed-off-by: Jeremy Allison <jra@samba.org>
|
|
We no longer return early if there are no members, we just return an empty array.
Fixes bug #10627 - rid_array used before status checked - segmentation fault due to null pointer dereference
https://bugzilla.samba.org/show_bug.cgi?id=10627
Change-Id: I7b0949e0c0b9277426a8007514a8658615f6c709
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Tue Jun 10 13:08:54 CEST 2014 on sn-devel-104
|
|
SLES's cifsd and Apple's smbx do not correctly handle FILE_NON_DIRECTORY_FILE
which prevents recursive copies in gvfs from working correctly [1] since GVFS
tries to open the directory, expecting ENOTDIR, but it suceeds and appears as a
zero byte file.
This fix adds code to the cli_open() open code that checks if
CreateOptions was requested with FILE_NON_DIRECTORY_FILE set,
and if the attributes returned include FILE_ATTRIBUTE_DIRECTORY
we synchronously close the file handle just opened, and return
NT_STATUS_FILE_IS_A_DIRECTORY to the caller.
Depends on the previous API update to cli_ntcreate()
to add returned attributes.
Fixes bug #10587 - Opening directories on SLES's cifsd and Apple's smbx succeeds.
https://bugzilla.samba.org/show_bug.cgi?id=10587
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit b2ce2441a35ed68c39791168217d159352b5143c)
|
|
cli_ntcreate(), cli_ntcreate_recv(), cli_nttrans_create() and cli_nttrans_create_recv().
This completes the update of the create API to return
all the data returned by the server on open.
We can now use this data to detect buggy servers
without an extra round trip.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 3d8ba9b34e34c1f3e0c1c231d6b772994b45eeaf)
|
|
Add a return parameter of struct smb_create_returns *cr to
cli_ntcreate()
cli_ntcreate_recv()
cli_nttrans_create()
cli_nttrans_create_recv()
Always pass in NULL for now. This fixes the create
API to always fully return the data the server has
given back to us on the open file to the caller.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 69e24b4e8bc607806453ab137efda6d6bf74fb12)
|
|
smb_create_returns' so we can use this in SMB1 create returns as well.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 2900dfa5b928ef237e72ac4e15481e083d61750a)
|
|
The incorrect (system) jobid is currently passed to the job deletion
function.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10612
Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit efb4684a3fc0b32a71eab013000f730e6b144a67)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Mon Jun 2 19:06:43 CEST 2014 on sn-devel-104
|
|
put_long_date_timespec.
put_long_date_timespec() correctly calls round_timespec()
on the time parameters, and is the correct function to
use when writing *any* file-based NTTIME on the wire.
Move from using NTTIME variables internally
in the server to struct timespec variables, which is
what all the other server code uses. Only map to
NTTIME as the last step of marshalling the output
data.
The previous SMB2 create code missed the round_timespec()
call before marshalling.
Bug 3124 - xcopy /d with samba shares works not as aspected
https://bugzilla.samba.org/show_bug.cgi?id=3124
which is a regression from a long-ago bug with
SMB1.
Signed-off-by: Jeremy Allison <jra@samba.org>
|
|
put_long_date_timespec.
put_long_date_timespec() correctly calls round_timespec()
on the time parameters, and is the correct function to
use when writing *any* file-based NTTIME on the wire.
The smb2_close() code being modified already did this by
hand, and so this doesn't change any of the functionality, only
makes the SMB2 code match all of the other server
code in Samba. Move from using NTTIME variables internally
in the server to struct timespec variables, which is
what all the other server code uses. Only map to
NTTIME as the last step of marshalling the output
data.
Not following the put_long_date_timespec()
convention in the SMB2 create code caused the
round_timespec() step to have been missed in
that code - thus bug:
Bug 3124 - xcopy /d with samba shares works not as aspected
https://bugzilla.samba.org/show_bug.cgi?id=3124
which is a regression from a long-ago bug with
SMB1.
Signed-off-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit fae7e5d771d1c69bded1189b23335647023fa0f7)
Conflicts:
ctdb/lib/util/util.h
Also renamed memdup() in source3/locking/brlock.c
|
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10517
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 91013315c9fa946bf85c85df0ccd40a803f3dc6f)
|
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10517
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit a54e94559b5ebabbb8c5c938fdf159efceff39e6)
|
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10517
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
|
|
Add --with-systemd / --without-systemd options to check whether
libsystemd-daemon library is available and use it to report service
startup status to systemd for smbd/winbindd/nmbd and AD DC.
The problem it solves is correct reporting of the Samba services
at the point when they are ready to serve clients, important for
high availability software integration.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10517
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 54b5d9a7384ae27b2a26586ff909128427c05abe)
|
|
labels_data_count already accounts for the unicode null character at the
end of the array. There is no need in adding space for it again.
Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 6 04:03:17 CEST 2013 on sn-devel-104
(cherry picked from commit eb50fb8f3bf670bd7d1cf8fd4368ef4a73083696)
The last 2 patches address bug #10549 - CVE-2014-0178: Malformed
FSCTL_SRV_ENUMERATE_SNAPSHOTS response.
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Mon May 19 14:52:47 CEST 2014 on sn-devel-104
|
|
Otherwise num_volumes and the end marker can return uninitialized data
to the client.
Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit 30e724cbff1ecd90e5a676831902d1e41ec1b347)
|
|
to continue.
This can break smbd if we end up leaving a SHARING_VIOLATION
retry record on the queue.
Signed-off-by: Jeremy Allison <jra@samba.org>
Fix bug #10577 - SMB1 wildcard unlink fail can leave a retry record on the open
retry queue.
|
|
No longer used (hurrah!).
Bug 10564 - Lock order violation and file lost
https://bugzilla.samba.org/show_bug.cgi?id=10564
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May 2 23:47:38 CEST 2014 on sn-devel-104
|
|
instead of open_file_fchmod().
get_file_handle_for_metadata() is a new function that
finds an existing open handle (fsp->fh->fd != -1) for
a given dev/ino if there is one available, and uses
INTERNAL_OPEN_ONLY with WRITE_DATA access if not.
Allows open_file_fchmod() to be removed next.
Bug 10564 - Lock order violation and file lost
https://bugzilla.samba.org/show_bug.cgi?id=10564
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
|
|
INTERNAL_OPEN_ONLY.
This causes deadlocks which cause smbd to crash if the locking
database has already been locked for a compound operation we
need to be atomic (as in the file rename case).
Ensure INTERNAL_OPEN_ONLY opens are synonymous with req==NULL.
INTERNAL_OPEN_ONLY opens leave a NO_OPLOCK record in
the share mode database, so they can be detected by other
processes for share mode violation purposes (because
they're doing an operation on the file that may include
reads or writes they need to have real state inside the
locking database) but have an fnum of FNUM_FIELD_INVALID
and a local share_file_id of zero, as they will never be
seen on the wire.
Ensure validate_my_share_entries() ignores
INTERNAL_OPEN_ONLY records (share_file_id == 0).
Bug 10564 - Lock order violation and file lost
https://bugzilla.samba.org/show_bug.cgi?id=10564
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
|
|
In changes to come this will be possible for an INTERNAL_OPEN_ONLY.
The protection was already in place for some code paths, this
makes the coverage compete.
Bug 10564 - Lock order violation and file lost
https://bugzilla.samba.org/show_bug.cgi?id=10564
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
|
|
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon May 5 22:41:19 CEST 2014 on sn-devel-104
Fix bug #10151 - Extra ':' in msg for Waf Cross Compile Build System with
Cross-answers command.
|
|
While running smbtorture test raw.write under valgrind an "Invalid read"
was reported in methid reply_writeclose, it seems after closing a file
sometime later we try to access it again.
Signed-off-by: Noel Power <noel.power@suse.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Mar 3 20:42:40 CET 2014 on sn-devel-104
(cherry picked from commit 04e434661fa6b5f13776f925b0a7cbadb6b6d006)
Fix bug #10554 - request backport for 'smb1 - fix read of deleted memory in
reply_writeclose()'.
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Tue May 6 13:28:35 CEST 2014 on sn-devel-104
|
|
Domain range index #0 is not included in the database record.
So in this special case we only have the SID, not SID#IDX...
Signed-off-by: Abhidnya Joshi <achirmul@in.ibm.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit ebc9ff616fefbf10b31e4e097f28fa17a1abc2f8)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10547
|
|
Additional fix for bug #10544 - s3-lib/util: set_namearray reads across end of namelist string.
Not strictly needed as the initial fix addresses
the problem, but corrects the internal logic
inside the loops.
https://bugzilla.samba.org/show_bug.cgi?id=10544
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 4f59580331b934b183c3344da57f2002d88d4512)
|
|
If the namelist is not terminated with a '/', we try to read
the next character after the string termination '\0'.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr 8 21:44:16 CEST 2014 on sn-devel-104
(cherry picked from commit 8f46b130c5c796d66d26982f5cd99c52f7c8ece1)
Fix bug #10544 - s3-lib/util: set_namearray reads across end of namelist
string.
|
|
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 25 18:29:06 CET 2014 on sn-devel-104
(cherry picked from commit a7df00c82049547129f063a40a842b156c8aead4)
|
|
When a smbd process dies, pending messages.tdb records for this process
might not get cleaned up. Implement a cleanup for dead records that is
triggered after a smbd dies uncleanly; the records for that PID are
deleted.
Based on a patchset from Christof Schmitt <cs@samba.org>.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
(cherry picked from commit 837671f47670b16726aa96ba7a0902974a1037eb)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10534
Cleanup messages.tdb record after unclean smbd shutdown
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Fri Apr 4 23:07:07 CEST 2014 on sn-devel-104
|
|
attempt
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
The last 10 patches address bug #10230 - (lib)smbclient fails with NetApp.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10230
|
|
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
cli_qpathinfo3 only works (and is only needed as fallback so far) for smb1.
Use cli_qpathinfo2 in the smb2 case to make it universally usable.
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
The pathinfo2 call might fail against NetApp because it is sending broken
packages.
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|