Andrew Tridgell
8756e13009
util: added samba_runcmd()
...
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>
2010-02-17 19:43:32 +11:00
Andrew Tridgell
ae95d611b6
util: added file_compare() utility function
...
file_compare() returns true if two files are the same. It is meant for
small files.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-11 21:04:13 +11:00
Matthias Dieter Wallnöfer
012494b800
util/util_strlist - add a call "const_str_list" for making "unconst" lists "const"
2009-12-01 16:46:29 +11:00
Matthias Dieter Wallnöfer
94c33bdd72
util/strlist: Fix up "const" warnings in the string list and test code
...
This work I did using suggestions by Jelmer.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-20 16:50:47 +01:00
Andrew Bartlett
7a290130bd
lib/util Use rfc1738.c from Squid for all our URL encode/decode needs.
...
Andrew Bartlett
2009-11-02 16:36:52 +11:00
Jeremy Allison
d1aa7d4796
Remove the const from the str_list_XXX functions that
...
allocate both list and containing strings. This fixes
problems that people have tried to cast away and are
not needed.
Jeremy.
2009-09-24 15:52:58 -07:00
Andrew Bartlett
5a01071692
libcli:nbt put util_net.c protos in new header file
...
This fixed a very odd build problem due to util.h importing
system/network.h being imported before the uid_wapper code.
Andrew Bartlett
2009-09-15 10:38:53 -07:00
Andrew Bartlett
668470c992
libcli:nbt make the lmhosts parsing code and dependicies common
...
This starts the process to have Samba4 use lmhosts.
Andrew Bartlett
2009-09-15 07:42:54 -07:00
Matthias Dieter Wallnöfer
7669bc3c89
util_strlist: Add some more "const"s
2009-09-10 07:27:15 +02:00
Steven Danneman
11bd19c007
lib/util: add unique string generator helper function
2009-09-08 13:43:06 -07:00
Günther Deschner
bff54b90c3
util: move add_gid_to_array_unique to toplevel and add add_uid_to_array_unique.
...
Guenther
2009-05-29 13:49:58 +02:00
Andrew Bartlett
a89bee4c98
Add new functions and tests: str_list_make_empty(), str_list_make_single()
2009-05-14 05:56:58 +10:00
Volker Lendecke
2467ae1b6a
Clean up after Tridge's util_strlist changes
2009-05-03 13:46:44 +02:00
Andrew Tridgell
fd7c52231f
added _const versions of some of the str_list_*() functions
...
These const versions don't copy the strings themselves, which
is useful when those strings point at known constant data (into the
schema in this case)
2009-04-09 14:28:38 +10:00
Andrew Tridgell
4f69d7067d
added str_list_unique() and str_list_show()
...
I also undid some of the const changes from Andrew, as
they didn't in fact resolve the const warnings.
2009-04-09 13:44:27 +10:00
Andrew Bartlett
54f7523db1
Rework util_strlist prototypes to use a bit more and less const
...
Hopefully this produces less warnings, but it might produce more...
Andrew Bartlett
2009-04-08 23:18:13 +10:00
Stefan Metzmacher
b00204a461
lib/util: remove samba specific talloc_get_type_abort()
...
metze
2009-03-03 18:07:33 +01:00
Jelmer Vernooij
d776ac03c3
Move next_token_talloc() to top-level.
2009-03-01 16:16:16 +01:00
Steven Danneman
8d63c596a0
Refactored sys_fork() and sys_pid() into shared util library
...
This fixes a bug in 116ce19b
, where we didn't clear the pid cache in
become_daemon() and thus the /var/run/smbd.pid didn't match the actual
pid of the parent process.
Currently S4 will clear the pid cache on fork but doesn't yet take
advantage of the pid cache by using sys_pid() instead of the direct
get_pid().
2009-02-23 21:17:12 -08:00
Tim Prouty
39b508e38e
Fix shadowed declaration warning
2009-02-21 14:00:05 -08:00
Steven Danneman
116ce19b10
Moved become_daemon() and close_low_fds() to shared util lib
2009-02-20 16:30:12 -08:00
Volker Lendecke
0844cca1d5
Replace get_myname() with the talloc version from v3-3-test
2009-02-13 12:15:03 +01:00
Jelmer Vernooij
0afa0ab442
Revert "s3/s4: Move CONST_DISCARD into lib/util so it's available from s3 and s4"
...
lib/util already has discard_const_p.
This reverts commit 0cb430c22e
.
2009-02-09 17:48:30 +01:00
Tim Prouty
0cb430c22e
s3/s4: Move CONST_DISCARD into lib/util so it's available from s3 and s4
2008-12-30 16:19:42 -08:00
Tim Prouty
2b85288e82
s3 build: Fix incomplete types warnings
2008-11-20 13:11:59 -08:00
Jelmer Vernooij
e5081d6dad
Move ABS() to libutil.
2008-11-01 20:44:12 +01:00
Jelmer Vernooij
d880faae92
Fix includes in installed version of talloc_stack.h.
2008-11-01 15:13:00 +01:00
Jelmer Vernooij
dfc78b1dc2
Only provide valgrind_strlen prototype when it's being compiled in.
2008-11-01 03:27:41 +01:00
Jelmer Vernooij
9de80e7abc
Samba3: Include util.h header file rather than having custom prototypes.
2008-11-01 03:14:43 +01:00
Jelmer Vernooij
0218669d62
Remove include/local.h and move defines to more appropriate places.
2008-10-24 17:53:38 +02:00
Jelmer Vernooij
09a63accb8
Move charset library to top level.
2008-10-24 00:06:35 +02:00
Jelmer Vernooij
fe36fe8c3e
Use common net utility code (address and sockaddr manipulation).
2008-10-23 20:41:15 +02:00
Jelmer Vernooij
cf659fa4fe
Import talloc_stack into util library.
2008-10-23 17:27:30 +02:00
Jelmer Vernooij
87ec1d2532
Make sure prototypes are always included, make some functions static and
...
remove some unused functions.
2008-10-20 18:59:51 +02:00
Jelmer Vernooij
0dfd5601a0
Move discard_const hack to memory.hso it can be used by Samba 3.
2008-10-20 17:15:17 +02:00
Jelmer Vernooij
17b12ee183
Add extra parameter consistent with samba3.
2008-10-18 19:03:19 +02:00
Jelmer Vernooij
6a89b59ca6
Add TALLOC_CTX pointer to strhex_to_data_blob for consistency with Samba
...
3.
2008-10-18 18:09:04 +02:00
Jelmer Vernooij
2d89b52be8
Use separate make variables for libutil and libcrypto.
2008-10-18 14:28:40 +02:00
Jelmer Vernooij
fcce58cc61
Add extra argument free_on_fail to realloc_array() in Samba 4, as used by Samba 3.
2008-10-18 14:12:56 +02:00
Jelmer Vernooij
dc5dc3b469
Move some of the memory utility macros to a separate header (for now).
2008-10-18 13:59:21 +02:00
Jelmer Vernooij
0132423a09
Share libndr.h between Samba 3 and Samba 4.
2008-10-15 00:35:13 +02:00
Jelmer Vernooij
1b99d8fbb5
Use common util_file code.
2008-10-12 17:34:43 +02:00
Jelmer Vernooij
218f482fbf
Use common strlist implementation in Samba 3 and Samba 4.
2008-10-12 00:56:56 +02:00
Jelmer Vernooij
5c44ed6954
Clean up properly.
2008-10-11 21:33:15 +02:00
Jelmer Vernooij
caa4e42860
Move lib/util from source4 to top-level libutil.
...
Conflicts:
source4/Makefile
2008-10-11 21:05:38 +02:00