summaryrefslogtreecommitdiffstats
path: root/lib/util
Commit message (Collapse)AuthorAgeFilesLines
...
* lib/util_tdb: factor out tdb_data_talloc_copy()Gregor Beck2013-02-192-0/+16
| | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* fault.c: Fix typo in comment.Karolin Seeger2013-02-181-1/+1
| | | | | | redundent -> redundant Signed-off-by: Karolin Seeger <kseeger@samba.org>
* lib/util: improve check_password_quality() to handle utf8Stefan Metzmacher2013-02-042-19/+120
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* util: Add a strict directory_create_or_exist function.Andreas Schneider2013-01-092-5/+48
| | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* util: Remove unused fde_stdin in samba_runcmd.Andreas Schneider2012-12-121-22/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* util: Don't use the pid ret value uninitialized.Andreas Schneider2012-12-121-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* Fix bug #9471 - SEGV when using second vfs module.Tsukasa Hamano2012-12-071-1/+1
| | | | | | | | | | | Don't use default_classname_table when we obviously shoud be using classname_table. Reviewed 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 Dec 7 17:51:50 CET 2012 on sn-devel-104
* util: Add a UNIX platform independent samba_getpass().Andreas Schneider2012-12-033-1/+265
| | | | Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* lib/util: Simplify bitmap.c a bitVolker Lendecke2012-11-071-7/+6
| | | | | | | This avoids the double-talloc for bitmaps Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/util: Make "struct bitmap" abstractVolker Lendecke2012-11-072-4/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* util: remove accidently committed hunkBjörn Jacke2012-10-311-3/+0
| | | | | Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Wed Oct 31 19:25:30 CET 2012 on sn-devel-104
* wfabuild: fix the -errwarn compile flag testBjörn Jacke2012-10-301-0/+3
| | | | as in the autoconf build this must be "-errwarn=%all"
* 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
|
* 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
* waf: add check for BSD_STYLE_STATVFSBjörn Jacke2012-09-071-0/+12
| | | | a leftover from bug #8777
* lib/util: don't SMB_ASSERT() in process_exists_by_pid()Stefan Metzmacher2012-08-241-1/+3
| | | | | | Just return false... metze
* lib/util: add server_id_set_disconnected() and server_id_is_disconnected()Michael Adam2012-08-172-1/+48
| | | | | | | Utility functions for handling the special placeholder server-id value for disconnected clients (to be used for durable handles). Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* lib/util: let server_id_str() skip the task_id if 0 in the cluster case tooStefan Metzmacher2012-08-171-0/+5
| | | | | | server_id_from_string() already handles that case. metze
* lib/util: add server_id_from_string()Stefan Metzmacher2012-08-172-0/+38
| | | | metze
* lib/util: add server_id_equal()Stefan Metzmacher2012-08-172-0/+22
| | | | metze
* Add debugs to functions. Add pidfile_unlink().Jeremy Allison2012-07-192-0/+25
|
* Move source4/smbd/pidfile into lib/util in preparation for making it in common.Jeremy Allison2012-07-193-1/+158
|
* talloc_stack: abort in developer me if no stackframe on talloc_tos()Rusty Russell2012-07-182-4/+9
| | | | | | | Don't tolerate leaks in developer mode. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell2012-07-181-1/+1
| | | | | | | | | | They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/util/modules.c: fix stackframe leak.Rusty Russell2012-07-181-1/+2
| | | | | | | do_smb_load_module() doesn't free its stackframe on success. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* talloc_stack: report lazy freeing (panic if DEVELOPER).Rusty Russell2012-07-181-0/+11
| | | | | | | | | | | | | | | | | talloc_stackframe() stacks, so if you forget to free one, the outer one will free it. However, it's not a good idea to rely too heavily on this behaviour: it can lead to delays in the release of memory or destructors. I had an elaborate hack to make sure every talloc_stackframe() was freed in the exact same function it was allocated, however all bugs it caught were simply lazy freeing, so this patch just checks for that. This doesn't check for stackframes we don't free up on exit: that would be nice, but uncovers some uncomfortable (but probably harmless) cases. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* talloc_stack: always include the location when creating a talloc_stackframe().Rusty Russell2012-07-182-8/+11
| | | | | | | Much better for debugging. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* talloc_stack: handle more than one talloc_stackframe_pool()Rusty Russell2012-07-181-8/+9
| | | | | | | | | The only reason we make one stackframe parent of the next is so we use our parent's pool. That doesn't make sense if we're a new pool, and wouldn't work anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/util: Allocate enough space to reference blob->data[len]Andrew Bartlett2012-07-131-3/+3
| | | | | | | | Found by Thomas Hood <jdthood@gmail.com> using valgrind. Thanks! Andrew Bartlett
* ntdb: make --disable-ntdb work properly.Rusty Russell2012-07-041-6/+7
| | | | | | | | | As per bug #9024, make --disable-ntdb work again. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Wed Jul 4 08:11:33 CEST 2012 on sn-devel-104
* Ensure we select the correct syscall numbers on a 32-bit Linux system.Jeremy Allison2012-07-021-0/+46
|
* Try and fix the autoconf build on Solaris/Nexenta/etc.Jeremy Allison2012-06-301-1/+32
| | | | | | | | | Their AC_TRY_RUN doesn't include any current CPPFLAGS. Make the set[res]uid checks independent of this. Needs a small change to the waf build in order to code with the change. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jun 30 00:32:36 CEST 2012 on sn-devel-104
* lib/util: fix fd leak in anonymous_shared_allocate() if MAP_ANON is not ↵Stefan Metzmacher2012-06-291-1/+14
| | | | | | available metze
* Move back to using per-thread credentials on Linux. Fixes the glibc native ↵Jeremy Allison2012-06-291-9/+41
| | | | | | | | | | | | | AIO lost wakeup problem. See this post: https://lists.samba.org/archive/samba-technical/2012-June/085101.html for details. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jun 29 03:57:45 CEST 2012 on sn-devel-104
* Replace all uses of setXX[ug]id() and setgroups with samba_setXX[ug]id() calls.Jeremy Allison2012-06-284-3/+234
| | | | | | Will allow thread-specific credentials to be added by modifying the central definitions. Deliberately left the setXX[ug]id() call in popt as this is not used in Samba.
* util_tdb: move timeout chainlock variants from source3/lib/util/util_tdb.cRusty Russell2012-06-223-1/+98
| | | | | | | We're about to use them for dbwrap. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* util: util_ntdb ntdb_fetch_int32/ntdb_store_int32 and ntdb_add_int32_atomicRusty Russell2012-06-222-0/+89
| | | | | | | | | Similar to the util_tdb versions, but return the error code. ntdb_add_int32_atomic seems a clearer name than tdb_change_int32_atomic. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* util: util_ntdb.c gets NTDB_ERROR => NTSTATUS map.Rusty Russell2012-06-222-0/+49
| | | | | | | Very similar to the tdb version. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* util: util_ntdb.c gains bystring functions.Rusty Russell2012-06-222-1/+85
| | | | | | | | Very similar to the util_tdb versions, but these return the error. I've only implemented those functions actually used. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* util: ntdb_new() supports NTDB_CLEAR_IF_FIRST.Rusty Russell2012-06-222-1/+99
| | | | | | | | | There are various issues with NTDB_CLEAR_IF_FIRST which makes it better if we don't have to use it, but much of the code does, so we fake up support here. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* util: util_ntdb.cRusty Russell2012-06-223-0/+168
| | | | | | | | | | | | | | The first function is ntdb_new: this is preferred over ntdb_open, as it makes the ntdb_context returned (and all NTDB_DATA returned from ntdb_fetch) valid talloc pointers. The API is very similar to tdb_wrap_open(). Note that we handle $TDB_NO_FSYNC here, since ntdb doesn't do that hack (and it's great for speeding up testing!). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/util_tdb: depend directly on tdb, not tdb_compat.Rusty Russell2012-06-192-5/+5
| | | | | | | Simple change, as we get rid of tdb_compat in favour of tdb directly. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* TDB2: make SAMBA use tdb1 again for the moment.Rusty Russell2012-06-191-4/+0
| | | | | | | Otherwise the following surgery will break the SAMBA build and testsuite. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/util: Fix typo in comment.Jelmer Vernooij2012-06-151-1/+1
|
* lib/util: fix use of a non-existent word (existant) in a commentMichael Adam2012-06-121-1/+1
|
* debug: Do not constantly rename logs when max log size = 0Andrew Bartlett2012-06-111-16/+18
| | | | | | | | | | | | | | | | In Samba4, the max log size parameter is not yet connected, so maxlog is 0 This means that we would, on receipt of a -HUP, have all child processes attempt a rename. Now we have the -HUP mean we reopen the logs unconditionally, and then we see if the log is too large (samba3 mode) or simply proceed assuming that someone else has renamed the logs for us. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Jun 11 13:34:43 CEST 2012 on sn-devel-104
* samba_util: mark smb_panic as _NORETURN_.Rusty Russell2012-06-081-1/+1
| | | | | | | Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Fri Jun 8 09:14:26 CEST 2012 on sn-devel-104
* util: fix build on platforms without IPv6 supportBjörn Jacke2012-06-071-1/+1
| | | | | | | something like this on World IPv6 Day II ... ;-) Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Thu Jun 7 03:09:49 CEST 2012 on sn-devel-104
* lib/replace: Merge remaining xattr test details from lib/utilAndrew Bartlett2012-06-021-8/+0
| | | | | | | I prefer the longer XATTR_ADDITIONAL_OPTIONS define and the NULL rather than 0 values in the getxattr test. Andrew Bartlett