summaryrefslogtreecommitdiffstats
path: root/source3/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* libsmbconf: Convert smbconf_set_includes() to sbcErr.Andreas Schneider2011-05-102-18/+23
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_get_includes() to sbcErr.Andreas Schneider2011-05-102-19/+18
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_delete_parameter() to sbcErr.Andreas Schneider2011-05-101-6/+8
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_get_parameter() to sbcErr.Andreas Schneider2011-05-101-7/+6
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_set_parameter() to sbcErr.Andreas Schneider2011-05-102-13/+22
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_delete_share() to sbcErr.Andreas Schneider2011-05-101-7/+14
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_get_share() to sbcErr.Andreas Schneider2011-05-101-56/+73
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_create_share() to smbErr.Andreas Schneider2011-05-101-10/+12
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_get_share_names() to sbcErr.Andreas Schneider2011-05-101-29/+37
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_drop() to sbcErr.Andreas Schneider2011-05-101-6/+12
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_open() to sbcErr.Andreas Schneider2011-05-102-12/+16
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libsmbconf: Convert smbconf_init() to sbcErr.Andreas Schneider2011-05-106-21/+28
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3-events: tevent_internal.h is not a public headerAndrew Tridgell2011-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | We need to use the "foo.h" form instead of the <foo.h> form for headers that are not installed publicly. Otherwise when an external version of tevent is used we won't find the header and the build will fail. Note that this creates a structure dependency between the tevent structures in the external library and the headers in our source tree. That is not ideal, but is currently OK as the waf build will only use the external library if it is at least the same version as the internal tree, which means it will actually be the same version, as we release the external version from our tree. We should come up with a better solution, but for now this allows openchange to build again. Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue May 10 16:06:40 CEST 2011 on sn-devel-104
* gencache: don't use CLEAR_IF_FIRST as fallback.Rusty Russell2011-04-191-7/+3
| | | | | | | | | | | | CLEAR_IF_FIRST only works if *all* openers use that flag. So just truncate the file: it's racy, but that's what we're doing anyway. We'd really need a TDB_OPENCHECK_OR_CLEAR flag to do this properly (or in TDB2, a open hook at the right point). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3-lib Use common lib/socket code for get_interfaces() et alAndrew Bartlett2011-05-084-302/+3
|