summaryrefslogtreecommitdiff
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* s3:lib: Use POPT_TABLEEND for last element of poptOptionAndreas Schneider2019-01-281-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:winbind: Use C99 initializer for poptOption in winbinddAndreas Schneider2019-01-281-6/+48
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:param: Use C99 initializer for poptOption in test_lp_loadAndreas Schneider2019-01-281-2/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in smbgetAndreas Schneider2019-01-281-19/+133
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in smbtreeAndreas Schneider2019-01-281-3/+24
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in netAndreas Schneider2019-01-281-50/+302
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in log2pcaphexAndreas Schneider2019-01-281-2/+16
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in testparmAndreas Schneider2019-01-281-6/+49
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in smbcquotasAndreas Schneider2019-01-281-14/+72
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in ntlm_authAndreas Schneider2019-01-281-22/+145
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in sharesecAndreas Schneider2019-01-281-15/+94
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in profilesAndreas Schneider2019-01-281-3/+24
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in nmblookupAndreas Schneider2019-01-281-10/+74
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in smbcaclsAndreas Schneider2019-01-281-16/+117
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use C99 initializer for poptOption in smbstatusAndreas Schneider2019-01-281-12/+96
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:torture: Use C99 initializer for poptOption in vfstestAndreas Schneider2019-01-281-4/+21
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:smbd: Use C99 initializer for poptOption in smbd serverAndreas Schneider2019-01-281-11/+67
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:rpcclient: Use C99 initializer for poptOption in cmd_witnessAndreas Schneider2019-01-281-17/+129
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:client: Use C99 initializer for poptOption in smbclientAndreas Schneider2019-01-281-15/+130
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:pylibsmb: Initialize pointers to NULL in new API codeTim Beale2019-01-261-4/+4
| | | | | | | | Fix a few uninitialized pointers that managed to sneak through review. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: uid: Don't crash if 'force group' is added to an existing share ↵Jeremy Allison2019-01-251-2/+33
| | | | | | | | | | | | | | | | | | | | connection. smbd could crash if "force group" is added to a share definition whilst an existing connection to that share exists. In that case, don't change the existing credentials for force group, only do so for new connections. Remove knownfail from regression test. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13690 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Jan 25 16:31:27 CET 2019 on sn-devel-144
* s3: tests: Add regression test for smbd crash on share force group change ↵Jeremy Allison2019-01-252-0/+77
| | | | | | | | | | | with existing connection. Mark as known fail for now. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13690 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:rpclient: rpclient help is not very helpfulTim Beale2019-01-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The help was not telling me that there was a mandatory 'server' argument that I needed to specify. After trying several different combinations of parameters, I eventually had to run the tool in gdb to work out why it was complaining. This is the output I was getting: bin/rpcclient -U$USERNAME%$PASSWORD -I $SERVER_IP Usage: rpcclient [OPTION...] -c, --command=COMMANDS Execute semicolon separated cmds -I, --dest-ip=IP Specify destination IP address -p, --port=PORT Specify port number ... New help output is: Usage: rpcclient [OPTION...] <server> Options: -c, --command=COMMANDS Execute semicolon separated cmds ... Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3-vfs: Use ENOATTR in errno comparison for getxattrAnoop C S2019-01-233-4/+4
| | | | | | | | | | | | | | | | | * ENODATA is not defined in FreeBSD * ENOATTR is defined to be a synonym for ENODATA in Linux * In its absence Samba already defines ENOATTR to either ENODATA or ENOENT Thus it is safe and correct to compare with ENOATTR rather than ENODATA. Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jan 23 21:59:10 CET 2019 on sn-devel-144
* s3-vfs: add glusterfs_fuse vfs module.Günther Deschner2019-01-223-0/+80
| | | | | | | | | | | | | | | | | | | | | | This module only implements the get_real_filename function by accessing a distinct extended attribute that is available over a glusterfs fuse mount. By implementing this vfs function users of a glusterfs fuse mount achieve a much better performance in create based workloads where samba then can avoid trying multiple case folding options to detect the real filename. Patch is based on an initial patch provided by Poornima G <pgurusid@redhat.com> Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Jan 22 18:37:56 CET 2019 on sn-devel-144
* s3:lib: Fix the debug message for adding cache entries.Andreas Schneider2019-01-191-4/+4
| | | | | | | | | To get correct values, we need to cast 'timeout' to 'long int' first in order to do calculation in that integer space! Calculations are don in the space of the lvalue! Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:libsmb: Store file allocation size in struct file_info.Jeremy Allison2019-01-182-0/+2
| | | | | | | | | | | We get this already, from SMB2_FIND_ID_BOTH_DIRECTORY_INFO so return it. For SMB1 leave this as zero so callers know it hasn't been initialized. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:libsmb: parse_finfo_id_both_directory_info capture FileID in ↵Puran Chand2019-01-182-0/+2
| | | | | | | | | | | | | SMB2_FIND_ID_BOTH_DIRECTORY_INFO response This captures the FileID in struct file_info while parsing SMB2_FIND_ID_BOTH_DIRECTORY_INFO response Refered MS doc for spec:- https://msdn.microsoft.com/en-us/library/cc246290.aspx Signed-off-by: Puran Chand <pchand@vmware.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* wscript: Make non_posix_acls a subsystemChristof Schmitt2019-01-181-3/+2
| | | | | | | | | This fixes build error when building vfs_gpfs as static module: ERROR: circular library dependency between smbd_base and non_posix_acls Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:pylibsmb: Add FILE_READ_ATTRIBUTES access to .loadfile() APITim Beale2019-01-171-1/+2
| | | | | | | | | | | | | | | | | | | Add FILE_READ_ATTRIBUTES when opening the file handle, as we need to read the file's size. The .loadfile() API can end up calling cli_qfileinfo_basic() to get the file size. This can end up doing a 'FILE_ALL_INFORMATION' SMBv2 request underneath, which the MS-SMB2 spec (section 3.3.5.20.1 Handling SMB2_0_INFO_FILE) says the file handle must have FILE_READ_ATTRIBUTES access granted. I noticed this problem when running .loadfile() against the NTVFS server. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:pylibsmb: Add .set_acl API to SMB py bindingsTim Beale2019-01-171-0/+51
| | | | | | | | | | This is pretty similar code to py_smb_getacl(), except it's calling cli_set_security_descriptor() instead of cli_query_security_descriptor() BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_fileid: fix fsname_norootdir algorithmRalph Wuerthner2019-01-171-1/+2
| | | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13744 Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Jan 17 01:36:54 CET 2019 on sn-devel-144
* s3:libsmb: Honor disable_netbios option in smbsock_connect_sendJustin Stephenson2019-01-161-0/+7
| | | | | | | | | | | | | | If disable_netbios is set, return before the tevent timer is triggered to prevent outgoing netbios connections. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13727 Signed-off-by: Justin Stephenson <jstephen@redhat.com> 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): Wed Jan 16 08:54:23 CET 2019 on sn-devel-144
* profiling: stop smbprofile from growing unnecessarilyDylan Stephano-Shachter2019-01-161-0/+5
| | | | | | | | | Signed-off-by: Dylan Stephano-Shachter <dshachter@nasuni.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): Wed Jan 16 02:01:55 CET 2019 on sn-devel-144
* s3-smbd: use fruit:model string for mDNS registrationGünther Deschner2019-01-151-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | With this change we now allow to modify the icon to represent Samba in Finder. Possible values are at least: fruit:model = iMac fruit:model = MacBook fruit:model = MacPro fruit:model = Xserve fruit:model = RackMac Prior to this change we only displayed the correct icon when a mac client negotiated the apple create context over SMB. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13746 Based on proposed patch from Rouven WEILER <Rouven_Weiler@gmx.net> Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Jan 15 21:27:20 CET 2019 on sn-devel-144
* libcli/dns: Add resolv.conf parsingVolker Lendecke2019-01-152-0/+24
| | | | | | | | | | | Right now this only looks at the nameserver setting. It is initally made for asynchronous AD DC lookup routines, where we don't need the "search", "domain" and other settings. When we convert general "net", "smbclient" and others to use this, we might either add "domain" handling to this code or look at something like c-ares which already does it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_fileid: fix get_connectpath_inoRalph Wuerthner2019-01-151-1/+3
| | | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13741 Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jan 15 04:13:15 CET 2019 on sn-devel-144
* s3:smbd: perform impersonation in smb2_query_directory_fetch_write_time_done()Ralph Boehme2019-01-141-0/+7
| | | | | | | | | | | | This is not strictly required, as we ne never trigger additional VFS requests via this codepath. But for safety reasons ensure we're running in the correct impersonation state. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Jan 14 22:30:24 CET 2019 on sn-devel-144
* s3:smbd: perform impersonation in smb2_query_directory_dos_mode_done()Ralph Boehme2019-01-141-0/+7
| | | | | | | | This is needed as the callback might be called in an arbitrary impersonation state. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: perform impersonation in dos_mode_at_vfs_get_dosmode_done()Ralph Boehme2019-01-141-0/+7
| | | | | | | | This is needed as the callback might be called in an arbitrary impersonation state. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_default: use change_to_user_by_fsp() instead of change_to_user()Ralph Boehme2019-01-141-6/+2
| | | | | | | Cosmetic change. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: perform impersonation in smb_vfs_call_getxattrat_done()Ralph Boehme2019-01-141-0/+9
| | | | | | | | This is needed as the callback might be called in an arbitrary impersonation state. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: use struct initializer in smb_vfs_call_getxattrat_send()Ralph Boehme2019-01-141-1/+4
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: perform impersonation in smb_vfs_call_get_dos_attributes_done()Ralph Boehme2019-01-141-0/+9
| | | | | | | | This is needed as the callback might be called in an arbitrary impersonation state. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: use struct initializer in smb_vfs_call_get_dos_attributes_sendRalph Boehme2019-01-141-1/+4
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:pylibsmb: Add .get_acl() API to SMB py bindingsTim Beale2019-01-141-0/+53
| | | | | | | | | | | | There is no obvious async-equivalent of cli_query_security_descriptor(), so it will throw an error if anyone tries to use it in multi-threaded mode. Currently only samba-tool and tests use the (s4) .get_acl() API, both of which will be fine using the synchronous API. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* lib: remove unused function nttime_from_string()Swen Schillig2019-01-121-9/+0
| | | | | | Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Revert "smbd: add smbd_server_connection->raw_ev_ctx pointer"Ralph Boehme2019-01-113-5/+2
| | | | | | | | | | | | | | This reverts commit 6114f9545fa856717220658e87f2a60f6767b7f4. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* vfs_aio_pthread: add sync fallbackRalph Boehme2019-01-111-3/+29
| | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* vfs_aio_pthread: store conn instead of sconn in aio_open_private_dataRalph Boehme2019-01-111-3/+3
| | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>