summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* s3/posix_acls: replace dup_sec_desc() usageDavid Disseldorp2014-05-281-3/+3
| | | | | | | | | Use security_descriptor_copy() instead, which is also provided by libcli. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3/net_rpc_printer: replace dup_sec_desc() usageDavid Disseldorp2014-05-281-1/+11
| | | | | | | | | Use security_descriptor_copy() instead, which is also provided by libcli. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3/profiles: replace dup_sec_desc() usageDavid Disseldorp2014-05-281-2/+8
| | | | | | | | Use security_descriptor_copy() instead, which is also provided by libcli. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/rpc_server/spoolss: remove SETUP_SPOOLSS_NOTIFY_DATA_SECDESCDavid Disseldorp2014-05-281-9/+3
| | | | | | | | | | The macro is only used once, and is broken in two ways: - it relies on an externally defined mem_ctx - _data->data.sd.sd_size is set zero twice for a NULL sd Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* sharesec: remove unused security descriptor print fnsDavid Disseldorp2014-05-281-85/+0
| | | | | | | | | IDL generated NDR routines are now used, so the old hand rolled functions can be removed. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* sharesec: use NDR security descriptor print fnsDavid Disseldorp2014-05-281-4/+12
| | | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3-build: Support building with in-tree CTDBAmitay Isaacs2014-05-272-3/+7
| | | | | | | | | | | If --with-ctdb-dir option is not specified, use CTDB headers from ctdb/ subdirectory in the source tree. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue May 27 16:07:13 CEST 2014 on sn-devel-104
* messaging3: Remove a pointless return;Volker Lendecke2014-05-271-1/+0
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Tue May 27 04:41:43 CEST 2014 on sn-devel-104
* messaging3: Fix whitespaceVolker Lendecke2014-05-271-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* serverid: Fix an incompatible pointer assignmentVolker Lendecke2014-05-271-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* smbd: Fix a typoVolker Lendecke2014-05-271-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* torture3: Add a little gencache_parse load testVolker Lendecke2014-05-241-0/+24
| | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Sat May 24 16:16:43 CEST 2014 on sn-devel-104
* Exit with ctdb_fatal if serverids_exist failsVolker Lendecke2014-05-241-4/+4
| | | | | | | | | | | The only reason why this could fail is a severe ctdb communications problem. The normal way to deal with this is ctdb_fatal. This avoids a confusing panic in get_share_mode_lock when ctdb is shutdown while this call happens. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* dbwrap_ctdb: open locally with TDB_VOLATILE if requestedVolker Lendecke2014-05-241-1/+1
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: let default_sys_recvfile() and sys_recvfile() cope with ↵Jeremy Allison2014-05-241-2/+44
| | | | | | | | | | | | | | | | | non-blocking sockets. default_sys_recvfile() and splice() recvfile were not written to cope with non-blocking sockets. When either the socket read() or splice() return -1 with errno EWOULDBLOCK or EAGAIN, if no bytes have been processed yet, return -1 and let the caller set blocking and retry. If bytes have been processed, just return them as a short read and let the caller retry with the remaining needed reads. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* unix_msg: Simplify unix_msg_send a bitVolker Lendecke2014-05-241-3/+2
| | | | | | | | | | Now that we settled on variable arrays, remove a fixed one 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): Sat May 24 02:56:31 CEST 2014 on sn-devel-104
* s3: smb2: Move from using SBVAL to put NTTIMEs on the wire to ↵Jeremy Allison2014-05-231-42/+43
| | | | | | | | | | | | | | | | | | | | put_long_date_timespec. put_long_date_timespec() correctly calls round_timespec() on the time parameters, and is the correct function to use when writing *any* file-based NTTIME on the wire. Move from using NTTIME variables internally in the server to struct timespec variables, which is what all the other server code uses. Only map to NTTIME as the last step of marshalling the output data. The previous SMB2 create code missed the round_timespec() call before marshalling. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smb2: Move from using SBVAL to put NTTIMEs on the wire to ↵Jeremy Allison2014-05-231-70/+57
| | | | | | | | | | | | | | | | | | | | | | | | | put_long_date_timespec. put_long_date_timespec() correctly calls round_timespec() on the time parameters, and is the correct function to use when writing *any* file-based NTTIME on the wire. The smb2_close() code being modified already did this by hand, and so this doesn't change any of the functionality, only makes the SMB2 code match all of the other server code in Samba. Move from using NTTIME variables internally in the server to struct timespec variables, which is what all the other server code uses. Only map to NTTIME as the last step of marshalling the output data. Not following the put_long_date_timespec() convention in the SMB2 create code caused the round_timespec() step to have been missed in that code. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* dbwrap_tdb: Use mutexes on demandVolker Lendecke2014-05-221-0/+19
| | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace: Move thread checks from source3/wscriptVolker Lendecke2014-05-221-32/+0
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Add protocol version to smbstatus outputMathias Dietz2014-05-223-4/+33
| | | | | | | | | Signed-off-by: Mathias Dietz <mdietz@de.ibm.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu May 22 18:37:27 CEST 2014 on sn-devel-104
* printing: fix purge of all print jobsDavid Disseldorp2014-05-211-4/+19
| | | | | | | | | | | The incorrect (system) jobid is currently passed to the job deletion function. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10612 Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: fix creation of BUILTIN\{Administrators,Users} when "tdbsam:map ↵Michael Adam2014-05-191-3/+13
| | | | | | | | | | | | | | | | builtin = false" In this case, passdb/group mapping is not responsible for the id mapping of the builtins, so the check whether the SID maps to a unix ID is not valid for checking whether the builtin has been created as a proper group. So this patch changes the check to whether we find the builtin in the group mapping database. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon May 19 16:41:41 CEST 2014 on sn-devel-104
* lib: Fix build --without-winbind by adding winbind_lookup_usersids dummyKai Blin2014-05-161-0/+8
| | | | | | | | | | When building without winbind lib/winbind_util.c was missing a dummy function for winbind_lookup_usersids() Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Kai Blin <kai@samba.org> Autobuild-Date(master): Fri May 16 17:19:18 CEST 2014 on sn-devel-104
* auth: Allow auth_samba4 to be forced to run a specific auth moduleAndrew Bartlett2014-05-163-14/+34
| | | | | | | | | | This will allow new tests to be written to validate winbindd authentication results Andrew Bartlett Change-Id: I008eba1de349b17ee4eb9f11be08338557dffecc Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:vfs_gpfs: increase log level for EPERM and EACCES errors in gpfs_get_xattr()Ralph Wuerthner2014-05-151-2/+9
| | | | | | | | | Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 15 02:19:41 CEST 2014 on sn-devel-104
* smbd: Remove unused code for dos attributes in stat structChristof Schmitt2014-05-141-135/+4
| | | | | | | | | | This code is unused since the move to the waf build system. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Wed May 14 01:35:41 CEST 2014 on sn-devel-104
* s3:lib: always use db_open(serverid.tdb)Stefan Metzmacher2014-05-121-35/+14
| | | | | | | We should not create an empty local serverid.tdb in a cluster setup... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: libsmbclient: Work around bugs in SLES cifsd and Apple smbx SMB1 servers.Jeremy Allison2014-05-091-1/+21
| | | | | | | | | | | | | | | | | | | | | | | SLES's cifsd and Apple's smbx do not correctly handle FILE_NON_DIRECTORY_FILE which prevents recursive copies in gvfs from working correctly [1] since GVFS tries to open the directory, expecting ENOTDIR, but it suceeds and appears as a zero byte file. This fix adds code to the cli_open() open code that checks if CreateOptions was requested with FILE_NON_DIRECTORY_FILE set, and if the attributes returned include FILE_ATTRIBUTE_DIRECTORY we synchronously close the file handle just opened, and return NT_STATUS_FILE_IS_A_DIRECTORY to the caller. Depends on the previous API update to cli_ntcreate() to add returned attributes. Fixes bug #10587 - Opening directories on SLES's cifsd and Apple's smbx succeeds. https://bugzilla.samba.org/show_bug.cgi?id=10587 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: client : correctly fill in the struct smb_create_returns from ↵Jeremy Allison2014-05-091-5/+27
| | | | | | | | | | | | | cli_ntcreate(), cli_ntcreate_recv(), cli_nttrans_create() and cli_nttrans_create_recv(). This completes the update of the create API to return all the data returned by the server on open. We can now use this data to detect buggy servers without an extra round trip. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: client : Add extra return parameter to all client open calls.Jeremy Allison2014-05-0921-112/+136
| | | | | | | | | | | | | | | Add a return parameter of struct smb_create_returns *cr to cli_ntcreate() cli_ntcreate_recv() cli_nttrans_create() cli_nttrans_create_recv() Always pass in NULL for now. This fixes the create API to always fully return the data the server has given back to us on the open file to the caller. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: client - rename 'struct smb2_create_returns' to 'struct ↵Jeremy Allison2014-05-092-3/+3
| | | | | | | smb_create_returns' so we can use this in SMB1 create returns as well. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture3: local-messaging-read3Volker Lendecke2014-05-084-0/+203
| | | | | | | | | | | | | | | This is a testcase for the rpc-style messaging nested event context. We have to fork here: The nested event context does not reply to the PING message, it only listens for the PONG response. But that's the point of the patches: Correctly pick just one message in a nested event context. I think this is the best we can do with nested event contexts. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu May 8 11:32:44 CEST 2014 on sn-devel-104
* messaging3: Relax the self-send check a bitVolker Lendecke2014-05-081-1/+2
| | | | | | | | | In the future we will have multiple task id's per process. They should all be able to benefit from the self-send local optimization. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Factor out the self-send checkVolker Lendecke2014-05-081-2/+8
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Push down the self-send callbackVolker Lendecke2014-05-082-53/+95
| | | | | | | | | | | | | | | In the messaging_read receivers we already defer the callback: We need to reply on potentially different tevent contexts, thus the defer_callback. The callback case in messaging_dispatch_rec was direct before this patch. This changes messaging_dispatch_rec to also defer the callback in the self-send case. Now we need only two roundtrips in local-messaging-read1 :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture3: Fix local-messaging-read1Volker Lendecke2014-05-081-3/+6
| | | | | | | | | Now that we defer requests in dispatch_rec, we need 3 rounds to finish the requests Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Fix messaging_filtered_read_sendVolker Lendecke2014-05-081-0/+15
| | | | | | | | | | | | | If we register an additional tevent context, we can now properly do nested event contexts, listening for just one message type inside a tevent_req_poll. At this point this only enhances things without ctdb, but I'm working fixing that soon. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Add messaging_dgm_register_tevent_contextVolker Lendecke2014-05-082-0/+12
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Enhance poll_funcs_tevent for multiple tevent_contextsVolker Lendecke2014-05-086-41/+398
| | | | | | | | | | | | | | | | | | With this patch it will be possible to use nested event contexts with messaging_filtered_read_send/recv. Before this patchset only the one and only event context a messaging_context is initialized with is able to receive datagrams from the unix domain socket. So if you want to code a synchronous RPC-like operation using a nested event context, you will not see the reply, because the nested event context does not have the required tevent_fd's. Unfortunately, this patchset has to add some advanced array voodoo. The idea is that state->watches[] contains what we hand out with watch_new, and state->contexts contains references to the tevent_contexts. For every watch we need a tevent_fd in every event context, and the routines make sure that the arrays are properly maintained. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Add comments about not touching "waiters"Volker Lendecke2014-05-081-0/+16
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Fix 80-char line limitVolker Lendecke2014-05-081-5/+9
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: Use messaging_filtered_readVolker Lendecke2014-05-081-21/+21
| | | | | | | | | | This does not really save any code lines, but IMHO the code is simpler this way. Also, in case we have lots of watchers this will be slightly cheaper, because we don't have to re-establish a tevent_req. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Add messaging_filtered_readVolker Lendecke2014-05-082-25/+111
| | | | | | | | This delegates the decision whether to read a message to a callback Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-krb5: Limit search for old kvno to 8bitsChristof Schmitt2014-05-081-2/+5
| | | | | | | | | | | | Some keytab files store the kvno only in 8bits. Limit the compare to 8bits, so that we don't miss old keys and delete them. This fixes the problem that updates to the keytab file removed all previous keys. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Thu May 8 00:54:15 CEST 2014 on sn-devel-104
* param: Use an explicit talloc_stackframe() in lp_load_ex for clarity and ↵Andrew Bartlett2014-05-071-4/+9
| | | | | | | | | | certainty Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed May 7 22:14:21 CEST 2014 on sn-devel-104
* param: Use an explicit talloc_stackframe() in lp_do_parameter for clarity ↵Andrew Bartlett2014-05-071-3/+10
| | | | | | | and certainty. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: correctly return false when parsing invalid octal in lp_do_parameterGarming Sam2014-05-071-0/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: remove unnecessary get_parametric s3 helper functionGarming Sam2014-05-072-15/+0
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove unused get_parametrics_by_serviceGarming Sam2014-05-071-51/+0
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>