summaryrefslogtreecommitdiffstats
path: root/source3/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* smbd: Fix CID 1035365 Buffer not null terminatedVolker Lendecke2013-11-111-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Fix CID 1035366 Buffer not null terminatedVolker Lendecke2013-11-111-4/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Use fstring in conn_tdb.cVolker Lendecke2013-11-111-2/+2
| | | | | | | It might be legacy, but as long as we have it, we can make use of it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Use fstring in conn_tdb.hVolker Lendecke2013-11-111-3/+3
| | | | | | | It might be legacy, but as long as we have it, we can make use of it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* netapi: Fix CID 1127344 Uninitialized scalar variableVolker Lendecke2013-11-111-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* s3-smbd_shim: Add become_authenticated_pipe_user().Andreas Schneider2013-10-292-0/+20
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: add cluster_probe_ok() in a new module util_cluster.Michael Adam2013-10-172-0/+66
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd/winbindd: Do an early check if ctdbd is functionalVolker Lendecke2013-10-171-0/+24
| | | | | | | | | This will avoid panic calls when smbd and winbind is started in cluster mode before ctdb is functional. It still logs something sane at debug level 0, but it does not panic and core anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdbd_conn: Remove one call to cluster_fatalVolker Lendecke2013-10-171-1/+0
| | | | | | | | This is during startup of a ctdb connection, thus it is not as important as in other cases to immediately exit to free up resources Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdbd_conn: Remove one call to cluster_fatalVolker Lendecke2013-10-171-1/+2
| | | | | | | | This is during startup of a ctdb connection, thus it is not as important as in other cases to immediately exit to free up resources Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdbd_conn: Lift the cluster_fatal call in get_cluster_vnnVolker Lendecke2013-10-171-1/+3
| | | | | | | We have to report a proper error when ctdbd is not around Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:lib/netapi: do not use rpc_pipe_np_smb_conn()Gregor Beck2013-10-171-1/+1
| | | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add NetWkstaGetInfo.Hans Leidekker2013-10-168-1/+294
| | | | | | | | | | | Modified to include common.h entry for netapitest_wksta function by Kai Blin <kai@samba.org> Signed-off-by: Hans Leidekker <hans@meelstraat.net> Reviewed-by: Kai Blin <kai@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Oct 16 07:00:45 CEST 2013 on sn-devel-104
* build: get rid of vars=locals() in source3/lib/netapi/examples/wscript_buildMichael Adam2013-09-251-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
* libsmbconf:registry: add "state directory" to the list of forbidden parametersMichael Adam2013-09-241-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>
* libsmbconf:registry: clarify the appearance of "includes" in forbidden_namesMichael Adam2013-09-241-1/+7
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libsmbconf:registry: reorganize the validity check and canonicalization of ↵Michael Adam2013-09-241-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>
* libsmbconf:registry: publish smbconf_reg_parameter_is_valid()Michael Adam2013-09-242-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>
* libsmbconf:registry: rework smbconf_reg_parameter_forbidden(), renaming it.Michael Adam2013-09-241-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>
* afs: implement afs_syscall() always, returning -1 if FAKE_KASERVER is not ↵Michael Adam2013-09-231-0/+6
| | | | | | | defined. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* afs: format afs_syscall() properlyMichael Adam2013-09-231-5/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-rpc: use table->name directly in DEBUG contexts.Günther Deschner2013-09-201-1/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* gencache: Avoid a duplicate call to string_term_tdb_dataVolker Lendecke2013-09-091-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
* smbd: Use talloc_pooled_object in cp_smb_filenameVolker Lendecke2013-09-081-16/+32
| | | | | | | Requires new talloc Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Apply some const to pull_file_id_24Volker Lendecke2013-09-062-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Use "mem_ctx" arg in gencache_getVolker Lendecke2013-09-052-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
* lib: Add a "mem_ctx" arg to gencache_get (unused so far)Volker Lendecke2013-09-053-6/+7
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* gencache: Fix SAFE_FREE vs data_blob_freeVolker Lendecke2013-09-051-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add "mem_ctx" to gencache_get_data_blobVolker Lendecke2013-09-051-4/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap_ctdb: Treat empty records as non-existingVolker Lendecke2013-08-282-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>
* Fix bug #10063 - source3/lib/util.c:1493 leaking memory w/ pam_winbind.so / ↵Jeremy Allison2013-08-241-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
* libctdb: Avoid an explicit memsetVolker Lendecke2013-08-161-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
* s3:lib: Factor read_ea_list_entry() and read_nttrans_ea_list() out so they ↵Jeremy Allison2013-08-152-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>
* s3:lib/netapi: make use of lp_cli_maxprotocol()Stefan Metzmacher2013-08-151-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>
* s3:lib: remove unused interpret_protocol()Stefan Metzmacher2013-08-151-25/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove unused "get_peer_name"Volker Lendecke2013-08-121-79/+0
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib: Remove unused "client_name"Volker Lendecke2013-08-121-5/+0
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().Günther Deschner2013-08-051-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>
* s3-libnetapi: pass down ndr_interface_table to pipe_cm() and friends.Günther Deschner2013-08-051-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>
* s3-libnetapi: pass down ndr_interface_table to libnetapi_open_pipe().Günther Deschner2013-08-056-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>
* s3-libnetapi: pass down ndr_interface_table to libnetapi_get_binding_handle().Günther Deschner2013-08-058-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>
* s3:lib/system fix build on AIX 7Christian Ambach2013-08-021-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
* Add ea_list_has_invalid_name() function.Jeremy Allison2013-07-191-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>
* s3-lib: hide incomplete smbXsrv_tcon_global recordsStefan Metzmacher2013-07-091-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>
* s3-lib: fix segf while reading incomplete session info (bug #10003)Björn Baumbach2013-07-092-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>
* s3:lib add mapping for ETXTBSYChristian Ambach2013-06-251-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>
* s3:lib/util_sid_passdb make use of pdb_is_responsible_for_* functionsChristian Ambach2013-06-211-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>
* Re-add umask(0) code removed by commit 3a7c2777ee0de37d758fe81d67d6836a8354825eJeremy Allison2013-06-181-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
* Fix xx_path() - return check from mkdir() is incorrect.Jeremy Allison2013-06-181-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>
* gencache: Simplify gencache_init a bitVolker Lendecke2013-06-141-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>