summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* shadow_copy2: add some blank lines for visual separation to ↵Michael Adam2013-10-051-0/+2
| | | | | | | | shadow_copy2_convert() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: initialize "converted" string to null in shadow_copy2_convert()Michael Adam2013-10-051-1/+1
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: fix shadow_copy2_strip_snapshot() in the classical caseMichael Adam2013-10-051-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>
* shadow_copy2: add some debug to shadow_copy2_strip_snapshot()Michael Adam2013-10-051-1/+11
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add comments explaining decisions in shadow_copy2_strip_snapshot()Michael Adam2013-10-051-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>
* shadow_copy2: introduce shadow_copy2_snapshot_path()Michael Adam2013-10-051-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>
* shadow_copy2: factor shadow_copy2_posix_gmt_string() out of ↵Michael Adam2013-10-051-21/+47
| | | | | | | | | | shadow_copy2_insert_string() for re-use.. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: shadow_copy2_insert_string(): do not prepend a "/" in absolute ↵Michael Adam2013-10-051-2/+20
| | | | | | | | mode Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: make shadow_copy2_find_snapdir() return const char *Michael Adam2013-10-051-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>
* shadow_copy2: in the classical case, use configured path in ↵Michael Adam2013-10-051-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>
* shadow_copy2: implement disk_freeMichael Adam2013-10-051-0/+37
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: log resulting config at the end of shadow_copy2_connect()Michael Adam2013-10-051-0/+29
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add snapshot_basepath to the config.Michael Adam2013-10-051-0/+11
| | | | | | | | This is the absolute version of snapdir. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add rel_connectpath to config.Michael Adam2013-10-051-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>
* shadow_copy2: introduce "shadow:mountpoint" optionMichael Adam2013-10-051-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>
* shadow_copy2: re-add the basedir option.Michael Adam2013-10-051-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>
* shadow_copy2: disable "snapdir:crossmountpoints" if the snapdir is absolute.Michael Adam2013-10-051-0/+7
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: introduce the bool "snapdir_absolute" in the config.Michael Adam2013-10-051-0/+10
| | | | | | | | Not exposed but to be used internally. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: introduce config struct and function shadow_copy2_connect()Michael Adam2013-10-051-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>
* shadow_copy2: add comment explaining the SMB level GMT format patternMichael Adam2013-10-051-1/+9
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add comment block explaining shadow_copy2_convert()Michael Adam2013-10-051-0/+5
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add comment block explaining shadow_copy2_insert_string()Michael Adam2013-10-051-0/+5
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add comment block explaining shadow_copy2_find_snapdir()Michael Adam2013-10-051-0/+4
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add header comment explaining have_snapdir()Michael Adam2013-10-051-0/+6
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add comment header describing shadow_copy2_strip_snapshot()Michael Adam2013-10-051-0/+5
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: break overly long lines in shadow_copy2_snapshot_to_gmt()Michael Adam2013-10-051-3/+6
| | | | | | | | According to coding guidelines. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove dead code. Now we have no SWAT we don't use the invalid_services ↵Jeremy Allison2013-10-031-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
* smbd:smb2: fix error code when the header says the request is signed but we ↵Michael Adam2013-10-021-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
* s3:smb2_server: don't rely on the SMB2_HDR_FLAG_SIGNED if signing is requiredStefan Metzmacher2013-10-021-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>
* net: allow "net idmap get ranges" to list all rangesMichael Adam2013-10-021-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
* idmap_autorid: allow iterate functions to operate on all domain rangesMichael Adam2013-10-021-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>
* net: implement "net idmap delete ranges"Michael Adam2013-10-021-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>
* idmap_autorid: add idmap_autorid_delete_domain_ranges()Michael Adam2013-10-022-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>
* net: add "net idmap get ranges" operation for autoridMichael Adam2013-10-021-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>
* idmap_autorid: add idmap_autorid_iterate_domain_ranges[_read]()Michael Adam2013-10-022-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>
* net: implement "net idmap delete range"Michael Adam2013-10-021-0/+95
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* idmap_autorid: add idmap_autorid_delete_range_by_num()Michael Adam2013-10-022-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>
* idmap_autorid: add idmap_autorid_delete_range_by_sid()Michael Adam2013-10-022-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>
* idmap_autorid: add idmap_autorid_build_keystr_talloc()Michael Adam2013-10-021-0/+17
| | | | | | | talloc version of idmap_autorid_build_keystr() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* idmap_autorid: extend idmap_autorid_addrange to allow to set mappings below ↵Michael Adam2013-10-021-21/+40
| | | | | | | the HWM Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* net: implement "net idmap get range"Michael Adam2013-10-021-0/+86
| | | | | | | get the range for a domain sid and range index. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* idmap_autorid: improve clarity of idmap_autorid_addrange_action() by adding ↵Michael Adam2013-10-021-7/+8
| | | | | | | mem_ctx. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* net: add "net idmap set range" (for autorid backend)Michael Adam2013-10-021-0/+83
| | | | | | | | | | | | | | | This lets the admin store a range for a domain/index pair. Call syntax is: net idmap set range <RANGE> <DOMSID> [<INDEX>] INDEX defaults to 0. Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
* net idmap: add utility function parse_uint32()Volker Lendecke2013-10-021-0/+24
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* net: add "net idmap get config" to read the autorid config from the databaseAtul Kulkarni2013-10-021-0/+50
| | | | | | | | Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* net: add "net idmap get" commandMichael Adam2013-10-021-0/+17
| | | | | | | This has no subcommands yet and is added in preparation of adding some. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* net: add "net idmap set config" command to store the autorid global configAtul Kulkarni2013-10-021-0/+47
| | | | | | | | Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* idmap_autorid: add idmap_autorid_saveconfigstr()Michael Adam2013-10-022-0/+25
| | | | | | | | | | Store a configuration as provided by a config string after parsing and validating the string. Based on similar patch by Atul Kulkarni <atul.kulkarni@in.ibm.com>. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* net: add new function net_idmap_opendb_autorid()Atul Kulkarni2013-10-022-1/+53
| | | | | | | | | | | | | This checks the backend is autorid, and opens the db if so. If readonly == true, the DB is simply opened for reading. If readonly == false, the DB is created if necessary and initialized with HWMs. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* net: rename "idmap_dump_ctx" to "net_idmap_ctx".Michael Adam2013-10-021-6/+6
| | | | | | | This started specific, but is now generic. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>