summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* ccan/wafbuild: use WERROR_CFLAGS instead of -WerrorBjörn Jacke2012-10-301-10/+7
|
* wafbuild: reorder the Werror checks so that the ambigous w2 option is being ↵Björn Jacke2012-10-301-1/+5
| | | | checked last
* wafbuild: merge the missing IBM compiler Werror flag "-qhalt=w" to wafBjörn Jacke2012-10-301-1/+1
|
* wfabuild: fix the -errwarn compile flag testBjörn Jacke2012-10-302-1/+4
| | | | as in the autoconf build this must be "-errwarn=%all"
* lib/param: fix line length of DEBUG statments touched in previous commit in ↵Michael Adam2012-10-291-2/+4
| | | | | | | | | | set_variable() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Mon Oct 29 21:55:35 CET 2012 on sn-devel-104
* lib/param: fix function name (set_variable) in debug statementsMichael Adam2012-10-291-4/+4
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* lib/param: fix function name (lpcfg_file_list_changed) in a debug messageMichael Adam2012-10-291-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* lib/replace: Return size of xattr if size argument is 0Andrew Bartlett2012-10-281-3/+12
| | | | | | This makes rep_{f,}getxattr a more complete replacement for the linux function. Andrew Bartlett
* dbwrap: use talloc_stackframe() in db_tdb_log_key()Andrew Bartlett2012-10-251-3/+4
| | | | | | | We can not be sure that there is already a talloc_stackframe() in place so we must create one. Andrew Bartlett
* lib/tsocket: fix loop in tdgram_bsd_recvfrom() (bug #9184)Stefan Metzmacher2012-10-231-1/+9
| | | | | | | | | | | | | If the socket is not readable yet, we need to retry if tsocket_bsd_pending() returns 0. See also https://lists.samba.org/archive/samba-technical/2012-October/087164.html metze Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Oct 23 14:44:21 CEST 2012 on sn-devel-104
* lib/replace: Fix configure on FreeBSD: define_ret is not correct hereAndrew Bartlett2012-10-231-1/+0
| | | | | | | | define_ret is for when the output of the compiled and run program should be put into the configure define. This is not the case here. Andrew Bartlett
* lib/replace: Fix detection of rpcsrv/yp_prot.h on FreeBSDAndrew Bartlett2012-10-231-1/+4
|
* ccan: check for all the used config.h definesRusty Russell2012-10-172-0/+37
| | | | | | | | | | In particular, not checking for byteswap.h meant we defined duplicates: https://bugzilla.samba.org/show_bug.cgi?id=9286 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Wed Oct 17 01:55:14 CEST 2012 on sn-devel-104
* lib-addns: ensure that allocated buffer are pre set to 0Matthieu Patou2012-10-071-12/+12
| | | | | | It avoid bugs when one of the buffer is supposed to contain a string that is not null terminated (ie. label->label) and that we don't force the last byte to 0.
* ntdb: remove unused local variable.Rusty Russell2012-10-081-2/+0
| | | | | | | | Reported-by: Matthieu Patou <mat@samba.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Mon Oct 8 04:43:37 CEST 2012 on sn-devel-104
* tdb: Make tdb robust against improper CLEAR_IF_FIRST restartVolker Lendecke2012-10-061-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When winbind is restarted, there is a potential crash in tdb. Following situation: We are in a cluster with ctdb. A winbind child hangs in a request to the DC. Cluster monitoring decides the node has a problem. Cluster monitoring decides to kill ctdbd. winbind child still hangs in a RPC request. winbind parent figures that ctdb is dead and immediately commits suicide. winbind parent is restarted by cluster management, overwriting gencache.tdb with CLEAR_IF_FIRST. The CLEAR_IF_FIRST logic as implemented now will not see that a child still has the tdb open, only the parent holds the ACTIVE_LOCK due to performance reasons. During the CLEAR_IF_FIRST logic is done, there is a very small window where we ftruncate(tfd, 0) the file and re-write a proper header without a lock. When during this small window the winbind child comes back, wanting to store something into gencache.tdb, that winbind child will crash with a SIGBUS. Sounds unlikely? See: [2012/09/29 07:02:31.871607, 0] lib/util.c:1183(smb_panic) PANIC (pid 1814517): internal error [2012/09/29 07:02:31.877596, 0] lib/util.c:1287(log_stack_trace) BACKTRACE: 35 stack frames: #0 winbindd(log_stack_trace+0x1a) [0x7feb7d4ca18a] #1 winbindd(smb_panic+0x2b) [0x7feb7d4ca25b] #2 winbindd(+0x1a3cc4) [0x7feb7d4bacc4] #3 /lib64/libc.so.6(+0x32900) [0x7feb7a929900] #4 /lib64/libc.so.6(memcpy+0x35) [0x7feb7a97f355] #5 /usr/lib64/libtdb.so.1(+0x6e76) [0x7feb7b0b0e76] #6 /usr/lib64/libtdb.so.1(+0x3d37) [0x7feb7b0add37] #7 /usr/lib64/libtdb.so.1(+0x863d) [0x7feb7b0b263d] #8 /usr/lib64/libtdb.so.1(+0x8700) [0x7feb7b0b2700] #9 /usr/lib64/libtdb.so.1(+0x2505) [0x7feb7b0ac505] #10 /usr/lib64/libtdb.so.1(+0x25b7) [0x7feb7b0ac5b7] #11 /usr/lib64/libtdb.so.1(tdb_fetch+0x13) [0x7feb7b0ac633] #12 winbindd(gencache_set_data_blob+0x259) [0x7feb7d4d8449] #13 winbindd(gencache_set+0x53) [0x7feb7d4d85b3] #14 winbindd(gencache_del+0x5e) [0x7feb7d4d879e] #15 winbindd(saf_delete+0x93) [0x7feb7d54b693] #16 winbindd(+0xe507e) [0x7feb7d3fc07e] #17 winbindd(+0xe85e5) [0x7feb7d3ff5e5] #18 winbindd(+0xe65be) [0x7feb7d3fd5be] #19 winbindd(+0xe7562) [0x7feb7d3fe562] #20 winbindd(init_dc_connection+0x2e) [0x7feb7d3fe5be] #21 winbindd(+0xe75d9) [0x7feb7d3fe5d9] #22 winbindd(cm_connect_netlogon+0x58) [0x7feb7d3fe658] #23 winbindd(_wbint_PingDc+0x61) [0x7feb7d410991] #24 winbindd(+0x103175) [0x7feb7d41a175] #25 winbindd(winbindd_dual_ndrcmd+0xb7) [0x7feb7d4107d7] #26 winbindd(+0xf8609) [0x7feb7d40f609] #27 winbindd(+0xf9075) [0x7feb7d410075] #28 winbindd(tevent_common_loop_immediate+0xe8) [0x7feb7d4db198] #29 winbindd(run_events_poll+0x3c) [0x7feb7d4d93fc] #30 winbindd(+0x1c2b52) [0x7feb7d4d9b52] #31 winbindd(_tevent_loop_once+0x90) [0x7feb7d4d9f60] #32 winbindd(main+0x7b3) [0x7feb7d3e7aa3] #33 /lib64/libc.so.6(__libc_start_main+0xfd) [0x7feb7a915cdd] #34 winbindd(+0xce2a9) [0x7feb7d3e52a9] This is in a winbind child, logfiles surrounding indicate the parent was restarted. This patch takes all chain locks around the CLEAR_IF_FIRST introduced tdb_new_database.
* tdb: Make robust against shrinking tdbsRusty Russell2012-10-061-12/+20
| | | | | | | | | | | When probing for a size change (eg. just before tdb_expand, tdb_check, tdb_rescue) we call tdb_oob(tdb, tdb->map_size, 1, 1). Unfortunately this does nothing if the tdb has actually shrunk, which as Volker demonstrated, can actually happen if a "longlived" parent crashes. So move the map/update size/remap before the limit check. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* talloc: Convert error cecking macros into fnsSimo Sorce2012-10-051-37/+74
| | | | | | | | | | | This will avoid 'surprise returns' and makes the code cleare to readers. These macros were complex enough to warrant a full function anyway not just for readability but also for debuggability. Thanks David for pointing out this issue. Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Fri Oct 5 23:24:17 CEST 2012 on sn-devel-104
* Add tests for talloc_memlimitSimo Sorce2012-10-051-0/+172
| | | | | Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Fri Oct 5 07:36:38 CEST 2012 on sn-devel-104
* Add memory limiting capability to tallocSimo Sorce2012-10-055-40/+327
| | | | | | | | | | | By calling talloc_set_memlimit() we can now set a max memory limit for a whole talloc hierarchy. ANy attempt to allocate memory beyond the max allowed for the whole hierarchy wil cause an allocation failure. Stealing memory correctly accounts for used memory in the old and the new hierarchy but exceeding the memory limit in the new parent will not cause a failure.
* Remove the parameters:Jeremy Allison2012-10-042-40/+0
| | | | | | | | | security mask force security mode directory security mask force directory security mode and update the docs.
* tdb: add -e option to tdbdump (and docment it).Rusty Russell2012-10-042-3/+53
| | | | | | | | | | This allows for an emergency best-effort dump. It's a little better than strings(1). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Thu Oct 4 03:16:06 CEST 2012 on sn-devel-104
* tdb: tdbdump should log errors, and fail in that case.Rusty Russell2012-10-041-2/+38
| | | | | | | Dumping a corrupt database should not exit silently with 0 status! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: add tdb_rescue()Rusty Russell2012-10-047-4/+622
| | | | | | | | This allows for an emergency best-effort dump. It's a little better than strings(1). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: Fix a typoVolker Lendecke2012-10-021-1/+1
| | | | | Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Oct 2 19:52:16 CEST 2012 on sn-devel-104
* s3-krb5: use and request AES keys in kerberos operations.Günther Deschner2012-10-021-0/+6
| | | | Guenther
* lib/replace: Add test for what flag we need for -Werror behaviourAndrew Bartlett2012-09-291-0/+9
|
* lib/util/charset: We do not use fucntions from wchar.h any moreAndrew Bartlett2012-09-261-7/+1
| | | | | Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Sep 26 02:13:10 CEST 2012 on sn-devel-104
* lib/util/charset: Try to find iconv on HP-UXAndrew Bartlett2012-09-261-0/+3
|
* pyntdb: Fix init function for ntdb python module.Pierre Lejeune2012-09-251-2/+2
| | | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Tue Sep 25 22:40:39 CEST 2012 on sn-devel-104
* lib: Make async_sock includable on its ownVolker Lendecke2012-09-251-0/+1
| | | | | Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Sep 25 18:03:46 CEST 2012 on sn-devel-104
* replace: Avoid returning value in void setproctitle() replacement.Jelmer Vernooij2012-09-251-1/+0
| | | | | Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Tue Sep 25 06:38:40 CEST 2012 on sn-devel-104
* replace: Support setproctitle().Jelmer Vernooij2012-09-244-0/+19
| | | | | This uses the setproctitle() from libc, libsetproctitle or libbsd. If none is available it provides a dummy implementation.
* lib/replace: Look for special flags needed for c99Andrew Bartlett2012-09-241-0/+10
| | | | | | | | | This is normally handled by the waf core, but for HP-UX we currently fail. The autoconf code hard-codes a case for HP-UX, but I want to try testing it using a generic system first. Andrew Bartlett
* lib/replace: Improve mkstemp test in autoconf and wafAndrew Bartlett2012-09-242-4/+34
| | | | | | | | | On the Sernet-solaris8 host, this test passed in the autoconf build, then failed in the recursive waf build. This newer test should probe the behaviour more closely, by checking we get two distinct, secure files. Andrew Bartlett
* lib/replace: Remove unused nap and therefore the SCO defineAndrew Bartlett2012-09-231-10/+0
| | | | | | In any case, the Samba Team stopped supporting SCO systems a long time ago. Andrew Bartlett
* lib/util: Remove unbuilt file util_getent.c and BROKEN_GETGRNAMAndrew Bartlett2012-09-231-283/+0
| | | | | | | Removing this unbuilt file allows removing BROKEN_GETGRNAM which was only ever defined per-OS, not based on an actual test. Andrew Bartlett
* lib/replace: Try to fix build on HP-UX for os2_delete testAndrew Bartlett2012-09-234-17/+6
| | | | | | | | | | | | The issue is that this file is both used in an autoconf test, and later in a smbtorture test. Because os2_delete.c does not include replace.h, bool may not be defined. So, instead we shift the need for bool to a different header. (The readdir tests in repdir.m4 are not yet in the waf configure). Andrew Bartlett
* ntdb: Try to fix the build on Solaris which does not have errAndrew Bartlett2012-09-233-2/+15
|
* lib/tsocket: fix receiving of udp packets from 0 bytes (bug #9184)Stefan Metzmacher2012-09-221-4/+1
| | | | | | | | | It's possible for a client to send 0 bytes in a UDP packet, we need still need to call recvfrom() and skip the invalid packet at a higher level. Otherwise the kernel receive queue is blocked. metze
* libtorture: factor out simple ui backendGregor Beck2012-09-213-1/+87
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:dbwrap: remove unused args from db_open_file()Gregor Beck2012-09-212-6/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:dbwrap: let dbwrap_fetch_uint32 distinguish between "not found" and ↵Gregor Beck2012-09-211-2/+5
| | | | | | "wrong format" Signed-off-by: Stefan Metzmacher <metze@samba.org>
* replace: fix 520c9b0b0ae33Björn Jacke2012-09-181-1/+1
| | | | | | | fix typo in ifdef. Thanks to Joachim Schmitz for spotting this! Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Tue Sep 18 16:06:18 CEST 2012 on sn-devel-104
* panic action is defined as GLOBAL_VAR(szPanicAction) not ↵Matthieu Patou2012-09-181-1/+1
| | | | | | | | | GLOBAL_VAR(panic_action) Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 18 06:12:00 CEST 2012 on sn-devel-104
* libreplace: Bug 8107, Fix poll replacement to become a msleep replacementJoachim Schmitz2012-09-171-1/+1
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* ldb: bump version to 1.1.13 so the 4.0 release can get the isprint fixAndrew Bartlett2012-09-173-1/+263
| | | | | Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Sep 17 23:47:57 CEST 2012 on sn-devel-104
* replace: add some includes for poll.hBjörn Jacke2012-09-161-0/+6
| | | | | | | See bug #8107 Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Sun Sep 16 04:05:08 CEST 2012 on sn-devel-104
* dns_server: Remove parameter 'dns recursive queries' and base this on 'dns ↵Andrew Bartlett2012-09-123-10/+0
| | | | | | | | | | forwarder' This simplifies a very common configuration. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
* lib/param: change the default for 'allow dns updates' to 'secure only'Stefan Metzmacher2012-09-121-1/+1
| | | | metze