summaryrefslogtreecommitdiff
path: root/lib/util/util.h
Commit message (Collapse)AuthorAgeFilesLines
* lib/util: add dump_data_diff*() helpersStefan Metzmacher2022-01-241-0/+28
| | | | | | | | | | That will make it easy to see the difference between two memory buffers. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14956 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib: relicense smb_strtoul(l) under LGPLv3Ralph Boehme2020-08-031-13/+0
| | | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Aug 3 22:21:04 UTC 2020 on sn-devel-184
* util: cleanup API change for strtoul(l) wrappersSwen Schillig2019-06-301-5/+0
| | | | | | Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* lib: Prepare for strtoul_err(), strtoull_err() API changeSwen Schillig2019-06-301-2/+7
| | | | | | | | | In order to still be bisectable when changing the API for the wrappers strtoul_err() and strtoull_err() some preparations need to be performed. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* lib: Add flag definitions to control the internal string to int conversion ↵Swen Schillig2019-06-301-0/+7
| | | | | | | | | | | | | | | | routines The following flags are defined intially SMB_STR_STANDARD # raise error if negative or non-numeric SMB_STR_ALLOW_NEGATIVE # allow strings with a leading "-" SMB_STR_FULL_STR_CONV # entire string must be converted SMB_STR_ALLOW_NO_CONVERSION # allow empty strings or non-numeric SMB_STR_GLIBC_STANDARD # act exactly as the standard glibc strtoul Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* util: Add two wrapper for string to int conversionSwen Schillig2019-03-011-0/+7
| | | | | | | | | Adding wrapper strtoull_err and strtoul_err to handle error conditions of the conversion process. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Add a new header file for functions in lib/util/util.c.Jelmer Vernooij2016-01-131-0/+53
| | | | | | | | | This allows public headers to not include samba_util.h, but rather specific header files under lib/util. Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-By: Andrew Bartlett <abartlet@samba.org> Reviewed-By: Stefan Metzmacher <metze@samba.org>
* build: avoid util.h as a public header name due to conflict with MacOSAndrew Bartlett2011-09-231-917/+0
|
* lib: added base64_decode_data_blob_talloc()Andrew Tridgell2011-09-081-0/+8
| | | | | | its nice to be able to allocate on other than NULL Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* util: add function to extend anonymous shared memorySimo Sorce2011-08-141-0/+1
|
* lib-util: Make useful function a common utility.Simo Sorce2011-08-101-0/+5
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* libcli/smb move enum protocol_types to a common headerAndrew Bartlett2011-07-061-15/+0
|
* lib/util: Use common d_printf() in the whole codebaseAndrew Bartlett2011-06-211-3/+0
| | | | | | | | | This removes the lang_tdb based varient, the only user of the lang_tdb code is SWAT, which calls that directly. 'net' and 'pam_winbind' are internationalised using gettext. Andrew Bartlett
* lib/util Make unused d_vfprintf() staticAndrew Bartlett2011-06-211-1/+0
|
* lib/util Bring procid_str() into lib/util as server_id_string()Andrew Bartlett2011-06-091-0/+2
| | | | | | | This is needed for OpenChange, which prints Samba struct server_id values in debug messages. Andrew Bartlett
* lib/util use modules_path(), data_path() and shlib_ext() from source3Andrew Bartlett2011-06-061-0/+26
| | | | | | | | | | This brings these helpful utility functions in common, as they are not based on either loadparm system. (The 'modules dir' parameter from Samba4 will shortly be removed, so there is no loss in functionality) Andrew Bartlett
* lib/util Move sys_memalign into lib/util/system.cAndrew Bartlett2011-05-311-0/+2
|
* lib/util don't use enum protocol_types in ms_fnmatch_protocolAndrew Bartlett2011-05-061-1/+1
| | | | | | | | | | This makes it easier to compile this in the top level with s3 and s4 headers. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri May 6 08:50:52 CEST 2011 on sn-devel-104
* lib/util Rename ms_fnmatch() to ms_fnmatch_protocol() to avoid dup symbolAndrew Bartlett2011-05-061-2/+3
| | | | | | | This verison of the function takes a protcol as argument to determine matching rules. Andrew Bartlett
* I added them, so I get to kill them :-). Finally remove all uses of ↵Jeremy Allison2011-05-041-12/+0
| | | | | | | safe_strcpy and safe_strcat. Change to strlcpy, strlcat. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed May 4 22:14:14 CEST 2011 on sn-devel-104
* lib/util Use compiler-checked safe string macros in top level code.Andrew Bartlett2011-05-031-2/+4
| | | | | | | This brings the 'safe' macros to the top level code, and removes duplication of the safe_strcpy() and safe_strcat() functions. Andrew Bartlett
* lib/util Move more network utility functions from source3 into lib/utilAndrew Bartlett2011-05-031-1/+13
| | | | | | This will help with the merge of the interfaces layer. Andrew Bartlett
* lib/util Rename conv_str_size() -> conv_str_size_error()Andrew Bartlett2011-04-301-3/+1
|
* lib/util Re-merge the string_sub() and all_string_sub() from source3Andrew Bartlett2011-04-291-0/+2
| | | | Andrew Bartlett
* lib/util Move base64 functions into lib/util/base64.cAndrew Bartlett2011-03-301-0/+13
| | | | Andrew Bartlett
* lib: removed a spurios declaration of 'logfile'Andrew Tridgell2011-03-291-1/+0
| | | | | | we don't have a global logfile variable any more Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* fault: fixed smb_panic() prototypesAndrew Tridgell2011-03-231-2/+0
| | | | | Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Mar 23 01:51:44 CET 2011 on sn-devel-104
* fault: get fault.c ready for use by s4Andrew Tridgell2011-03-231-6/+7
| | | | | this moves the s3 specific dumpcore code into source3/lib/dumpcore.c, and uses a function pointer to setup which smb_panic call to use
* lib: fixed header pathsAndrew Tridgell2011-03-151-8/+8
| | | | | this is a public header, and needs to use sane paths for the public header creation
* s3:auth: change num_groups to from size_t to uint32_tStefan Metzmacher2011-02-221-2/+2
| | | | | | This will help with the change from UNIX_USER_TOKEN to security_unix_token metze
* lib/util Remove #if _SAMBA_BUILD_ == 4 that isn't required any moreAndrew Bartlett2011-02-181-2/+0
|
* s4-util: removed the valgrind_strlen() routineAndrew Tridgell2011-02-181-7/+0
| | | | | | this was for a bug in valgrind from 7 years ago. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* lib/util: add anonymous_shared_free()Stefan Metzmacher2011-01-201-0/+1
| | | | metze
* lib/util: s/allocate_anonymous_shared/anonymous_shared_allocate/Stefan Metzmacher2011-01-201-1/+1
| | | | metze
* s4-dns: disable segfault handling in dlz_bind9Andrew Tridgell2010-12-211-0/+1
| | | | we don't want bind9 calling the Samba segv handler
* lib/util: remove useless ../lib/util/mutex.*Stefan Metzmacher2010-10-261-10/+0
| | | | | | | | | | Only the disabled process_thread.c registers uses the register fn, all other functions are not used anywhere. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Oct 26 23:29:46 UTC 2010 on sn-devel-104
* Add dump_data_cb()Volker Lendecke2010-10-241-0/+8
|
* Add print_asc_cb()Volker Lendecke2010-10-241-0/+3
|
* s3/s4: merge msleep and smb_msleepBjörn Jacke2010-09-161-1/+1
| | | | | the merged variant is renamed to smb_msleep as some platforms already have a msleep function.
* util: added samba_start_debugger()Andrew Tridgell2010-09-041-0/+4
| | | | | This developer function is useful for debugging unusual error conditions
* s3-smbd: Don't close stdout if we want to log to stdout.Andreas Schneider2010-03-261-1/+1
|
* libutil: moved the networking defines to util_net.hAndrew Tridgell2010-03-261-27/+0
| | | | These were causing thousands of warnings on solaris8
* lib/util: add allocate_anonymous_shared()Stefan Metzmacher2010-03-221-0/+5
| | | | metze
* lib/util: change samba_runcmd() to use tevent_req _send/_recvStefan Metzmacher2010-03-091-7/+8
| | | | metze
* lib/util: add generate_random_password()Stefan Metzmacher2010-02-261-0/+5
| | | | metze
* s4-dns: use a loadparm list for samba_runcmd() commandsAndrew Tridgell2010-02-261-1/+1
| | | | | | This allows commands with multiple arguments and quoting to be used, while still avoiding running a shell (and this having shell expansion problems)
* Spelling fixes for libutilBrad Hards2010-02-221-4/+4
| | | | Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
* util: added samba_runcmd()Andrew Tridgell2010-02-171-0/+17
| | | | | | | | | This allows us to run a child command in an async fashion, with control over logging of stdout and stderr (which appears in the Samba log file). This is useful for ensuring we don't miss important messages from rndc commands (for example). Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* util: added file_compare() utility functionAndrew Tridgell2010-02-111-0/+5
| | | | | | | file_compare() returns true if two files are the same. It is meant for small files. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* util/util_strlist - add a call "const_str_list" for making "unconst" lists ↵Matthias Dieter Wallnöfer2009-12-011-0/+5
| | | | "const"