summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2011-10-04s3:lib/util: make sure panic action can attach a debugger on ubuntu (>=10.10)Stefan Metzmacher1-0/+11
By default user processes can't attach a debugger to a process. So explicitly allow that for all child processes, before calling the panic action script. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Oct 4 12:51:35 CEST 2011 on sn-devel-104
2011-09-30s3: Fix a C++ warningVolker Lendecke1-1/+2
2011-09-30s3: Fix a C++ warningVolker Lendecke1-1/+2
2011-09-28s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ ↵Michael Adam1-2/+1
record in traverse It did not compare the last charcter (usually '\0') Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Sep 28 16:54:59 CEST 2011 on sn-devel-104
2011-09-28s3-messaging Do not ever send a kill to -1Andrew Bartlett1-0/+3
This from a report by Olaf Flebbe <o.flebbe@science-computing.de> Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Sep 28 00:23:44 CEST 2011 on sn-devel-104
2011-09-27s3-messaging Ensure that the message is of the correct legnthAndrew Bartlett1-1/+1
By using ndr_pull_struct_blob_all we are more robust against wrongly formatted messages. Andrew Bartlett
2011-09-23build: Fix waf build on MacOS XAndrew Bartlett1-1/+2
The -framework CoreFoundation is required by the charset_macosxfs module The system/time.h header is required to access the replacement clock_gettime() Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Sep 23 10:58:02 CEST 2011 on sn-devel-104
2011-09-23build: avoid util.h as a public header name due to conflict with MacOSAndrew Bartlett1-1/+1
2011-09-23s3-winbindd: add support for idmap type WBC_ID_TYPE_BOTHAndrew Tridgell2-1/+58
this allows the s3 code to understand and cache responses from the s4 winbindd which may include a single SID mapped to both a uid and a gid Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Sep 23 01:47:54 CEST 2011 on sn-devel-104
2011-09-23lib/util: move some timespec helpers from source3 to the toplevelStefan Metzmacher1-146/+0
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Sep 23 00:15:31 CEST 2011 on sn-devel-104
2011-09-21s3-netapi: allow to use default krb5 credential cache for libnetapi users.Günther Deschner2-8/+23
Guenther
2011-09-20s3:dbwrap_ctdb: skip the internal __db_sequence_number__ key from ↵Michael Adam1-0/+26
(persistent) traverse and traverse_read This is is used internally in the persistent transactions and should not surface. Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Tue Sep 20 07:59:20 CEST 2011 on sn-devel-104
2011-09-20s3:g_lock: add a missing \n to a debug message in g_lock_initMichael Adam1-1/+1
2011-09-14util_tdb: return -1/0 from lock_with_timeout functions.Rusty Russell1-2/+2
Keeps the tdb2 API change (which returns error codes, rather than -1) localized. The function returns -1 down the other path, so make it consistent. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-09-14dbwrap_tdb: handle tdb2 return values properly.Rusty Russell1-4/+4
TDB2 versions of tdb_parse_record etc return an error code, not -1. Turn those into -1/0 in dbwrap_tdb to insulate the rest of the code from that change. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-09-14tdb_compat: adapt to tdb2 API change.Rusty Russell1-3/+4
Add the ecode arg to all the log functions, and log it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-09-07s3:dbwrap_ctdb: improve error message in transaction destructorGregor Beck1-1/+2
Signed-off-by: Michael Adam <obnox@samba.org>
2011-09-07s3: let g_lock_unlock() return more specific status codes on failureGregor Beck1-2/+2
Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-31s3:lib S-1-5-9 is "Enterprise Domain Controllers"Christian Ambach1-1/+1
and not ServerLogon
2011-08-31s3:lib remove duplicate entry for "Anonymous Logon"Christian Ambach1-1/+0
2011-08-31s3:lib add S-1-5-17 to well-known SID listChristian Ambach1-0/+1
http://support.microsoft.com/kb/243330/en-us says the name is "This organization", but Windows 2008 says IUSR Picking the Windows 2008 variant as 'This Organization' would be duplicate to S-1-5-15
2011-08-31s3:lib add some more well-known sidsChristian Ambach1-0/+3
add S-1-3-2/Creator Owner Server, S-1-3-3/Creator Group Server and S-1-3-4/Owner Rights to the well-known SID list
2011-08-31s3:lib add new well-known SIDs for BUILTINChristian Ambach1-0/+8
Distributed COM Users, Cryptographic Operators, Event Log Readers and Certificate Service DCOM Access were missing from the BUILTIN well-known SID list
2011-08-30s3: Silence some warningsVolker Lendecke3-0/+56
Rusty, please suggest a proper fix for this. Thanks, Volker Lendecke Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Aug 30 19:16:14 CEST 2011 on sn-devel-104
2011-08-29s3-lib: If we create a pipe socket, don't start to listen.Andreas Schneider1-6/+0
The create_pipe_sock() function should only create the socket as the name states and not start to listen on it too. We should start to listen on in the individual places as we need different backlog values. Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Mon Aug 29 13:21:43 CEST 2011 on sn-devel-104
2011-08-25s3:dbwrap_tdb: correctly catch the error from the return code of tdb_parse ↵Michael Adam1-1/+6
in db_tdb_fetch()
2011-08-25s3: Remove a bogus commentVolker Lendecke1-4/+0
2011-08-25s3: Fix some nonempty blank linesVolker Lendecke1-3/+3
2011-08-22s3: Slightly simplify serverid_existsVolker Lendecke1-1/+1
procid_is_me() works fine in the clustering case as well Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Aug 22 21:28:13 CEST 2011 on sn-devel-104
2011-08-21s3-passdb: Keep caches coherentAndreas Schneider2-1/+16
When deleting a user send a message to all interested parties so they can purge their caches. Otherwise some processes may positively respond with a cached getpwnam, when the user have actully been removed. Without this some tests that remove and then immediately create users are flakey. Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-id_cache: Use better names for id cache management opsAndreas Schneider2-14/+14
The IDMAP term is normally associated with Winbind's idmap stuff. These functions deal with id caching not id mapping. Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-id_cache: Move id caches mgmt out of smbdAndreas Schneider2-0/+222
We must leave the MSG_IDMAP_KILL operation in SMBD as it uses smbd specific internal globals and makes sense only in the context of a smbd daemon. The rest is moved under lib/ as we need to deal with id cache cleanups in other daemons too (like lsasd). Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: Listening fds must be in non-blocking modeSimo Sorce2-0/+5
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: Fix code to retire childrenSimo Sorce3-11/+16
We have to be more careful when retiring children. We cannot stop accepting connections as soon as the server tells us to quit because if max_children is reached and we still have clients connected, the server will not be able to spawn new children until one exits. And children will not exit until all the clients closed the connections. So we keep operating past our recall until we have 0 connections. Also do not try to recall children that still have >= 1 clients connected, they couldn't anyway. Also use messaging to warn children and not SIGHUP. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: Add parent->client messagingSimo Sorce3-0/+39
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: Improve error detection when handling new connectionsSimo Sorce1-11/+23
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: Improve heuristicsSimo Sorce3-30/+52
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: add a few more utility functionsSimo Sorce2-0/+26
Add a few util functions children side so that daemons do not have to care about properly setting num_clients and state. Let a common helper do it so that they are all consistent. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefrok: Handle only valid childrenSimo Sorce1-4/+19
Children that are about to exit shouldn't be counted as a source of connections, and also makes no sense to chenge their allowances if they are about to exit. Also children with negative num_clients are faulty, exclude them as well. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: Fix worker flags handling.Simo Sorce2-7/+20
We can't have a clear idea of wether the worker is IDLE or BUSY. The only things we can tell is if it is Alive, whether it is currently Accepting connections or wether it is Exiting soon. Remove PF_WORKER_IDLE, PF_WORKER_BUSY and replace their use with PF_WORKER_ALIVE. Also properly assign PF_WORKER_ACCEPTING so that users of the API can rely on the flag. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: do not use a lock_fd, just race on accept()Simo Sorce2-375/+21
We used a lock mimicking what apache does for preforked children. But it doesn't work properly in our case because we do not stop once a request has been served. Clients are allowed to perform multiple requests and keep the connection open. This means that if we allow multiple clients per children, then a child could take the lock and then be asked to do a long or even locking operation by a client it already is serving. This woulkd cause the whole server to deadlock, as the child is now busy and also holding on the lock. Using a race on accept() by having a tevent_fd on the listening socket wait for read events we never deadlock. At most we cause a bit of contention among children. But in the generic case connections are much less frequent for us as clients tend to be long lived. So the little contention we may have is not a big deal. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: Add common utilities for daemonsSimo Sorce2-0/+166
Daemons using the prefork infrastructure may want to use these utils to configure and manage a pool of children. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: Allow better management of allowed_clientsSimo Sorce2-5/+54
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: Fix cast warning.Andreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-20Ensure we never wait past absolute entime to do a get_cached_ldap_connect().Jeremy Allison1-8/+15
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Aug 20 20:09:37 CEST 2011 on sn-devel-104
2011-08-19Remove the tortured logic in another_ldap_try() and turn it intoJeremy Allison1-58/+70
get_cached_ldap_connect(), which much better describes it's function. Now we always break at the right places in the loop, we can replace the while (another_ldap_try(ldap_state, &rc, &attempts, abs_endtime)) construct with simply while (1).
2011-08-19Factor out the ldap_get_option calls into a function.Jeremy Allison1-20/+14
2011-08-19Simplify the logic on the another_ldap_try() loops by breakingJeremy Allison1-95/+105
early out of the loop on success.
2011-08-19Move the alarm setup/teardown out of another_ldap_try() and into separateJeremy Allison1-48/+43
functions that bracket the another_ldap_try() loop. We now never leave a dangling alarm pending on success.
2011-08-19Allow the timeout pointer to ldap_search_ext_s() to be NULL if ↵Jeremy Allison1-4/+8
lp_ldap_timeout() == 0.