summaryrefslogtreecommitdiffstats
path: root/source3/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* s3-prefork: Allow better management of allowed_clientsSimo Sorce2011-08-212-5/+54
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-prefork: Fix cast warning.Andreas Schneider2011-08-211-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* Ensure we never wait past absolute entime to do a get_cached_ldap_connect().Jeremy Allison2011-08-201-8/+15
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Aug 20 20:09:37 CEST 2011 on sn-devel-104
* Remove the tortured logic in another_ldap_try() and turn it intoJeremy Allison2011-08-191-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).
* Factor out the ldap_get_option calls into a function.Jeremy Allison2011-08-191-20/+14
|
* Simplify the logic on the another_ldap_try() loops by breakingJeremy Allison2011-08-191-95/+105
| | | | early out of the loop on success.
* Move the alarm setup/teardown out of another_ldap_try() and into separateJeremy Allison2011-08-191-48/+43
| | | | | functions that bracket the another_ldap_try() loop. We now never leave a dangling alarm pending on success.
* Allow the timeout pointer to ldap_search_ext_s() to be NULL if ↵Jeremy Allison2011-08-191-4/+8
| | | | lp_ldap_timeout() == 0.
* Make it clear the time here is an absolute endtime. Don't set the alarm if ↵Jeremy Allison2011-08-191-15/+35
| | | | the LDAP timeout is zero.
* Always remove the alarm before changing the handler, not the other way around.Jeremy Allison2011-08-191-1/+1
|
* Remove old_handler as alarms can't be nested. Use SIG_IGN instead.Jeremy Allison2011-08-191-4/+2
|
* Change got_alarm from bool to the correct type of SIG_ATOMIC_T.Jeremy Allison2011-08-191-3/+3
|
* Re-arrange the optimization to reduce tdb fcntl calls if smbd is notIra Cooper2011-08-201-1/+5
| | | | | | | | clustered. procid_is_me() is much cheaper to test and can optimize up to 50% of the calls to serverid_exists(). Volker please check. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Aug 20 01:15:07 CEST 2011 on sn-devel-104
* s3:dbwrap_ctdb: improve transaction start/commit/cancel debuggingMichael Adam2011-08-151-2/+8
| | | | | * also log nesting transaction start/commit/cancel * unify transaction log messages slightly
* s3:lib: fix a comment in tdb_unpack()Michael Adam2011-08-151-1/+1
|
* s3: avoid reading past the end of buffer in tdb_unpack 'f' if zero ↵Gregor Beck2011-08-151-1/+1
| | | | | | termination is missing Signed-off-by: Michael Adam <obnox@samba.org>
* s3: avoid reading past the end of buffer in tdb_unpack 'P' if zero ↵Gregor Beck2011-08-151-1/+3
| | | | | | termination is missing Signed-off-by: Michael Adam <obnox@samba.org>
* s3-prefork: Do not use mmap/mremap/munmap directlySimo Sorce2011-08-151-9/+11
| | | | | | | | Use the wrappers in util.h as they deal with trying to do the best they can on platfroms that do not support mmap extensions. Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Mon Aug 15 04:13:51 CEST 2011 on sn-devel-104
* s3-messaging: Fix messaging classes.Simo Sorce2011-08-111-8/+11
| | | | | | | | | | | | This has been broken since ff0ac5b0 (May 2007). Basically all messages were belonging to the General class except for CTDB messages. This fixed the message_send_all() function to correctly compute the class, and fixes registrations to include all they need to cope with the fact not all messages are of calss general (registrations rotted a bit because as long as FLAG_MSG_GENERAL was defined the process woould receive all messages). Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-messaging: Remove obsolete class.Simo Sorce2011-08-111-2/+0
| | | | | | | The FLAG_MSG_PRINT_NOTIFY class is actually obsolete and never used, as the only message belonging to it is not used either. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3: Fix some typos -- Simo, please checkVolker Lendecke2011-08-101-7/+7
|
* s3-prefork: Fix use of child id.Simo Sorce2011-08-101-2/+2
| | | | | | | | | Children Ids must start at 1 as 0 represent the father. Also fix callbacks that restart logs to use a procedd global variable that holds the Id so that they work correctly both fot the parent process and the children. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Pass the child a child_idSimo Sorce2011-08-102-2/+3
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Return tsocket_address for client and serverSimo Sorce2011-08-102-25/+63
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Pass messaging context around tooSimo Sorce2011-08-102-5/+17
| | | | | | Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Set up a SIGCHLD handler by defaultSimo Sorce2011-08-102-13/+80
| | | | | | | | | | | We need to properly handle preforked children so it is better to just do that automatically. If the parent needs/wants to intercept SIGCHLD events it can set a callback that will be called by the prefork code once the internal cleanup function that checks all prefork children has been executed. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Provide a cleanup functionSimo Sorce2011-08-102-17/+21
| | | | | | | This way the parent doesn't need to know how to handle dead children and keeps all of that within the prefork abstraction. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Inline Doxygen DocumentationSimo Sorce2011-08-101-0/+160
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: better timing out semanticsSimo Sorce2011-08-101-4/+14
| | | | | | | | | | | | | | | If this child has no clients, let the lock functions block for 1 second, and then immediately reschedule the operation. This means we catch the lock as soon as possible on a free child. If, instead, we are already serving a client, we want to be non blocking, so we timeout immediately on getting the lock, and then we sleep a 1/10th of a second. This means that a busy child will be slightly slower on picking up the lock, but we won't block the existing client from communicating with us as we immediately react to activity on the already opened file handler. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: add support for multiple listning file descriptorsSimo Sorce2011-08-102-90/+73
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: provide way to send a signal to all childrenSimo Sorce2011-08-102-0/+15
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: provide means to expand the pool sizeSimo Sorce2011-08-102-0/+33
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: add way to manage number of clients per childSimo Sorce2011-08-102-3/+38
| | | | | | | | The allowed_clients var is a parent managed variable that tell children how many clients they are allowed to handle at the same time. This way children can overcommit but within parent controlled limits. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: add asynchronous functionsSimo Sorce2011-08-102-1/+267
| | | | | | To get a client connection it is now possible to use asynchronous functions. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: implement prefork frameworkSimo Sorce2011-08-102-0/+578
| | | | | | | Primarily built for forked off rpc service daemons, but not tied to rpc services and generic enough to be used elsewhere easily. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3: Remove an unnecessary includeVolker Lendecke2011-08-101-1/+0
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Aug 10 18:10:39 CEST 2011 on sn-devel-104
* s3:lib/events: Fix a bug in run_poll_events().Stefan Metzmacher2011-08-091-0/+4
| | | | | | | | | | | | | | Ignore fd events without EVENT_FD_READ or EVENT_FD_WRITE also in run_events_poll(). They are ignore when building the array for the syscall in event_add_to_poll_args(), so we need to ignore them run_events_poll() too. metze Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Aug 9 10:11:54 CEST 2011 on sn-devel-104
* s3:smbconf let drop leave the smbconf key in place to match a virgin ↵Gregor Beck2011-08-081-1/+1
| | | | | | registry.tdb Signed-off-by: Michael Adam <obnox@samba.org>
* s3/ldap: delay the ldap search alarm termination a bitBjörn Jacke2011-08-051-2/+13
| | | | | | | | | do the alarm termination of the the ldap search a bit delayed so the LDAP server has a chance to tell us that the time limit was reached and the search was abandoned. If the search is terminated this way we also get the correct LDAP return code in the logs. If alarm() stops the search the ldap search routine will report that the LDAP server is down which would trigger us to rebind to the server needlessly which we also want to avoid.
* s3-auth remove sanitized_username from auth_serversupplied_infoAndrew Bartlett2011-08-031-8/+0
| | | | | | | | | | | This structure element was only written to, not read. It is filled into the companion structure, auth_session_info() by create_local_token(). Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3: Make map_open_params_to_ntcreate() available in lib/Volker Lendecke2011-07-291-0/+148
|
* s3: Make is_executable() available in lib/Volker Lendecke2011-07-291-0/+17
|
* s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam2011-07-2916-13/+151
| | | | | Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
* s3:dbwrap: move db_is_local() from dbwrap.c to dbwrap_open.cMichael Adam2011-07-293-32/+33
|
* s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam2011-07-299-71/+182
| | | | | | Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and make the fallbacke implementation functoins non-static and create a dbwrap_private.h header file that contains their prototypes.
* s3:g_lock: explicitly include dbwrap.hMichael Adam2011-07-291-0/+1
|
* s3:dbwrap: explicitly include dbwrap.h in dbwrap_ctdb.cMichael Adam2011-07-291-0/+1
| | | | | | This used to come in via g_lock.h Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
* s3:libsmbconf: use lp_load_global() in the testsuiteMichael Adam2011-07-281-6/+1
|
* s3:libnetapi: use lp_load_global()Michael Adam2011-07-281-1/+1
|
* s3:lib change default share security access maskChristian Ambach2011-07-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | when there is no share SD set, the default share SD that is used e.g. for the output of sharesec -v defaults to a value that is not equivalent to the desired FULL access. This is a more or less a cosmetical follow-up for the patches in Bug #8201 that makes them more consumeable by printing FULL (that is what the user expects) instead of a bitmask in hexadecimal form. previous output: REVISION:1 OWNER:(NULL SID) GROUP:(NULL SID) ACL:S-1-1-0:ALLOWED/0/0x101f01ff with patch: REVISION:1 OWNER:(NULL SID) GROUP:(NULL SID) ACL:S-1-1-0:ALLOWED/0/FULL Autobuild-User: Christian Ambach <ambi@samba.org> Autobuild-Date: Tue Jul 26 15:57:55 CEST 2011 on sn-devel-104