summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
2014-03-10s3:winbindd: avoid directly asking a trusted domain in wb_lookupsids*()Gregor Beck1-1/+1
As a domain member we should always use a DC of our own domain. It would be possible to pass all sids in one single dcerpc_wbint_LookupSids() call. For now we just fix bug. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10458 Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 66fb0ce9557553a4c01607b517e65ac4c93841d0)
2014-03-10s3:winbindd: fix _wbint_LookupSids() on errorGregor Beck1-1/+7
We need to make sure that r->out.domains remains valid, otherwise we're not able to marshall the response. Note that wbint_LookupSids() has [out,ref] lsa_RefDomainList *domains, while lsa_LookupSids() has [out,ref] lsa_RefDomainList **domains. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10458 Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 3413e64149702136429d7b5acaa7a52c49abf564)
2014-03-10s3: smbd: Ensure brl_get_locks_internal() always returns a valid struct ↵Jeremy Allison1-12/+22
byte_range_lock even if there are no locks. brl_get_locks_internal() currently returns NULL when it can't find any byte range locks on the file. This is an error - it should return a valid struct byte_range_lock containing num_locks == 0 so it can be cached. Returning NULL when there are no locks causes POSIX lock tests to fail returning NT_STATUS_NO_MEMORY (as it thinks it can't allocate the struct) instead of NT_STATUS_OK. This is a back-port of git commit abf08ed544ce05ea5a6e6ea2e531b6a2d97e15cc that went into master. Fixes bug: Bug 10431 - STATUS_NO_MEMORY response from Query File Posix Lock request https://bugzilla.samba.org/show_bug.cgi?id=10431 Signed-off-by: Jeremy Allison <jra@samba.org>
2014-03-10s3-printing: Fix obvious memory leak in printer_list_get_printer().Jeremy Allison1-0/+1
https://bugzilla.samba.org/show_bug.cgi?id=9993 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Feb 25 13:19:37 CET 2014 on sn-devel-104 (cherry picked from commit 148bbdd8d04400b5d873f636671dd443952ca04f)
2014-03-10rpc_client: retry open on STATUS_PIPE_NOT_AVAILABLEDavid Disseldorp1-7/+50
Windows Server starts some named pipe services on demand, and responds to initial open requests with STATUS_PIPE_NOT_AVAILABLE. The FssagentRpc named pipe on Windows Server 2012 exhibits this behaviour. This change sees rpcclient retry named pipe open requests when the server responds with STATUS_PIPE_NOT_AVAILABLE. The retry logic is contained in an asynchronous tevent_timer callback, to allow for non-blocking callers. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit ebe6627c1f0e6b488a0c456860a055fd5701e84d) [ddiss@samba.org: rebasead for 4.1 without 46d29d46bc065d51e3f7ca6892] Bug: https://bugzilla.samba.org/show_bug.cgi?id=10484 Initial FSRVP rpcclient requests fail with NT_STATUS_PIPE_NOT_AVAILABLE
2014-03-10s3:smbd: avoid invalid lock_order panic triggered by "CTDB_SRVID_RELEASE_IP"Stefan Metzmacher1-2/+39
If smbd_server_connection_terminate("CTDB_SRVID_RELEASE_IP") is triggered from within ctdbd_migrate(), we got a smb_panic complaining about invalid lock_order, as ctdbd_migrate is called from dbwrap_fetch_locked(). Bug: https://bugzilla.samba.org/show_bug.cgi?id=10444 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Feb 21 14:51:51 CET 2014 on sn-devel-104 (cherry picked from commit 33f10d06baf44e31d558bc5bd926c886915322cc)
2014-03-10s3:lib/ctdbd_conn: let release_ip_handler return boolStefan Metzmacher3-9/+35
If it returns true the passed ip address matched and we let a nested ctdb operation fail with NT_STATUS_ADDRESS_CLOSED. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 9677fae6aab26d2bf0884dc31516d2dcd8840c03)
2014-03-10s3:smbd: maintain smbd_server_connection->statusStefan Metzmacher4-0/+53
If this isn't NT_STATUS_OK, we skip any io on the socket. This avoids possible problems during shutdown. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 52ccb40d595fc80bfa53b0b9cd75ffb902369681)
2014-03-10s3:smbd: simplify exit_server_common()Stefan Metzmacher1-4/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 58c71bee40bb91868fc69d8f7fa640db0e33efae)
2014-03-10s3: ldap client can return NT_STATUS_OK when an error occurs in a paged search.Daniel Liberman1-4/+7
"Inside ads_do_search_all_args(), if the first call to ads_do_paged_search_args() fails, the proper error status is returned. But, if the execution is already inside the loop to get all the accounts doing several calls to ads_do_paged_search_args(), and one of these calls times out, the status returned is from the *first* call, so success. This causes net_ads_search() to interpret the return from ads_do_search_retry() as success and print all the accounts returned, but it’s only a subset." Also ensure we free previously returned results on error in subsequent fetches. https://bugzilla.samba.org/show_bug.cgi?id=10387 Signed-off-by: Daniel Liberman <danielvl@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jan 23 01:40:54 CET 2014 on sn-devel-104 (cherry picked from commit b04e8b7557b82a4b96cf74db04742fb017edb3ba)
2014-03-10waf: improve iconv checksChristian Ambach1-0/+6
there are broken iconv implementations around (e.g. on AIX) that you can compile against but that refuse any mapping requests make sure we do the same as the autoconf-based build did and fall back to our own code Bug: https://bugzilla.samba.org/show_bug.cgi?id=10308 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 15b2d1a658b3fc428c20a7a461168f464951f40f) (cherry picked from commit f5cbfd6ce5e5a0977e5c1a53046ee883b3431246)
2014-03-10s3:libsmb: call smbXcli_tcon_set_fs_attributes() directlyStefan Metzmacher1-4/+8
We should try to set all attributes we got and not just FILE_CASE_SENSITIVE_SEARCH. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Oct 17 19:02:03 CEST 2013 on sn-devel-104 (cherry picked from commit 2474455b7f924ae19ea8897d5e506076f7e77419)
2014-03-10s3:libsmb: remove unused cli_state->case_sensitiveStefan Metzmacher2-5/+6
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit 307abd61df586baac6cb0bef4272c633c526a7bf)
2014-03-10s3:libsmb: remove unused cli_state->dfsrootStefan Metzmacher2-7/+0
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit e20c66d78099bcf5d965bd9d59669fe393481517)
2014-03-10s3:libsmb: add SMB2/3 support to cli_dfs_get_referral()Stefan Metzmacher1-17/+56
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit c5c717fe3157224a8aba48a30bace889e7956d31)
2014-03-10s3/libsmb: make use of smbXcli_tcon_is_dfs_share()Stefan Metzmacher2-3/+26
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit 37f0e3722cea3ff433d2c95d697e38693c676ae0)
2014-03-10s3/libsmb: Use smbXcli_conn_dfs_supported instead of test on CAP_DFSLuk Claes3-3/+3
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Luk Claes <luk@debian.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 114e33717df8b49239ac08399a379a8363d33b85)
2014-03-10s3:libsmb: don't pass down FLAG_CASELESS_PATHNAMES and FLAGS2_DFS_PATHNAMES ↵Stefan Metzmacher2-43/+0
anymore They're now handled at the smbXcli_conn and smbXcli_tcon layer. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit 451b11251f7f3a517f94c5d57dab327a30bab52f)
2014-03-10s3:libsmb: call smbXcli_tcon_{get,set}_fs_attributes() from ↵Stefan Metzmacher1-0/+17
cli_set_case_sensitive() Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit 226dde2879ff8b4b366bf3d9f44f59e7fdc343c0)
2014-03-10libcli/smb: move Filesystem Attributes defines to smb_constants.hStefan Metzmacher1-19/+0
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit e6eb6b9e9494d1c8db311e5b967b0da4d75c45aa)
2014-03-10s3:libsmb: make use of smb1cli_tcon_set_values()Stefan Metzmacher1-2/+17
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit a2b38e0bc94d329963cdad76e6861d3234ede8d4)
2014-03-10s3/libsmb: Use smbXcli_conn_use_unicode instead of smb1 specific testLuk Claes1-1/+1
Signed-off-by: Luk Claes <luk@debian.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit d9d5744bc3dd7e18ac6dc23917d903d5e991ab8d)
2014-03-10s3: printing: Fix problem with server taking too long to respond to a ↵Jeremy Allison3-2/+34
MSG_PRINTER_DRVUPGRADE message. Receiving a MSG_PRINTER_DRVUPGRADE causes smbd to iterate over all printers looking for ones that uses the driver. This is a very expensive operation requiring a read of all registry printer parameters. On a system with a large number of printers, this causes the clients to timeout (smbd can take longer than 60 seconds to respond). This patch fixes the problem by forwarding the MSG_PRINTER_DRVUPGRADE to the background lpq queue updater process and allowing it to take care of the updating of the changeid in the registry, allowing the smbd connected to the client to return to processing requests immediately. https://bugzilla.samba.org/show_bug.cgi?id=9942 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Feb 18 17:48:30 CET 2014 on sn-devel-104 (cherry picked from commit cd655715b8ee0a4e681d67b3996f71017b941401)
2014-02-21dfs: always call create_conn_struct with root privilegesGarming Sam1-1/+30
This fixes a bug in dfs_samba4 identified by Daniel Müller. create_conn_struct calls SMB_VFS_CONNECT which requires root privileges. SMB_VFS_CONNECT in turn calls dfs_samba4_connect which connects to samdb. Calls were made to this function without ever becoming root (notably via setup_dfs_referral) which resulted in an error and the VFS connect failing. This happens when you have an active directory domain controller with host msdfs = yes in smb.conf and dfs links in place. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Bjoern Baumbach <bb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jan 10 20:11:03 CET 2014 on sn-devel-104 (cherry picked from commit 24a687642de21ce872d25f16b3525003844d05f9) Fix bug #10378 - dfs: always call create_conn_struct with root privileges.
2014-02-16s3:smb2_notify: fix use after free on long living notify requestsStefan Metzmacher1-0/+55
This is a hack, but it should fix the bug: change_notify_add_request() talloc moves smb_request away, which is not expected by the smb2_notify.c code... smbd_smb2_notify_reply() uses tevent_req_defer_callback() (in older versions an immediate event) to defer the response. This is needed as change_notify_reply() will do more things after calling reply_fn() (smbd_smb2_notify_reply is this case) and often change_notify_remove_request() is called after change_notify_reply(). change_notify_remove_request() implicitly free's the smb_request that was passed to change_notify_add_request(). smbd_smb2_fake_smb_request() added the smb_request as smb2req->smb1req, which is expected to be available after smbd_smb2_notify_recv() returned. The long term solution would be the following interface: struct tevent_req *change_notify_request_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct files_struct *fsp, uint32_t max_length, uint32_t filter, bool recursive); NTSTATUS change_notify_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, DATA_BLOB *buffer); Bug: https://bugzilla.samba.org/show_bug.cgi?id=10442 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Feb 14 11:18:15 CET 2014 on sn-devel-104 (cherry picked from commit e0bf930f23fe20ee00d0006a5f6c2ba1a8f592a0) Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Sun Feb 16 19:14:12 CET 2014 on sn-devel-104
2014-02-14s3: modules: streaminfo: As we have no VFS function SMB_VFS_LLISTXATTR we ↵Jeremy Allison2-2/+24
can't cope with a symlink when lp_posix_pathnames() is true. Fix bug : Bug 10429 - samba returns STATUS_OBJECT_NAME_NOT_FOUND when attempting to remove dangling symlink https://bugzilla.samba.org/show_bug.cgi?id=10429 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Jeff Layton <jlayton@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Feb 8 00:01:16 CET 2014 on sn-devel-104 (cherry picked from commit 17adbbcad7e401dd544dfa76f7ec9aeb6a847381) Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Fri Feb 14 22:30:55 CET 2014 on sn-devel-104
2014-02-14s3: vfs_dirsort module.Jeremy Allison1-0/+5
Add raw.search torture test on a share definition with: vfs objects = dirsort https://bugzilla.samba.org/show_bug.cgi?id=10406 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 30cc8f41da58b87ff575860b7cde640520829923)
2014-02-14s3: vfs_dirsort module.Jeremy Allison1-7/+112
Allow dirsort to work when multiple simultaneous directories are open. The old code only keeps one active private data pointer on the connection struct, opening a second directory on the same connection will overwrite it. This modification turns the private data pointer into a linked list of open directories on the connection struct, and finds the correct one by searching on the passed in DIR *. With this code in place, smbd passes raw.search torture test on a share definition with: vfs objects = dirsort https://bugzilla.samba.org/show_bug.cgi?id=10406 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit fd79652b0e598882e0c4d156bd897c29dae8ec04)
2014-02-14smbd: Fix an ancient oplock bugVolker Lendecke1-0/+2
If we get an oplock break response, we forgot to remove the oplock break timeout. Found by stopping raw.oplock.exclusive5 after the 2nd open and watching a debug level 10 log. This amends 08a9de89 from 2007. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 0670975261c5f29394f9e9d25f899a7de948dad1) Fix bug #10436 - cancel fsp->oplock_timeout in downgrade_file_oplock().
2014-02-14vfs_btrfs: pass-through copy-chunk(len=0) requestsDavid Disseldorp1-1/+21
Never map copy-chunk(len=0) requests to BTRFS_IOC_CLONE_RANGE ioctls. A BTRFS_IOC_CLONE_RANGE with @src_length=0 results in a clone of all data from @src_offset->EOF! BUG: https://bugzilla.samba.org/show_bug.cgi?id=10424 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 3be664969d4de41ebb4778caabce8bcf5e303064)
2014-02-14smbd/smb2_ioctl: fail zero length copy chunk requestsDavid Disseldorp1-1/+16
As documented in MS-SMB2 3.3.5.15.6 Handling a Server-Side Data Copy Request, an invalid parameter response should be sent when: The Length value in a single chunk is greater than ServerSideCopyMaxChunkSize or *equal to zero*. We do not currently abide by the latter part of this clause. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10424 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 00906f9604ad3e633e3d3cbc8d9dc4e2e305a455)
2014-02-14smbd: Fix memory overwritesVolker Lendecke1-2/+2
SIVAL writes 32 bit, not 16 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Feb 7 20:07:23 CET 2014 on sn-devel-104 (cherry picked from commit 9088bde059e93a84745ec2158e2e640b5bb13844) Fix bug #10415 - *** glibc detected *** /usr/sbin/smbd: free(): invalid next size (fast).
2014-02-06s3-winbind: Improve performance of wb_fill_pwent_sid2uid_done().Volker Lendecke1-1/+1
BUG: https://bugzilla.samba.org/show_bug.cgi?id=2191 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jan 16 20:17:24 CET 2014 on sn-devel-104 (cherry picked from commit 1a43778433934530d77791edd1af538de8b1d8a3) Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Thu Feb 6 13:59:54 CET 2014 on sn-devel-104
2014-02-05Stop use after freeAlistair Leslie-Hughes1-1/+5
Fixes bug #10087 Thanks to Man Min Yan for their analysis and providing a solution to the issue. Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep 27 14:29:46 CEST 2013 on sn-devel-104 (cherry picked from commit 6bf9a774718917c3429fa1492f5b0268ae5e01c3) Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Wed Feb 5 13:12:49 CET 2014 on sn-devel-104
2014-01-25s3: smbpasswd - fix crashes on invalid input.Jeremy Allison3-5/+28
get_pass can return NULL on error. Ensure that this is always the case and fix all callers to cope (some already did). Reported by Joonas Kuorilehto <joneskoo@codenomicon.com> BUG: https://bugzilla.samba.org/show_bug.cgi?id=10320 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Dec 16 15:17:58 CET 2013 on sn-devel-104 (cherry picked from commit ef5a3bedab74420baf0c653cf8e304fe6c2a13b4) Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Sat Jan 25 18:16:55 CET 2014 on sn-devel-104
2014-01-17s3:dir - Introduce a 64-bit directory offset <-> 32 bit wire offset map ↵Jeremy Allison1-2/+87
using memcache. Should fix the DOS clients against 64-bit smbd's bug. https://bugzilla.samba.org/show_bug.cgi?id=2662 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 97cd9c6729a3821faa2dbc1588a40c5e03b9fd4f)
2014-01-17s3:dir - Add a new memcache type (non-talloc) - SMB1_SEARCH_OFFSET_MAP.Jeremy Allison1-1/+2
We will use this in mapping 64-bit directory offset cookies to a 32-bit counter. https://bugzilla.samba.org/show_bug.cgi?id=2662 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 4e0c41a321b2683610748c8c176fc46aaa8d114d)
2014-01-17s3:dir - Map wire offsets to native directory cookies.Jeremy Allison1-5/+17
Take care of the special offsets. https://bugzilla.samba.org/show_bug.cgi?id=2662 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 42c80358c83dca65cdde78f442056ec0f55ecbb1)
2014-01-17s3:dir - Cope with fixed mapping of 'special' values.Jeremy Allison1-0/+7
https://bugzilla.samba.org/show_bug.cgi?id=2662 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 81df4123ca6fae6e9d901c59a12407f3f89dc335)
2014-01-17s3: dir - Introduce 32-bit wire versions of the 'special' values.Jeremy Allison1-0/+5
https://bugzilla.samba.org/show_bug.cgi?id=2662 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 51a115b62048735b4c8ec79211ce45600cfa5c01)
2014-01-17s3:dir - Introduce a function to map a directory cookie to a 32-bit wire cookie.Jeremy Allison1-1/+10
Make this an identity for now. https://bugzilla.samba.org/show_bug.cgi?id=2662 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 5afc25eceb0c0e031bbe162617309178f3bcc425)
2014-01-17s3:dir - In the old SMB1 search code, rename offset to wire_offset to ↵Jeremy Allison1-8/+8
distinguish between wire and native offsets. Rename uint32 type to correct uint32_t. https://bugzilla.samba.org/show_bug.cgi?id=2662 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 584de2078d3320ba2e232e5f504191616347d0d7)
2014-01-17vfs/glusterfs: in case atime is not passed, set it to the current atimeNiels de Vos1-4/+22
The Linux CIFS client does not pass an updated atime when a write() is done. This causes the vfs/glusterfs module to set the atime to -1 on the Gluster backend, resulting in an atime far in the future (year 2106). Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jan 15 21:31:30 CET 2014 on sn-devel-104 Fix bug #10384 - [BACKPORT REQUEST] vfs/glusterfs: in case atime is not passed, set it to the current atime.
2014-01-13s3-passdb: Fix string duplication to pointers.Andreas Schneider1-2/+12
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jan 9 22:35:25 CET 2014 on sn-devel-104 (cherry picked from commit bff3ac250e9d4e7d91820eb53c28257aa38fff88) The last 4 patches address bug #10367 - Fix several memory leaks. Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Mon Jan 13 12:09:26 CET 2014 on sn-devel-104
2014-01-13s3-libads: Fix memory leaks in ads_build_path().Andreas Schneider1-0/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> (cherry picked from commit c8371b4ec12f2dea6ce18724de59a23e04826c1d)
2014-01-13shadow_copy2: add a comment explaining why we don't talloc_zero_array().Michael Adam1-0/+9
Since I stumbled over this slighly sublte point, I thought it is worthwile to point it our in a comment. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Dec 11 19:55:20 CET 2013 on sn-devel-104 (cherry picked from commit 27baff0ec96cded0446ecd7739e9d31aaeb90868) The last 36 patches address bug #10259 - shadow_copy2 module "Previous Version" not working in Windows 7.
2014-01-13shadow_copy2: revert expensive and unnecessary zero-initializationMichael Adam1-1/+1
I was being overly cautious. This is initialization is not necessary, since further down in the for-loop, the memory always gets fully initialized because the insert string is inserted at various slash positions. So this talloc_zero_array can be skipped: this an expensive thing to do in virtually every VFS call. This essentially reverts commit 249e9b4a34d8959bd94735c1921ecfc24d6a2705. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 71318d7d685f8e1e112076f84ef2d788acb83547)
2014-01-13s3:modules:shadow_copy2: remove redundant documentation comment blockMichael Adam1-77/+4
and refer to the manual page instead Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 6685e6512e03d9420439a730a40fcca3411a48db)
2014-01-13s3:modules:shadow_copy2: improve headline commentMichael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit bffaf17d482cb1ad88698ea1a00aa7e4ddb0c0e7)
2014-01-13s3:module:shadow_copy2: add my (C)Michael Adam1-0/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit b5b5674287c935bf923cf570cf218ffb0ae7ce78)