summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
2013-10-06smbd: Fix a commentVolker Lendecke1-1/+1
This has been converted from a timed event to an immediate one in e7dab403c0ca6f6 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-06smbd: Fix confusing commentsVolker Lendecke2-4/+2
The brlock-check is done in grant_fsp_oplock_type Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-06smbd: Avoid calling serverid_exists twiceVolker Lendecke1-0/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05smbd:smb2: clarify and comment code treating dh2c blob check.Michael Adam1-6/+22
This makes the code that checks for extra create blobs in the case of the dh2c blob look very similar to the corresponding (slightly mode complex) code for the dhnc blob. With this preparation it will be easier and more obvious how to add proper treatment of the lease request blobs when leases get implemented. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Oct 5 15:56:11 CEST 2013 on sn-devel-104
2013-10-05smbd:smb2: ignore an dhnq blob along with a dhnc in createMichael Adam1-6/+26
This is according to MS-SMB2, 3.3.5.9.7 "Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT Create Context" Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05smbd:smb2_create: fix return code for durable handle create blob combinationsMichael Adam1-8/+16
According to MS-SMB2: 3.3.5.9.7 Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT Create Context 3.3.5.9.12 Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 Create Context and verified by test results. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05smbd:smb2: successfully answer a DHnC request when the initial create was DH2QMichael Adam3-7/+18
I.e. the durable reconnect attempt is v1 while the original create was durable v2 including the create guid. Implement this by skipping the create_guid verification when the reconnect request is v1. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05smbd:smb2_create: add comment about validity of check reconnect blob being ↵Michael Adam1-0/+4
only one With leases this will not be true any more. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05shadow_copy2: use stored mount_point instead of recalculating.Michael Adam1-9/+1
In the case of snapdirseverywhere but NOT crossmountpoints. This spares stat calls. And is the only correct thing to do if the mount point was specified in the configuration. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: improve debug in shadow_copy2_convert() in snapdirseverywhere modeMichael Adam1-1/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: fix shadow_copy2_convert() in the classical case.Michael Adam1-2/+45
I.e. the non-snapdirseverywhere case. This in particular fixes the case of a snapdir hierarchy that is parallel to the share or mountpoint and not subordinate. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add some blank lines for visual separation to ↵Michael Adam1-0/+2
shadow_copy2_convert() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: initialize "converted" string to null in shadow_copy2_convert()Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: fix shadow_copy2_strip_snapshot() in the classical caseMichael Adam1-0/+30
I.e., fix detection of already converted names. This is done by using the shadow_copy2_snapshot_path() function and comparing if the input string starts with that. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add some debug to shadow_copy2_strip_snapshot()Michael Adam1-1/+11
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add comments explaining decisions in shadow_copy2_strip_snapshot()Michael Adam1-0/+10
This should make it more easy to understand what the cases are. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: introduce shadow_copy2_snapshot_path()Michael Adam1-0/+37
This builds the posix snapshot path for the connection at the provided timestamp. For the non-snapdirseverywhere case. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: factor shadow_copy2_posix_gmt_string() out of ↵Michael Adam1-21/+47
shadow_copy2_insert_string() for re-use.. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: shadow_copy2_insert_string(): do not prepend a "/" in absolute ↵Michael Adam1-2/+20
mode Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: make shadow_copy2_find_snapdir() return const char *Michael Adam1-4/+4
instead of char *. This eliminates compiler warnings. snapdir is a const string in all occasions. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: in the classical case, use configured path in ↵Michael Adam1-0/+7
shadow_copy2_find_snapdir() There is no point in searching for snapdir if not in snapdirseverywhere mode. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: implement disk_freeMichael Adam1-0/+37
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: log resulting config at the end of shadow_copy2_connect()Michael Adam1-0/+29
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add snapshot_basepath to the config.Michael Adam1-0/+11
This is the absolute version of snapdir. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add rel_connectpath to config.Michael Adam1-0/+12
This is the share root, relative to the basedir. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: introduce "shadow:mountpoint" optionMichael Adam1-5/+38
Possiblity to explicitly set the share's mount point. This is useful mainly for debugging and testing purposes. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: re-add the basedir option.Michael Adam1-0/+56
Disable basedir if it is not an absolute path or if snapdirseverywhere or crossmountpoints is enabled. Pair-Programmed-With: Björn Baumbach <bb@sernet.de> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: disable "snapdir:crossmountpoints" if the snapdir is absolute.Michael Adam1-0/+7
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: introduce the bool "snapdir_absolute" in the config.Michael Adam1-0/+10
Not exposed but to be used internally. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: introduce config struct and function shadow_copy2_connect()Michael Adam1-28/+145
This moves the parsing of the config to a central place. So users of configuation don't need to call lp_parm_... all the time. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add comment explaining the SMB level GMT format patternMichael Adam1-1/+9
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add comment block explaining shadow_copy2_convert()Michael Adam1-0/+5
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add comment block explaining shadow_copy2_insert_string()Michael Adam1-0/+5
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add comment block explaining shadow_copy2_find_snapdir()Michael Adam1-0/+4
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add header comment explaining have_snapdir()Michael Adam1-0/+6
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add comment header describing shadow_copy2_strip_snapshot()Michael Adam1-0/+5
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: break overly long lines in shadow_copy2_snapshot_to_gmt()Michael Adam1-3/+6
According to coding guidelines. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-03Remove dead code. Now we have no SWAT we don't use the invalid_services ↵Jeremy Allison1-37/+12
array or associated counter. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Oct 3 03:22:36 CEST 2013 on sn-devel-104
2013-10-02smbd:smb2: fix error code when the header says the request is signed but we ↵Michael Adam1-1/+1
don't have a sesseion I.e. when the request is a session setup. We replied with ACCESS_DENIED, but windows expects USER_SESSION_DELETED Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Oct 2 22:07:44 CEST 2013 on sn-devel-104
2013-10-02s3:smb2_server: don't rely on the SMB2_HDR_FLAG_SIGNED if signing is requiredStefan Metzmacher1-1/+1
Windows (at least the test suites) may skip the SMB2_HDR_FLAG_SIGNED in a reauth session setup, but still provide a valid signature. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-02net: allow "net idmap get ranges" to list all rangesMichael Adam1-5/+7
Omission of SID parameter lists ranges for all domains. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Oct 2 12:23:33 CEST 2013 on sn-devel-104
2013-10-02idmap_autorid: allow iterate functions to operate on all domain rangesMichael Adam1-4/+2
by allowing handed in domsid to be NULL Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: implement "net idmap delete ranges"Michael Adam1-0/+67
Inspired by a patch by Atul Kulkarni <atul.kulkarni@in.ibm.com>. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add idmap_autorid_delete_domain_ranges()Michael Adam2-0/+90
This uses the new idmap_autorid_iterate_domain_ranges() function. Based on earlier patch by Atul Kulkarni <atul.kulkarni@in.ibm.com>. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: add "net idmap get ranges" operation for autoridMichael Adam1-0/+78
Implemented using the idmap_autorid_iterate_domain_ranges_read() function. Based on earlier patch by Atul Kulkarni <atul.kulkarni@in.ibm.com>. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add idmap_autorid_iterate_domain_ranges[_read]()Michael Adam2-0/+216
Functions to perform an action on all domain range mappings for a given domain, specified by the domain sid. Inspired by a previous patch by Atul Kulkarni <atul.kulkarni@in.ibm.com>. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: implement "net idmap delete range"Michael Adam1-0/+95
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add idmap_autorid_delete_range_by_num()Michael Adam2-0/+129
query and delete a mapping specified by the range number. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add idmap_autorid_delete_range_by_sid()Michael Adam2-0/+130
Delete a range mapping as specified by domain SID and range index. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add idmap_autorid_build_keystr_talloc()Michael Adam1-0/+17
talloc version of idmap_autorid_build_keystr() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>