summaryrefslogtreecommitdiff
path: root/lib/util
AgeCommit message (Collapse)AuthorFilesLines
2013-08-12tevent: Add tevent_received to tevent_req_simple_recv_ntstatusVolker Lendecke1-5/+8
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-12lib: Remove unused "client_name"Volker Lendecke1-1/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-07-09lib/util: add 'ldb' debug classStefan Metzmacher2-1/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de>
2013-07-05time: prefer CLOCK_BOOTTIME for clock_gettime_mono()Björn Jacke1-2/+12
this clock moves on while the machine was suspended. This is what we prefer actually. Signed-off-by: Björn Jacke <bj@sernet.de> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Fri Jul 5 16:47:34 CEST 2013 on sn-devel-104
2013-07-05time: don't try to use the coarse clockBjörn Jacke1-9/+2
as we prefer to use the suspend aware CLOCK_BOOTTIME as monotonic clock source we cannot deal with the mono coarse clock any more. Actually I never saw a real performance gain with it. Signed-off-by: Björn Jacke <bj@sernet.de> Reviewed-by: Simo Sorce <idra@samba.org>
2013-06-14genrand: Slightly simplify do_reseedVolker Lendecke1-13/+11
The only caller set "use_fd" to "true". 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): Fri Jun 14 20:29:56 CEST 2013 on sn-devel-104
2013-06-01libcli: Remove uneeded debug messageKai Blin1-1/+0
Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-28lib/util/modules.c: Remove #if SAMBA_BUILD_ == 3 now we only have the waf buildAndrew Bartlett1-8/+0
Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-27build: Rework BSD_STYLE_STATVFS check to match autoconf buildAndrew Bartlett1-12/+10
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2013-05-18debug: Add ability to dump_data per debug classKai Blin3-0/+45
Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-16debug: Add debugclass for DNS serverKai Blin2-1/+3
Signed-off-by: Kai Blin <kai@samba.org> Reviewed-By: Amitay Isaacs <amitay@gmail.com>
2013-04-18s3:smbd: add a scavenger process for disconnected durable handlesGregor Beck2-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>
2013-04-05getpass: Don't fail if stdin is not a ttyStef Walter1-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
2013-03-15lib/util: Cast mode_t result to unsigned int for GNU/Solaris buildAndrew Bartlett1-1/+1
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-06Make sure to set umask() before calling mkstemp().Andreas Schneider1-0/+3
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
2013-03-05lib: Add prctl_set_comment to utils.Andreas Schneider3-1/+70
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-02-28lib/util: add samba_tevent_set_debug()Stefan Metzmacher2-1/+14
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-28lib/util: allow samba_tevent_debug() to take a name as contextStefan Metzmacher1-5/+16
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-22lib-util: Don't leak file descriptor on error.Andreas Schneider1-0/+1
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22build: Remove unused includes.h reference to avoid build-time talloc depAndrew Bartlett1-1/+0
talloc is not a dependency of this library, but is required by includes.h. By not including includes.h, we avoid needing to add an otherwise false talloc dep. (this comes up if talloc.h is not installed as a system package). Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19lib/util: add samba_tevent_context_init()Stefan Metzmacher3-2/+76
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19lib/util/time: strip a potential trailing newline in the asctime case.Michael Adam1-0/+9
If strftime() is not available, asctime() is used, and this usually appends a newline character to the result. This is not desired for timestamp(). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19lib/util_tdb: factor out tdb_data_talloc_copy()Gregor Beck2-0/+16
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-18fault.c: Fix typo in comment.Karolin Seeger1-1/+1
redundent -> redundant Signed-off-by: Karolin Seeger <kseeger@samba.org>
2013-02-04lib/util: improve check_password_quality() to handle utf8Stefan Metzmacher2-19/+120
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-01-09util: Add a strict directory_create_or_exist function.Andreas Schneider2-5/+48
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-12-12util: Remove unused fde_stdin in samba_runcmd.Andreas Schneider1-22/+5
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-12util: Don't use the pid ret value uninitialized.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2012-12-07Fix bug #9471 - SEGV when using second vfs module.Tsukasa Hamano1-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
2012-12-03util: Add a UNIX platform independent samba_getpass().Andreas Schneider3-1/+265
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2012-11-07lib/util: Simplify bitmap.c a bitVolker Lendecke1-7/+6
This avoids the double-talloc for bitmaps Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2012-11-07lib/util: Make "struct bitmap" abstractVolker Lendecke2-4/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2012-10-31util: remove accidently committed hunkBjörn Jacke1-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
2012-10-30wfabuild: fix the -errwarn compile flag testBjörn Jacke1-0/+3
as in the autoconf build this must be "-errwarn=%all"
2012-09-26lib/util/charset: We do not use fucntions from wchar.h any moreAndrew Bartlett1-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
2012-09-26lib/util/charset: Try to find iconv on HP-UXAndrew Bartlett1-0/+3
2012-09-23lib/util: Remove unbuilt file util_getent.c and BROKEN_GETGRNAMAndrew Bartlett1-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
2012-09-07waf: add check for BSD_STYLE_STATVFSBjörn Jacke1-0/+12
a leftover from bug #8777
2012-08-24lib/util: don't SMB_ASSERT() in process_exists_by_pid()Stefan Metzmacher1-1/+3
Just return false... metze
2012-08-17lib/util: add server_id_set_disconnected() and server_id_is_disconnected()Michael Adam2-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>
2012-08-17lib/util: let server_id_str() skip the task_id if 0 in the cluster case tooStefan Metzmacher1-0/+5
server_id_from_string() already handles that case. metze
2012-08-17lib/util: add server_id_from_string()Stefan Metzmacher2-0/+38
metze
2012-08-17lib/util: add server_id_equal()Stefan Metzmacher2-0/+22
metze
2012-07-19Add debugs to functions. Add pidfile_unlink().Jeremy Allison2-0/+25
2012-07-19Move source4/smbd/pidfile into lib/util in preparation for making it in common.Jeremy Allison3-1/+158
2012-07-18talloc_stack: abort in developer me if no stackframe on talloc_tos()Rusty Russell2-4/+9
Don't tolerate leaks in developer mode. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell1-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>
2012-07-18lib/util/modules.c: fix stackframe leak.Rusty Russell1-1/+2
do_smb_load_module() doesn't free its stackframe on success. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18talloc_stack: report lazy freeing (panic if DEVELOPER).Rusty Russell1-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>
2012-07-18talloc_stack: always include the location when creating a talloc_stackframe().Rusty Russell2-8/+11
Much better for debugging. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>