summaryrefslogtreecommitdiffstats
path: root/lib/util/util.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Fix signed/unsigned comparisonsVolker Lendecke2014-12-051-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/util: Clean up includes for util.cMartin Schwenke2014-10-041-1/+6
| | | | | | | Allows standalone compiles without external includes.h. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/util: Drop unnecessary use of talloc_tos()Volker Lendecke2014-09-201-6/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* lib/util: Return some functions to util_str.cMartin Schwenke2014-09-191-55/+0
| | | | | | | | | | | These were moved in commit 8e704e4107b284bfc1e43f4c698ac0e6c5ae1800 when util_str.c was not shared. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Sep 19 20:34:05 CEST 2014 on sn-devel-104
* lib/util: Move next_token* functions to util_str.cMartin Schwenke2014-09-191-146/+0
| | | | | | | | | | | | | | | This is part of an attempt to untangle charset from util.c. Most of this was moved from util_str.c in commit 55903e6f9120f1ec58a8554813229975c3028a09. next_token() was moved from charset to util.c in commit 4be643d4ce33d5ce2bf9deacc3f6d0fde90cf626 so that it would be alongside next_token_talloc(). Now that util_str.c is in shared lib/util it is no longer necessary to have these in util.c. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* Fix now erroneous comment for directory_create_or_exist()Jeremy Allison2014-07-291-1/+1
| | | | | | | | | | It doesn't do any checking that the permissions are correct. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jul 29 14:41:42 CEST 2014 on sn-devel-104
* lib: directory_create_or_exist() does not use "uid" parameterVolker Lendecke2014-07-281-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Simplify directory_create_or_exist with an early returnVolker Lendecke2014-07-281-23/+24
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Change uid_wrapper to preloadable version.Andreas Schneider2014-04-171-2/+2
| | | | | | | This imports version 1.0.1 of uid_wrapper. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib-util: rename memdup to smb_memdup and fix all callersBjörn Baumbach2014-04-161-1/+1
| | | | | Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib:util: fix a comment typoMichael Adam2013-12-111-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* CVE-2013-4476: lib-util: add file_check_permissions()Björn Baumbach2013-11-111-0/+44
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libcli: Remove uneeded debug messageKai Blin2013-06-011-1/+0
| | | | | | Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* debug: Add ability to dump_data per debug classKai Blin2013-05-181-0/+30
| | | | | Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@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>
* Make sure to set umask() before calling mkstemp().Andreas Schneider2013-03-061-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
* util: Add a strict directory_create_or_exist function.Andreas Schneider2013-01-091-5/+44
| | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/util: don't SMB_ASSERT() in process_exists_by_pid()Stefan Metzmacher2012-08-241-1/+3
| | | | | | Just return false... metze
* lib/util: fix fd leak in anonymous_shared_allocate() if MAP_ANON is not ↵Stefan Metzmacher2012-06-291-1/+14
| | | | | | available metze
* lib/util: Allow calloc use in util.c, too.Jelmer Vernooij2012-03-241-0/+1
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 18:50:32 CET 2012 on sn-devel-104
* lib/util: Move calloc_array and memalign_array to top-level libutil.Jelmer Vernooij2012-03-241-0/+28
|
* lib/util: only change umask during mkdir()Stefan Metzmacher2012-03-141-7/+4
| | | | metze
* lib/util: cope with races between lstat and mkdir in directory_create_or_exist()Stefan Metzmacher2012-03-141-2/+8
| | | | metze
* lib/util: use a helper variable in directory_create_or_exist()Stefan Metzmacher2012-03-141-2/+5
| | | | metze
* lib/util: do an early return on error directory_create_or_exist()Stefan Metzmacher2012-03-141-10/+10
| | | | metze
* lib/util: remove unneeded else branch in directory_create_or_exist()Stefan Metzmacher2012-03-141-21/+24
| | | | metze
* lib/util: don't start DEBUG output with 'error 'Stefan Metzmacher2012-03-141-1/+1
| | | | | | This confused the subunit code. metze
* lib/util: Add hex_encode_bufVolker Lendecke2012-02-061-9/+16
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Feb 6 09:15:33 CET 2012 on sn-devel-104
* Introduce dump_data_fileVolker Lendecke2012-01-251-0/+11
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Jan 25 11:57:18 CET 2012 on sn-devel-104
* Include uid_wrapper correctly.Andreas Schneider2011-10-271-9/+1
|
* lib/util: skip single hex digit at the end of the input sting - fix ↵Michael Adam2011-10-181-1/+2
| | | | | | | | | | | potential segfault The second of two digits was read without checking for the length of the input string. For a non-zero-terminated input string, this might have caused a segfault. Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Tue Oct 18 22:32:59 CEST 2011 on sn-devel-104
* lib/util: fix function header comment to strhex_to_str()Michael Adam2011-10-181-9/+8
| | | | The description did not match the function's behaviour.
* lib/util: untangle assignent from check in strhex_to_str()Michael Adam2011-10-181-2/+6
|
* util: add function to extend anonymous shared memorySimo Sorce2011-08-141-0/+64
|
* lib-util: Make create_unlink_tmp argument optionalSimo Sorce2011-08-101-1/+6
| | | | | | Use tmpdir() if no dir is provided. Signed-off-by: Andreas Schneider <asn@samba.org>
* lib-util: Make useful function a common utility.Simo Sorce2011-08-101-0/+32
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* Improve debug messages when creating socket directoriesAndrew Bartlett2011-05-081-1/+2
| | | | | | This makes clear what the permissions error and directory name actually is Andrew Bartlett
* lib: Move next_token next to next_token_tallocVolker Lendecke2011-04-131-0/+46
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* lib/util: add anonymous_shared_free()Stefan Metzmacher2011-01-201-2/+39
| | | | metze
* lib/util: s/allocate_anonymous_shared/anonymous_shared_allocate/Stefan Metzmacher2011-01-201-1/+1
| | | | metze
* lib/util: fix rounding to page size in allocate_anonymous_shared()Stefan Metzmacher2011-01-201-1/+5
| | | | metze
* Add dump_data_cb()Volker Lendecke2010-10-241-21/+40
|
* Add print_asc_cb()Volker Lendecke2010-10-241-3/+21
|
* lib/util: usec_time_diff takes arguments the other way round than TvalDiff didBjörn Jacke2010-09-171-1/+1
|
* s3/s4: merge msleep and smb_msleepBjörn Jacke2010-09-161-7/+42
| | | | | the merged variant is renamed to smb_msleep as some platforms already have a msleep function.
* lib/util: remove some unused_result warnings.Günther Deschner2010-09-091-2/+7
| | | | Guenther
* util: added samba_start_debugger()Andrew Tridgell2010-09-041-0/+14
| | | | | This developer function is useful for debugging unusual error conditions
* lib/util: add allocate_anonymous_shared()Stefan Metzmacher2010-03-221-0/+28
| | | | metze
* Spelling fixes for libutilBrad Hards2010-02-221-1/+1
| | | | Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
* s4:UID wrapper - Fix includesMatthias Dieter Wallnöfer2010-02-051-0/+9
| | | | | | | The includes of the UID wrapper headers werent't really efficient according to metze's post on the technical mailing list (http://lists.samba.org/archive/samba-technical/2010-February/069165.html). To achieve this move the "uid_wrapper.h" includes into "lib/util/unix_privs.c", "lib/util/util.c", "ntvfs/posix/pvfs_acl.c" and "ntvfs/unixuid/vfs_unixuid.c".