summaryrefslogtreecommitdiff
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* Add simple tests for net rpc share allowedusersOlly Betts2018-11-302-0/+35
| | | | | | Signed-off-by: Olly Betts <olly@survex.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix net rpc share allowedusers short descriptionOlly Betts2018-11-301-2/+2
| | | | | | | | This command allows one to list allowed users, not modify them. Signed-off-by: Olly Betts <olly@survex.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* net rpc share allowedusers: Allow restricting sharesOlly Betts2018-11-302-9/+27
| | | | | | | | | | | | | | | | | | | | | The help already implies that you can specify "targets" for net rpc share allowedusers, but actually the tail end of the command line is just ignored. This patch allows a list of shares to be specified, and only those shares are checked, which can be much faster if you're only interested in a few shares on a server which exports lots. This subcommand already accepts an optional filename for the output of net usersidlist, with a default of stdin. Typically you'd just pipe one command to the other so stdin is most likely what you want. This patch adds support for a filename of "-" to mean stdin so that you can specify stdin explicitly when you provide a list of shares, since in this case the filename can't be omitted. Signed-off-by: Olly Betts <olly@survex.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix spelling mistakesOlly Betts2018-11-308-18/+18
| | | | | | Signed-off-by: Olly Betts <olly@survex.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* New testcase samba3.blackbox.net_rpc_join_credsOlly Betts2018-11-302-0/+34
| | | | | | | | Tests that you can now use a credentials file with net. Signed-off-by: Olly Betts <olly@survex.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* net: Add support for a credentials fileOlly Betts2018-11-301-0/+25
| | | | | | | | | Add support for the same -A authfile/--authentication-file authfile option that most of the other tools already do. Signed-off-by: Olly Betts <olly@survex.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3/testparm: Reduce debug level to 1Anoop C S2018-11-291-2/+2
| | | | | | | | | | | | Adhere to what we document in manual page for testparm that default debug level is set to reasonable value 1. Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Nov 29 11:52:22 CET 2018 on sn-devel-144
* s3:winbindd: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-281-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:utils: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-282-4/+4
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:smbd: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-283-5/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:rpc_server: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-281-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:nmbd: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-281-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:modules: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-284-9/+9
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:libsmb: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-282-5/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:libads: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-282-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:lib: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-282-3/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:include: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-281-4/+4
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:ldap: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-281-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:auth: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-281-3/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3: Remove unsused MMAP_BLACKLIST ifdef checksAndreas Schneider2018-11-282-11/+0
| | | | | | | This doesn't get defined by anything. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* lib: Align integer typesVolker Lendecke2018-11-281-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* krb5_wrap: Add a talloc_ctx to smb_krb5_principal_get_realm()Volker Lendecke2018-11-281-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* notifyd: Improve a debug messageVolker Lendecke2018-11-271-2/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Nov 27 21:42:24 CET 2018 on sn-devel-144
* winbind: Use dom_sid_str_bufVolker Lendecke2018-11-271-10/+6
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Tue Nov 27 10:38:11 CET 2018 on sn-devel-144
* idmap_cache: Use dom_sid_str_bufVolker Lendecke2018-11-271-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Fix "wbint_Principals" definitionVolker Lendecke2018-11-272-2/+2
| | | | | | | A signed integer does not make any sense for an IDL array length Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Use dom_sid_str_bufVolker Lendecke2018-11-271-3/+7
| | | | | | | Also fix a DBG format string specifier Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Use dom_sid_str_bufVolker Lendecke2018-11-271-1/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Use dom_sid_str_bufVolker Lendecke2018-11-271-7/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libads: Give krb5_errs.c its own headerVolker Lendecke2018-11-2711-0/+41
| | | | | | | | The protos were declared in lib/krb5_wrap but the functions are not available there. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_shadow_copy2: in fstat also convert fsp->fsp_name and ↵Ralph Boehme2018-11-271-8/+50
| | | | | | | | | | | | fsp->base_fsp->fsp_name Stacked VFS modules might use the file name, not the file handle. Looking at you, vfs_fruit... Bug: https://bugzilla.samba.org/show_bug.cgi?id=13455 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: pass down twrp from SMB2_CREATE to filename_convert()Ralph Boehme2018-11-271-24/+5
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13455 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: add twrp args to filename_convert()Ralph Boehme2018-11-279-2/+36
| | | | | | | | | All existing callers pass NULL, no change in behaviour. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13455 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: add twrp processing to filename_convert_internal()Ralph Boehme2018-11-271-0/+26
| | | | | | | | | Not used for now, existing callers pass NULL. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13455 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: prepare filename_convert_internal() for twrpRalph Boehme2018-11-271-1/+4
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13455 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:selftest: add a VSS test reading a streamRalph Boehme2018-11-271-0/+38
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13455 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_shadow_copy2: nicely deal with attempts to open previous version for writingRalph Boehme2018-11-271-2/+122
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13688 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_shadow_copy2: add shadow_copy2_strip_snapshot_convertedRalph Boehme2018-11-271-0/+16
| | | | | | | | | | Can be used by callers to determine if a path is in fact pointing at a file in a snapshot. Will be used in the next commit. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13688 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_shadow_copy2: add _already_converted arg to ↵Ralph Boehme2018-11-271-8/+24
| | | | | | | | | | | shadow_copy2_strip_snapshot_internal() Not used for now, all existing callers pass NULL. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13688 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:script/tests: add a test for VSS write behaviourRalph Boehme2018-11-272-1/+78
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13688 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_error_inject: add EBADF errorRalph Boehme2018-11-271-0/+1
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13688 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_error_inject: add pwriteRalph Boehme2018-11-271-0/+18
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13688 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libads: Align integer typesVolker Lendecke2018-11-231-1/+1
| | | | | | | | 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): Fri Nov 23 20:23:57 CET 2018 on sn-devel-144
* libads: Use dom_sid_string_bufVolker Lendecke2018-11-231-2/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* source4 smbd prefork: Add backoff to process restartGary Lockyer2018-11-231-0/+2
| | | | | | | | | Add new smbd.conf variables 'prefork backoff increment' and 'prefork maximum backoff' to control the rate at which failed pre-forked processes are restarted. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:lib: Fix undefined behavior in messages_dgmAndreas Schneider2018-11-221-3/+7
| | | | | | | | source3/lib/messages_dgm.c:1290:7: runtime error: variable length array bound evaluates to non-positive value 0 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:lib: Do not redefine bool and use stdbool.hAndreas Schneider2018-11-221-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3:tests: Initialize pointers with NULL in netdisplay testAndreas Schneider2018-11-222-5/+5
| | | | | | | Found by Undefined Sanitizer Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* utils: Free host realm after processingSwen Schillig2018-11-221-4/+5
| | | | | | | | | | | | In case of error and at the end of processing the list of realms have to be free'd again. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Thu Nov 22 11:18:41 CET 2018 on sn-devel-144
* utils: Free krb5 context for net_lookup_kdcSwen Schillig2018-11-221-0/+3
| | | | | | | | | In case of an error while processing and at the end of processing the krb5 conext must be free'd. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>