summaryrefslogtreecommitdiffstats
path: root/source3/lib
Commit message (Collapse)AuthorAgeFilesLines
* s3-server_id Add task_id to server_id to match Samba4Andrew Bartlett2011-06-092-0/+8
| | | | | | | | | | This will allow this structure to be shared, and allow us to create a common messaging system between all Samba processes. Samba4 uses the task_id to indicate the different tasks within a single unix process. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()Andrew Bartlett2011-06-093-3/+3
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_MEMDUP isn't standard talloc.
* s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()Andrew Bartlett2011-06-096-11/+11
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_ARRAY isn't standard talloc.
* s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2011-06-0918-23/+23
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
* s3-talloc Change TALLOC_P() to talloc()Andrew Bartlett2011-06-099-15/+15
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
* s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett2011-06-098-14/+14
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
* s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()Andrew Bartlett2011-06-097-11/+11
| | | | | | | Using the standard macro makes it easier to move code into common, as TALLOC_REALLOC_ARRAY isn't standard talloc. Andrew Bartlett
* s3-talloc Remove unused TALLOC zeronull functions and macro definitionsAndrew Bartlett2011-06-091-105/+0
| | | | | | These have been under #if 0 for a long time now. Andrew Bartlett
* s3-waf: Fix pthreadpool build which needs librt now.Andreas Schneider2011-06-061-1/+1
| | | | | Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Mon Jun 6 23:31:09 CEST 2011 on sn-devel-104
* s3: Fix two debug messagesVolker Lendecke2011-06-061-2/+2
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Jun 6 14:11:06 CEST 2011 on sn-devel-104
* s3/pthreadpool: replace bad portable gettimeofday by clock_gettimeBjörn Jacke2011-06-061-4/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* lib/util use modules_path(), data_path() and shlib_ext() from source3Andrew Bartlett2011-06-062-41/+4
| | | | | | | | | | This brings these helpful utility functions in common, as they are not based on either loadparm system. (The 'modules dir' parameter from Samba4 will shortly be removed, so there is no loss in functionality) Andrew Bartlett
* s3-lib Remove unused lib_path()Andrew Bartlett2011-06-061-13/+0
|
* Add the same fix to the S3 event backend as the previous commit added to the ↵Jeremy Allison2011-06-041-1/+14
| | | | | | | | | tevent poll backend. Metze please check ! Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Jun 4 00:27:37 CEST 2011 on sn-devel-104
* Revert "s3: Mark sockets in error state writable"Volker Lendecke2011-06-011-23/+0
| | | | | | | This reverts commit 5f6f71956460d6840c1433b59e20555268b622ac. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Jun 1 14:56:25 CEST 2011 on sn-devel-104
* lib/util/time.c: timeval_current_ofs_usecRusty Russell2011-06-011-7/+7
| | | | | | | | | | | | | | | Several places want "microseconds from current time", and several were simply handing "usecs" values which could be over a million. Using a helper to do this is safer and more readable. I didn't replace any obviously correct callers (ie. constants). I also renamed wait_nsec in source3/lib/util_sock.c; it's actually microseconds not nanoseconds (introduced with this code in Volker's 19b783cc Async wrapper for open_socket_out_send/recv). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* Change sys_getcd() to take no arguments and always return malloc'ed memory ↵Jeremy Allison2011-06-011-7/+34
| | | | | | (or NULL). Part of the efforts to remove PATH_MAX on modern systems.
* s3: fix more -Wunused-but-set-variable build warnings.Günther Deschner2011-06-011-3/+0
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Jun 1 00:29:30 CEST 2011 on sn-devel-104
* s3: Mark sockets in error state writableVolker Lendecke2011-05-311-0/+23
| | | | | | | | | | | | | | | | | Without this patch, when a socket only has a write event pending, we will never detect an error condition. I've seen winbind doing 12:19:13.659964 gettimeofday({1306837153, 659984}, NULL) = 0 <0.000016> 12:19:13.660109 poll([{fd=35, events=POLLOUT}, {fd=32, events=POLLIN|POLLHUP}], 2, 9996) = 1 ([{fd=35, revents=POLLERR|POLLHUP}]) <0.000015> 12:19:13.660253 gettimeofday({1306837153, 660269}, NULL) = 0 <0.000013> 12:19:13.660298 poll([{fd=35, events=POLLOUT}, {fd=32, events=POLLIN|POLLHUP}], 2, 9996) = 1 ([{fd=35, revents=POLLERR|POLLHUP}]) <0.000015> for a while when trying to connect to a DC when the socket had died already. Volker Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue May 31 20:59:10 CEST 2011 on sn-devel-104
* s3: add _LIB_IDMAP_CACHE_H_ guard to lib/idmap_cache.hMichael Adam2011-05-311-0/+5
|
* s3: add GPL/Copyright header to lib/idmap_cache.hMichael Adam2011-05-311-0/+20
|
* s3:lib/eventlog/proto.h: add _LIB_EVENTLOG_PROTO_H_ guardMichael Adam2011-05-311-0/+5
|
* s3:lib/eventlog/proto.h: add GPL/Copyright headerMichael Adam2011-05-311-0/+22
|
* s3-lib Move source3-specific malloc replacements into a seperate fileAndrew Bartlett2011-05-312-143/+171
| | | | | | | This will make it easier to create a dep tree for otherwise simple libraries. Andrew Bartlett
* lib/util Move sys_memalign into lib/util/system.cAndrew Bartlett2011-05-311-36/+0
|
* s3-lib Improve indentation of errmap_unixAndrew Bartlett2011-05-311-36/+36
| | | | | | | | This also makes it easier to compare and contrast with the source4 version, because the differences here matter, and need to be resolved with care. Andrew Bartlett
* s3-lib: Use ARRAY_SIZE() to walk the error mapping tablesAndrew Bartlett2011-05-311-6/+4
| | | | | | This gives a constant termination condition, and may help the compiler. Andrew Bartlett
* s3-build Specify more of the smbconf dependenciesAndrew Bartlett2011-05-312-163/+162
| | | | | | | | | | | | | This brings more functions into util_names.c, and util_names.c into PARAM_WITHOUT_REG_SRC. This is not yet a full list, that would formalise the implicit dependency loop. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue May 31 01:43:37 CEST 2011 on sn-devel-104
* s3-build Create dbwrap_util subsystemAndrew Bartlett2011-05-312-61/+64
| | | | | | | | This contains the functions from dbwrap that don't require lp_ functions, and can therefore be put into a library (without dependency loops). Andrew Bartlett
* s3-lib Move free_namearray() into it's own fileAndrew Bartlett2011-05-312-16/+39
| | | | | | | This makes it easier to have conn_smbd strictly depend on all it's dependencies. Andrew Bartlett
* s3-lib Move realloc based string substitution functions out of util_str.cAndrew Bartlett2011-05-313-123/+148
| | | | | | | This makes the dependency set for source3/lib/util_str.c simpiler, which in turn makes it easier to build a dependency tree. Andrew Bartlett
* s3-lib Move sstring_sub() to it's only user and make staticAndrew Bartlett2011-05-311-27/+0
| | | | | | | This should not be used more generally, as it is specifically not for multibyte strings, and uses malloc rather than talloc. Andrew Bartlett
* s3-param Move init_iconv() to loadparm.cAndrew Bartlett2011-05-311-14/+0
| | | | | | This assists with some dependency loops Andrew Bartlett
* libcli/security: move secdesc.c to the top level libcli/securityAndrew Bartlett2011-05-311-712/+0
| | | | | | | This code does not rely on lp_ or other source3 only functions, so can be part of the common library. Andrew Bartlett
* s3-globals Remove smbd_event_context() (use server_event_context())Andrew Bartlett2011-05-311-5/+0
| | | | | | | | This has been a wrapper around server_event_context() for some time now, and removing this from dummmysmbd.c assists with library dependencies. Andrew Bartlett
* s3-param split service.c into param and smbd componentsAndrew Bartlett2011-05-312-11/+35
| | | | | | | | | | | The dependency chain of find_service can't be satisfied sensibly outside smbd, so don't include this in the main 'param' subsystem. Also remove the duplicate find_service() and conn_snum_used() from dummysmbd.c: The WAF build does not need these dummies any more, but file. Andrew Bartlett
* s3-lib Move string_init functions into their own fileAndrew Bartlett2011-05-312-52/+77
| | | | | | | | These have not been moved in common, as they are not talloc-based, but it helps with dependencies if these are seperated from the rest of util_str.c Andrew Bartlett
* s3-smbd provide struct smbd_server_connection * to conn_snum_usedAndrew Bartlett2011-05-311-1/+2
| | | | | | | | | | | | | | | | This provides the 'sconn' parameter to this key functions, that is currently duplicated in dummysmbd.c, which causes duplicate symbol issues in the waf build. This has natrually caused a number of consequential changes across the codebase, includning not passing a messaging context into initial reload_services(): This causes problems because the global smbd_server_connection isn't yet set up, as there isn't a connection here, just the initial process. Andrew Bartlett
* s3: fix some -Wunused-but-set-variable build warnings.Günther Deschner2011-05-301-2/+0
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Mon May 30 17:41:18 CEST 2011 on sn-devel-104
* s3: Fix Coverity ID 2573: UNUSED_VALUEVolker Lendecke2011-05-201-2/+3
| | | | Andrew B., please check!
* Fix Bug 8152 - smbd crash in release_ip()Christian Ambach2011-05-191-0/+5
| | | | | | | | release_ip() needs the private_data, but it was never saved away to feed it into release_ip() later Autobuild-User: Christian Ambach <ambi@samba.org> Autobuild-Date: Thu May 19 21:21:14 CEST 2011 on sn-devel-104
* s3-lib Replace StrnCaseCmp() with strncasecmp_m()Andrew Bartlett2011-05-183-63/+3
| | | | | | | strncasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
* s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett2011-05-187-93/+10
| | | | | | | strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
* is_my_ipaddr() should recognise loopback addresses as ours.Jeremy Allison2011-05-171-5/+5
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue May 17 20:05:42 CEST 2011 on sn-devel-104
* s3-netapi Initialise global variables in libnetapiAndrew Bartlett2011-05-131-1/+1
| | | | | | | It is important to initalise the global variables when loading this configuration for the potentially first time. Andrew Bartlett
* s3-libnetapi Don't create a talloc_stackframe() in a global variableAndrew Bartlett2011-05-132-16/+37
| | | | | | | | | | This also ensures that libnetapi_free() invalidates the global stat_ctx variable, and changes the API so that the behaviour of the error string routines is to consistently return a allocated string. Pair-Programmed-With: Günther Deschner <gd@samba.org> Andrew Bartlett
* s3-libnetapi/libnetjoin: fix uninitialized variables after the libsmbconf ↵Günther Deschner2011-05-131-1/+1
| | | | | | changes. Guenther
* s3-lib/smbconf: fix uninitialized error code in smbconf_reg_init().Günther Deschner2011-05-121-1/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu May 12 18:09:16 CEST 2011 on sn-devel-104
* libsmbconf: Convert smbconf_transaction_*() to sbcErr.Andreas Schneider2011-05-101-6/+27
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_delete_includes() to sbcErr.Andreas Schneider2011-05-102-13/+16
| | | | Signed-off-by: Michael Adam <obnox@samba.org>