summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2013-09-25build: get rid of vars=locals() in source3/lib/netapi/examples/wscript_buildMichael Adam1-2/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Sep 25 00:51:31 CEST 2013 on sn-devel-104
2013-09-24libsmbconf:registry: add "state directory" to the list of forbidden parametersMichael Adam1-0/+1
At the time when the registry configuration was introduced, the registry database file was placed in the "lock directory". So the "lock directory" was added to the list of parameters that may not be changed in the registry configuration (because the next config reload would then load a different registry and drop all the original seetings). Later, "state directory" and "cache directory" were introduced, both defaulting to "lock directory". And the registry's location was changed to "state directory". It slipped my attention that the forbidden parameters for the should have been adapted at the time. So this patch adds "state directory" to the list. It keeps the lock directory, to catch the case where the state directory is not explicitly set, hence defaulting to the "lock directory". Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24libsmbconf:registry: clarify the appearance of "includes" in forbidden_namesMichael Adam1-1/+7
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24libsmbconf:registry: reorganize the validity check and canonicalization of ↵Michael Adam1-14/+19
the input in "setparm" - first check that the name is an smbconf parameter - then check that the parameter is allowed in the registry config - then check that a global parameter is not to be set in a service section - then canonicalize the parameter and value name, thereby checking that the value has valid format Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24libsmbconf:registry: publish smbconf_reg_parameter_is_valid()Michael Adam2-1/+6
So that this does not need to be duplicated.. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24libsmbconf:registry: rework smbconf_reg_parameter_forbidden(), renaming it.Michael Adam1-17/+17
The logic is inverted, the lp_parameter_is_invalid call of smbconf_reg_valname_valid() is included, and the function is renamed to smbconf_reg_parameter_is_valid(). Use the new function everywhere in smbconf registry backend. And remove corresponding reverse function smbconf_reg_valname_valid(). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-23afs: implement afs_syscall() always, returning -1 if FAKE_KASERVER is not ↵Michael Adam1-0/+6
defined. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-09-23afs: format afs_syscall() properlyMichael Adam1-5/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-20s3-rpc: use table->name directly in DEBUG contexts.Günther Deschner1-1/+1
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-09gencache: Avoid a duplicate call to string_term_tdb_dataVolker Lendecke1-4/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Sep 9 17:02:28 CEST 2013 on sn-devel-104
2013-09-08smbd: Use talloc_pooled_object in cp_smb_filenameVolker Lendecke1-16/+32
Requires new talloc Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-06lib: Apply some const to pull_file_id_24Volker Lendecke2-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-09-05lib: Use "mem_ctx" arg in gencache_getVolker Lendecke2-17/+21
Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 5 20:09:21 CEST 2013 on sn-devel-104
2013-09-05lib: Add a "mem_ctx" arg to gencache_get (unused so far)Volker Lendecke3-6/+7
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-05gencache: Fix SAFE_FREE vs data_blob_freeVolker Lendecke1-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-05lib: Add "mem_ctx" to gencache_get_data_blobVolker Lendecke1-4/+9
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-28dbwrap_ctdb: Treat empty records as non-existingVolker Lendecke2-0/+18
This is a patch implementing the workaround Christian mentioned in https://bugzilla.samba.org/show_bug.cgi?id=10008#c5 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10008 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2013-08-24Fix bug #10063 - source3/lib/util.c:1493 leaking memory w/ pam_winbind.so / ↵Jeremy Allison1-2/+4
winbind Don't use talloc_tos() in something that can be linked to in pam_winbindd.so Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Sat Aug 24 02:28:28 CEST 2013 on sn-devel-104
2013-08-16libctdb: Avoid an explicit memsetVolker Lendecke1-2/+1
Give the compiler a chance to use better code. Saves a few bytes of text. 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): Fri Aug 16 01:51:55 CEST 2013 on sn-devel-104
2013-08-15s3:lib: Factor read_ea_list_entry() and read_nttrans_ea_list() out so they ↵Jeremy Allison2-0/+162
can be used by the SMB2 client code. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15s3:lib/netapi: make use of lp_cli_maxprotocol()Stefan Metzmacher1-1/+1
https://bugzilla.samba.org/show_bug.cgi?id=9514 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15s3:lib: remove unused interpret_protocol()Stefan Metzmacher1-25/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-12lib: Remove unused "get_peer_name"Volker Lendecke1-79/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-12lib: Remove unused "client_name"Volker Lendecke1-5/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-05s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().Günther Deschner1-1/+1
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05s3-libnetapi: pass down ndr_interface_table to pipe_cm() and friends.Günther Deschner1-8/+8
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05s3-libnetapi: pass down ndr_interface_table to libnetapi_open_pipe().Günther Deschner6-37/+37
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05s3-libnetapi: pass down ndr_interface_table to libnetapi_get_binding_handle().Günther Deschner8-21/+22
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-02s3:lib/system fix build on AIX 7Christian Ambach1-3/+12
AIX uses struct stat64 with struct timespec64, so direct assignment does not work any more. Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Aug 2 09:47:43 CEST 2013 on sn-devel-104
2013-07-19Add ea_list_has_invalid_name() function.Jeremy Allison1-0/+34
Invalid character list probed from Windows Server 2012. Bug 9992: Windows error 0x800700FE when copying files with xattr names containing ":" Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-07-09s3-lib: hide incomplete smbXsrv_tcon_global recordsStefan Metzmacher1-0/+13
Part of fix for bug #10003 Pair-programmed-with: Björn Baumbach <bb@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-07-09s3-lib: fix segf while reading incomplete session info (bug #10003)Björn Baumbach2-7/+17
Pair-programmed-with: Stefan Metzmacher <metze@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-06-25s3:lib add mapping for ETXTBSYChristian Ambach1-0/+3
add ETXTBSY to the errno->STATUS conversion table. It will be mapped to STATUS_SHARING_VIOLATION Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-06-21s3:lib/util_sid_passdb make use of pdb_is_responsible_for_* functionsChristian Ambach1-15/+34
ask passdb to determine if sid/object should be handled by passdb or not Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2013-06-18Re-add umask(0) code removed by commit 3a7c2777ee0de37d758fe81d67d6836a8354825eJeremy Allison1-2/+7
Without the umask code the pipe permissions are affected by the umask of the calling process. As only smbd currently sets its umask to zero (nmbd and winbindd should do the same) this causes the winbindd pipe to be unavailable to the nss library code unless winbindd is run from an init process that explicitly sets umask to zero. When testing from the command line this can be hard to track down :-). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jun 18 04:31:27 CEST 2013 on sn-devel-104
2013-06-18Fix xx_path() - return check from mkdir() is incorrect.Jeremy Allison1-3/+8
This is very old code, but mkdir() fails with -1, not 0. Only print the error message is mkdir failed with anything other than EEXIST. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2013-06-14gencache: Simplify gencache_init a bitVolker Lendecke1-13/+16
Use the implicit cleanup facility CLEAR_IF_FIRST provides Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-06-11lib: Remove an unused variableVolker Lendecke1-1/+0
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 Jun 11 21:52:09 CEST 2013 on sn-devel-104
2013-06-03s3:lib/ctdb_packet use sys_send in packet_fd_writeChristian Ambach1-1/+1
use the signal safe variant here to prevent spurious errors when running with CTDB and a signal comes in Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Mon Jun 3 20:01:22 CEST 2013 on sn-devel-104
2013-05-28Remove lib/netapi autoconf build system, this is now build with wafAndrew Bartlett2-421/+0
Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-18swat: Remove swat.Kai Blin1-10/+0
Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Kai Blin <kai@samba.org> Autobuild-Date(master): Sat May 18 16:32:38 CEST 2013 on sn-devel-104
2013-05-17s3:lib/ctdb_conn make sure we are root before connecting to CTDBChristian Ambach1-1/+14
CTDB socket is only reachable for root, make sure we are root when trying to connect to it Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Fri May 17 13:16:37 CEST 2013 on sn-devel-104
2013-05-17lib: Add before/after hooks to async_connectVolker Lendecke2-3/+3
This will facilitiate [un]become_root for smbd to connect safely to ctdbd. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2013-05-16s3:lib/dbwrap add missing curly bracesChristian Ambach1-2/+4
violation of README.Coding Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-12lib: Fix CID 241650 Sizeof not portableVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun May 12 17:44:55 CEST 2013 on sn-devel-104
2013-05-12pthreadpool: Fix CID 710828 Sizeof not portableVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2013-05-06s3:lib fix wrong usage of PRIu64 in sscanfChristian Ambach1-1/+1
Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-04-26dbwrap: Allow dbwrap_record_watch_recv to not lock the recordVolker Lendecke1-0/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-19Ensure drain_socket() operates on a blocking socket.Jeremy Allison1-2/+15
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-18util_tdb: add function tdb_data_string()Gregor Beck1-0/+33
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>