summaryrefslogtreecommitdiffstats
path: root/source4/lib
Commit message (Collapse)AuthorAgeFilesLines
* CVE-2013-4476: s4:libtls: check for safe permissions of tls private key file ↵Björn Baumbach2013-11-112-0/+33
| | | | | | | | | | | | | | | | | | (key.pem) If the tls key is not owned by root or has not mode 0600 samba will not start up. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Mon Nov 11 13:07:16 CET 2013 on sn-devel-104
* CVE-2013-4476: s4:libtls: Create tls private key file (key.pem) with mode 0600Björn Baumbach2013-11-111-1/+1
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib/messaging: Check the server_id type correctlyAndrew Bartlett2013-09-191-1/+1
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Sep 19 23:19:16 CEST 2013 on sn-devel-104
* registry4: Fix CID 1034911 Dereference before null checkVolker Lendecke2013-08-191-1/+1
| | | | | | | | | curbegin is always != NULL here (curend + 1) and is dereferenced by strchr. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* registry4: Fix CID 1034911 Dereference before null checkVolker Lendecke2013-08-191-1/+1
| | | | | | | | | curbegin is always != NULL here (curend + 1) and is dereferenced by strchr. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-lib/socket: Allocate a the larger sockaddr_un and not just a sockaddr_in ↵Stefan Metzmacher2013-07-241-2/+2
| | | | | | | | | | | | | | | | | | in unixdom_get_my_addr() This caused crashes in _tsocket_address_bsd_from_sockaddr() when we read past the end of the allocation. (similar to commit e9ae36e9683372b86f1efbd29904722a33fea083) Bug: https://bugzilla.samba.org/show_bug.cgi?id=10042 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jul 24 14:37:43 CEST 2013 on sn-devel-104
* s4-lib/socket: Allocate a the larger sockaddr_un and not just a sockaddr_in ↵Andrew Bartlett2013-07-231-2/+2
| | | | | | | | | | | | in unixdom_get_peer_addr() This caused crashes in _tsocket_address_bsd_from_sockaddr() when we read past the end of the allocation. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-libregistry: Improve NULL handling of name.Andreas Schneider2013-03-051-3/+4
| | | | Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4-libregistry: Fix path check and improve while loops.Andreas Schneider2013-03-051-6/+6
| | | | Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4-libregistry: Make sure we don't dereference a NULL pointer.Andreas Schneider2013-03-051-1/+3
| | | | Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4-lib/socket: Return the original EMSGSIZE when sendto() and setsockopt() ↵Andrew Bartlett2013-03-041-1/+1
| | | | | | | | | | | | | | | | both fail This ensures that should we be unable to increase the socket size, we return an error that the application layer above might expect and be able to make as reasonable response to (such as switching to a stream-based transport). This fixes up c692bb02b039ae8fef6ba968fd13b36ad7d62a72. As suggested by metze in https://bugzilla.samba.org/show_bug.cgi?id=9697#c4 Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Handle EMSGSIZE on UNIX domain sockets.Landon Fuller2013-03-021-9/+26
| | | | | | | | | | | | | | | | | | | | | | On some systems (eg, FreeBSD) the default SO_SNDBUF for UNIX domain sockets is to small, and EMSGSIZE is returned. Other systems provide a larger default send buffer, but there is still no guarantee that the buffer will be sized appropriately. This patch modifies the sendto() path to attempt to resize the SO_SNDBUF dynamically upon an EMSGSIZE failure, and then retry the send. This fixes local DCE/RPC errors on FreeBSD, eg: https://lists.samba.org/archive/samba-technical/2013-January/089881.html Signed-Off-By: Landon Fuller <landonf@bikemonkey.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 23:34:03 CET 2013 on sn-devel-104
* Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij2013-03-021-1/+1
| | | | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104
* s4:lib/events: make use of samba_tevent_set_debug()Stefan Metzmacher2013-02-281-35/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4:pyregistry: make use of samba_tevent_context_init()Stefan Metzmacher2013-02-281-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-lib: Don't leak plugin handle on error.Andreas Schneider2013-02-221-0/+1
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s4-policy: Fix memory leaks in push_recursive().Andreas Schneider2013-02-221-14/+26
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s4-registry: Don't leak file descriptor.Andreas Schneider2013-02-221-2/+1
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s4-registry: Don't leak memory on error.Andreas Schneider2013-02-221-0/+7
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s4:lib/com: make use of samba_tevent_context_init()Stefan Metzmacher2013-02-191-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* waf: Make sure we link against samba-util.Andreas Schneider2013-02-141-0/+1
| | | | | | | | | | libcmdline-credentials.so needs samba_getpass() from libsamba-util.so, so we need to link against it. Reviewed-by: Andrew Bartlet <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Feb 14 16:56:29 CET 2013 on sn-devel-104
* pymessaging: Pass around the server_id struct to python callbacks rather ↵Andrew Bartlett2013-01-261-3/+13
| | | | | | | | | | than the tuple This is not used currently, but may avoid going to and from the python types when we do not need to. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* pymessaging: Use correct unsigned types for server ID tuple elememntsAndrew Bartlett2013-01-261-3/+3
| | | | | | | | | This is needed if we start using the top bits of these values. Andrew Bartlett Reviewed-by: Matthieu Patou <mat@matws.net> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Use the new directory_create_or_exist_strict() function.Andreas Schneider2013-01-091-1/+1
| | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:lib/messaging: terminate the irpc_servers_byname() result with ↵Stefan Metzmacher2013-01-092-4/+4
| | | | | | | | server_id_set_disconnected() (bug #9540) Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-regsitry: Check return value of ldb_msg_add_empty().Andreas Schneider2012-12-211-1/+7
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s4-lib: Use directory_create_or_exist() to create messaging dir.Andreas Schneider2012-12-211-1/+6
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s4-socket: Make sure unix socket addresses are null terminated.Andreas Schneider2012-12-121-5/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* cmdline: Use new samba_getpass() function.Andreas Schneider2012-12-031-5/+9
| | | | Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* docs: man regtree: Add missing meta data.Karolin Seeger2012-11-291-0/+3
| | | | | | | | | This avoids warnings during the waf build and removes "FIXME" entries from the manpage. Karolin Reviewed-by: Andreas Schneider <asn@samba.org>
* docs: man regshell: Add missing meta data.Karolin Seeger2012-11-291-0/+3
| | | | | | | | | This avoids warnings during the waf build and removes "FIXME" entries from the manpage. Karolin Reviewed-by: Andreas Schneider <asn@samba.org>
* docs: man regpatch: Add missing meta data.Karolin Seeger2012-11-291-0/+3
| | | | | | | | | This avoids warnings during the waf build and removes "FIXME" entries from the manpage. Karolin Reviewed-by: Andreas Schneider <asn@samba.org>
* docs: man regdiff: Add missing meta data.Karolin Seeger2012-11-291-0/+3
| | | | | | | | | This avoids warnings during the waf build and removes "FIXME" entries from the manpage. Karolin Reviewed-by: Andreas Schneider <asn@samba.org>
* popt_common: Fix typos.Karolin Seeger2012-11-151-2/+2
| | | | | | | | | | Karolin Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Nov 15 01:31:50 CET 2012 on sn-devel-104
* pymessaging: Add irpc_servers_byname() and irpc_all_servers()Andrew Bartlett2012-10-311-0/+99
| | | | | | This will allow python scripts to inspect the process list. Andrew Bartlett
* pymessaging: Use the server_id IDL structure rather than a tupleAndrew Bartlett2012-10-311-5/+20
| | | | | | | This will make it easier to pass this structure in and out. The tuple is still accepted as input. Andrew Bartlett
* imessaging: Add irpc_all_servers() to list all available serversAndrew Bartlett2012-10-312-0/+73
| | | | | | | | This is implemented with a tdb_traverse_read(), and will allow a tool to disover the name and server_id of all Samba processes, as each process registers itself to recieve messages. Andrew Bartlett
* s4-events: Do not vasprintf() the tevent debug messages that will not be shownAndrew Bartlett2012-08-091-4/+6
| | | | | | | This malloc() and free() actually shows up quite high on a call profile of provision of the AD DC. Andrew Bartlett
* s4:libcli/pyerrors: s/PyErr_WERROR_IS_ERR_RAISE/PyErr_WERROR_NOT_OK_RAISE/Stefan Metzmacher2012-08-061-12/+12
| | | | metze
* lib/param: Remove use of lp{cfg,}_socket_address outside the NBT client and ↵Andrew Bartlett2012-07-271-10/+0
| | | | | | | | | server In these other cases, control of the sockets to bind to can be obtained using "bind interfaces only = yes" and "interfaces = ". Andrew Bartlett
* s4-lib/tls: Try socket_send() multiple times to send partial packetsAndrew Bartlett2012-07-181-13/+26
| | | | | | | | | | | | | | | | This works around an artificial limitation in socket_wrapper that breaks some versions of GnuTLS when we return a short write. Instead, keep pushing until the OS will not take it. The correct solution will be to use tls_tstream, but the client code for this is not yet tested and needs the ldap client layer changed to use it. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jul 18 11:23:55 CEST 2012 on sn-devel-104
* s4:registry:regdiff: use existing talloc context for the event contextMichael Adam2012-07-131-1/+1
| | | | | Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Jul 13 02:51:44 CEST 2012 on sn-devel-104
* s4:registry:regdiff: add TALLOC_CTX * argument to open_backend()Michael Adam2012-07-131-6/+7
|
* s4:registry: add a TALLOC_CTX argument to reg_open_remote()Michael Adam2012-07-134-5/+7
|
* s4:registry:testsuite: fix use of non-existent word (existant)Michael Adam2012-06-121-3/+3
|
* build: Add missing deps and make MESSAGING a private libraryAndrew Bartlett2012-06-071-2/+3
| | | | | | | | | To remove finddcs_nbt these missing deps need to be added. These subsystems linked to to implicit dependencies provided by finddcs. Due to the new arrangmenet of subsystems, MESSAGING needs to be a private library to avoid being a source of duplicate symbols. Andrew Bartlett
* s4:lib/events: no longer define TEVENT_COMPAT_DEFINESStefan Metzmacher2012-05-141-3/+0
| | | | metze
* s4:lib/events: remove unused event_context_find() prototypeStefan Metzmacher2012-05-141-1/+0
| | | | metze
* s4:lib: remove unused wscript_build fileMichael Adam2012-05-111-7/+0
| | | | | This only contains a "GENCACHE" subsystem that is not referenced anywhere.
* UTIL_TDB: lowercase name.Jelmer Vernooij2012-05-031-1/+1
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Thu May 3 20:18:22 CEST 2012 on sn-devel-104