summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* build: Rework BSD_STYLE_STATVFS check to match autoconf buildAndrew Bartlett2013-05-271-12/+10
| | | | Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* lib/replace: Set BROKEN_STRNLEN and BROKEN_STRNDUP on all AIXAndrew Bartlett2013-05-231-0/+13
| | | | | | | | | | | The background is in https://bugzilla.samba.org/show_bug.cgi?id=1097 and wider reports are at http://stackoverflow.com/questions/2091460/strndup-call-is-currupting-stack-frames Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 23 03:52:10 CEST 2013 on sn-devel-104
* build: Update md5.h detection in waf and autoconf to use sys/md5.h and -lmdAndrew Bartlett2013-05-223-9/+19
| | | | | | | | | | | | | This brings the two build systems in sync, without using md5.h (which is a problem name) Tested on FreeBSD Andrew Bartlett Reviewed-by: Richard Sharpe <rsharpe@samba.org> Autobuild-User(master): Richard Sharpe <sharpe@samba.org> Autobuild-Date(master): Wed May 22 10:06:40 CEST 2013 on sn-devel-104
* talloc: Fix a typoVolker Lendecke2013-05-201-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Kai Blin <kai@samba.org> Autobuild-User(master): Kai Blin <kai@samba.org> Autobuild-Date(master): Mon May 20 18:48:49 CEST 2013 on sn-devel-104
* ldb_tdb: Warn when reindexing is doneMatthieu Patou2013-05-202-1/+12
| | | | | | | | | Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon May 20 15:47:33 CEST 2013 on sn-devel-104
* debug: Add ability to dump_data per debug classKai Blin2013-05-183-0/+45
| | | | | Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* More generic check for OpenBSD platformVadim Zhukov2013-05-171-1/+1
| | | | | | | | | | | | | | | | OpenBSD versioning is different from many other projects, and, say, 5.0 does not differ from 4.9 more than from 5.1. So the right approach will be to check that platform name starts with "openbsd" instead. This is also the thing OpenBSD developers do when patching other software, so this patch is consistent with already existing practicies. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9888 Reviewed-by: Lars Müller <lars@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Fri May 17 17:58:16 CEST 2013 on sn-devel-104
* lib: Add before/after hooks to async_connectVolker Lendecke2013-05-172-8/+37
| | | | | | | This will facilitiate [un]become_root for smbd to connect safely to ctdbd. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
* waf: only use -fstack-protector when both compiler and linker support itChristian Ambach2013-05-171-1/+1
| | | | | | | | otherwise build with xlc on AIX fails because the compiler silently ignores the parameter but the linker does not like it Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* debug: Add debugclass for DNS serverKai Blin2013-05-162-1/+3
| | | | | Signed-off-by: Kai Blin <kai@samba.org> Reviewed-By: Amitay Isaacs <amitay@gmail.com>
* lib/testtools/testtools/tests/test_testresult.py: Fix typos.Karolin Seeger2013-05-151-3/+3
| | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/subunit/README: Fix typo.Karolin Seeger2013-05-151-1/+1
| | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: remove unused 'printer_admin'Stefan Metzmacher2013-05-141-1/+0
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue May 14 21:45:19 CEST 2013 on sn-devel-104
* talloc: only provide the --enable-talloc-compat1 in standalone buildStefan Metzmacher2013-05-141-4/+6
| | | | | | | | The compat library is already only built in standalone build, so we need the configure option also only in the standalone build. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* tdb: include information about hash function being used in tdbtool info outputChristian Ambach2013-05-141-0/+2
| | | | | | | | makes it possible to easily determine if the tdb under examination uses jenkins hash or not Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* dbwrap: Fix CID 1002092 Uninitialized scalar variableVolker Lendecke2013-05-121-1/+3
| | | | | | | We don't set saved_errno in the ret==0 case. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* lib/replace: add SCNx macrosChristian Ambach2013-05-061-0/+39
| | | | | | | we already have PRI*, but the corresponding SCN* were missing Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/replace: prefer inttypes.h over stdint.hChristian Ambach2013-05-061-4/+4
| | | | | | | | | according to C99 7.8, inttypes.h should include stdint.h so prefer inttypes.h and fall back to stdint.h (and our own definitions of PRI*) only when inttypes.h could not be found Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* talloc: Simplify _talloc_free_poolmem a bitVolker Lendecke2013-04-181-2/+14
| | | | | | | | | | Early returns are easier to understand than "else if" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 18 22:50:42 CEST 2013 on sn-devel-104
* talloc: Do an early returnVolker Lendecke2013-04-181-3/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* talloc: Avoid some "else" by doing early returnsVolker Lendecke2013-04-181-4/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* talloc: Fix nonblank line endingsVolker Lendecke2013-04-181-34/+34
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: add a scavenger process for disconnected durable handlesGregor Beck2013-04-182-1/+3
| | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* ntdb: remove --disable-ntdb.Rusty Russell2013-04-132-10/+0
| | | | | | | | | | | Remove DISABLE_NTDB option, and --disable-ntdb from waf build. This just means that it will always get built: it isn't used by default yet. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 13 02:01:02 CEST 2013 on sn-devel-104
* lib/param: lpcfg_private_db_path()Rusty Russell2013-04-122-0/+42
| | | | | | | This wrapper avoids testing lpcfg_use_ntdb() everywhere. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Jeremy Allison <jra@samba.org>
* autoconf: build in NTDB.Rusty Russell2013-04-122-2/+2
| | | | | | | | | | | | | | | | | I previously added -DDISABLE_NTDB to FLAGS, but lib/param/util.c doesn't seem to be compiled with that flag, so it's really not a good solution. So instead, compile in ntdb for the autoconf build. This means: 1) Add -DHAVE_CCAN to cflags. 2) Remove pyntdb from autoconf objects (which is what tdb does) 3) Remove -DDISABLE_NTDB 4) Add ntdb utility objects 5) Link in ntdb everywhere we link in tdb. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Jeremy Allison <jra@samba.org>
* getpass: Don't fail if stdin is not a ttyStef Walter2013-04-051-23/+29
| | | | | | | | | | | We don't need to manipulate the tty state (such as turning off echo) when prompting for passwords if we're not reading from a tty. Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Fri Apr 5 07:34:37 CEST 2013 on sn-devel-104
* tevent: Only set poll_ev->delete=false if it was trueVolker Lendecke2013-04-041-1/+1
| | | | | | | | | | | Might not be noticable, but I thought it would be an obvious tiny optimization. Possibly the compiler already does this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Apr 4 18:32:39 CEST 2013 on sn-devel-104
* ccan: fix HAVE_BSWAP_64 for autoconf.Rusty Russell2013-04-031-1/+15
| | | | | | | Autoconf defines HAVE_BSWAP_64_DECL, we want HAVE_BSWAP_64. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: Add a comment explaining a restrictionVolker Lendecke2013-03-271-0/+11
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Mar 27 13:40:15 CET 2013 on sn-devel-104
* tdb: Fix blank line endingsVolker Lendecke2013-03-265-46/+45
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tdb: Little format changeVolker Lendecke2013-03-261-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ntdb: don't call open hook when re-opening an existing database.Rusty Russell2013-03-232-13/+22
| | | | | | | | | | | In particular, the Samba dbwrap wrapper can do this for schannel_store, with the openhook set to clear the database if it can get the lock (which, being in the same process, it can). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Sat Mar 23 09:39:50 CET 2013 on sn-devel-104
* Fix tevent testsuite issue on Solaris.Jeremy Allison2013-03-221-1/+6
| | | | | | | | | | | | On Solaris/Nexenta/Illumos once a pipe is full it will not be reported as writable until PIPE_BUF (actually on Solaris 4096, which is less than PIPE_BUF) bytes have been read from it. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Mar 22 18:16:45 CET 2013 on sn-devel-104
* Solaris/Illumos/Nexenta creates pipes that are bi-directional by default.Jeremy Allison2013-03-221-10/+16
| | | | | | | | Ensure the test code will pass against such a system (allow writes/reads going both ways). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/util: Cast mode_t result to unsigned int for GNU/Solaris buildAndrew Bartlett2013-03-151-1/+1
| | | | Reviewed-by: Jeremy Allison <jra@samba.org>
* ntdb: Cast getpid() result to unsigned int for GNU/Solaris buildAndrew Bartlett2013-03-152-8/+10
| | | | Reviewed-by: Jeremy Allison <jra@samba.org>
* ccan: Cast getpid() result to unsigned int for GNU/Solaris buildAndrew Bartlett2013-03-151-4/+4
| | | | Reviewed-by: Jeremy Allison <jra@samba.org>
* tsocket: ENOMEM can be retried on illumos/Solaris.Ira Cooper2013-03-131-0/+6
| | | | | | | | | | The writev system call can return -1 and errno ENOMEM, as a retriable condition. Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Mar 13 23:50:05 CET 2013 on sn-devel-104
* s3: remove some dead code (for setdir command)Christian Ambach2013-03-122-10/+0
| | | | | | | | | | | set dir seems to have been a special SMB command used by Pathworks clients the supporting code for it was already removed in 2007, so just remove all remnants related to it (smb.conf parameter, documentation, ...) Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Mar 12 01:03:37 CET 2013 on sn-devel-104
* waf: add -fstack-protector to LDFLAGS if detected.Ira Cooper2013-03-061-0/+1
| | | | | | | | | | If we compile with -fstack-protector, we should link with it. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Mar 6 04:06:04 CET 2013 on sn-devel-104
* Make sure to set umask() before calling mkstemp().Andreas Schneider2013-03-062-0/+7
| | | | | | | Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Mar 6 01:16:34 CET 2013 on sn-devel-104
* krb5_wrap: Make sure we don't dereference a NULL pointer.Andreas Schneider2013-03-051-1/+3
| | | | Reviewed-by: David Disseldorp <ddiss@samba.org>
* lib: Add prctl_set_comment to utils.Andreas Schneider2013-03-053-1/+70
| | | | Reviewed-by: David Disseldorp <ddiss@samba.org>
* waf: Correctly check for prctl in just one place.Andreas Schneider2013-03-051-1/+14
| | | | Reviewed-by: David Disseldorp <ddiss@samba.org>
* tdb: Slightly simplify tdb_expand_fileVolker Lendecke2013-03-051-2/+4
| | | | | | | | | | | The "else" keywords are not necessary here, we return in the preceding if clause Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Mar 5 14:00:47 CET 2013 on sn-devel-104
* tsocket_bsd: Attempt to increase the SO_SNDBUF if we get EMSGSIZE in sendto()Andrew Bartlett2013-03-041-0/+26
| | | | | | | | | | | | | | This matches what was done for lib/socket/socket_unix.c in c692bb02b039ae8fef6ba968fd13b36ad7d62a72. (and is based on that patch by Landon Fuller <landonf@bikemonkey.org>) Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Mar 4 11:15:35 CET 2013 on sn-devel-104
* tevent: change version to 0.9.18tevent-0.9.18Stefan Metzmacher2013-03-022-1/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This release contains a lot of fixes: - Adding new timer events is now faster, if there's a large number of timer events. - sigprocmask does not work on FreeBSD to stop further signals in a signal handler. - TEVENT_NUM_SIGNALS is calculated by configure in order to support realtime signals on freebsd. - ./configure --disable-python was fixed for the standalone build. - Several crash bugs in the poll backend are fixed. - The poll backend removes deleted events from the cached pollfd array now. - The poll doesn't pass pollfd.events == 0 to poll() and maintains a list of disabled events, instead of consuming 100% cpu and/or triggering the callers handler. - The poll backend detects POLLNVAL and reports EBADF instead of consuming 100% cpu. - The select backend supports separate handlers for TEVENT_FD_READ and TEVENT_FD_WRITE. - The poll and select backends are now doing fair queuing of fd events. - The epoll has better error checking and supports separate handlers for TEVENT_FD_READ and TEVENT_FD_WRITE. - The standard backend was rewritten to be a tiny wrapper on top of epoll with a fallback to poll, which means that it doesn't use select directly anymore. - TEVENT_TRACE_BEFORE_LOOP_ONCE and TEVENT_TRACE_AFTER_LOOP_ONCE are added in order to allow the application to hook in before and after the loop_once() backend function is called. The TEVENT_HAS_LOOP_ONCE_TRACE_POINTS define can be used to detect the new feature. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Mar 2 02:15:44 CET 2013 on sn-devel-104
* tevent: optimize adding new zero timer eventsStefan Metzmacher2013-03-016-31/+113
| | | | | | | | | | | | | | Such events were used before we had immediate events. It's likely that there're a lot of this events and we need to add new ones in fifo order. The tricky part is that tevent_common_add_timer() should not use the optimization as it's used by broken Samba versions, which don't use tevent_common_loop_timer_delay() in source3/lib/events.c. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tevent: optimize adding new timer eventsStefan Metzmacher2013-03-011-8/+24
| | | | | | | | | | | | | | | | | | | | | | As new timestamps typically get higher:-) it's better to traverse the existing list from the tail. This is not completely optimal, but it should be better than before. A second optimization could be done for zero timestamps, we would just remember the last_zero_timer, but that would change the internal ABI. Normally thatshould not be a poblem, but the Samba's source3/lib/events.c abuses tevent_internal.h from the current source tree, even if an external tevent.h is used. The other problem is that it makes use of tevent_common_add_timer() without using tevent_common_loop_timer_delay(). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>