Kamen Mazdrashki
540759ec4d
s4/drsuapi: ber_read_partial_OID_String() implementation
2009-10-01 23:12:58 +02:00
Kamen Mazdrashki
55dfc116f4
s4/drsuapi: Internal implementation for ber_read_OID_String
...
Modified implementation _ber_read_OID_String_impl()
returns how much bytes are converted.
The intentation is to use this implementation both for
reading OIDs and partial-OIDs in the future
2009-10-01 23:12:58 +02:00
Kamen Mazdrashki
715c790600
s4/drsuapi: ber_write_partial_OID_String() implementation
2009-10-01 23:12:57 +02:00
Andrew Kroeger
c5dba4a82e
s4:torture: data_blob_hex_string() output is now lowercase.
...
Based on the change in commit fb84edabbe
, these
tests needs to expect lowercase output.
2009-09-30 16:02:14 +02:00
Jelmer Vernooij
d9ada600cc
parmlist: Add more tests.
2009-09-27 17:37:53 +02:00
Jelmer Vernooij
db55ea08bc
parmlist: Add basic tests for test_get_int().
2009-09-27 14:39:58 +02:00
Jelmer Vernooij
c145888cec
util/parmlist: Add some more comments.
2009-09-27 14:13:38 +02:00
Jelmer Vernooij
2dd7c9bc34
libutil: Add separate utility code for dealing with settings as a
...
collection of key/value pairs.
2009-09-26 23:59:35 +02:00
Günther Deschner
014a3a9926
lib/util: fix build warning.
...
Guenther
2009-09-25 15:19:07 +02: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 Tridgell
bb3bdb3a62
s4-ldb: added a bunch more debug for DC join
...
These additional debug messages were added to help us track down
w2k8->s4 domain join
2009-09-22 17:10:06 -07:00
Andrew Tridgell
fb84edabbe
s4-util: windows only accepts lowercase hex encodings for extended DNs
2009-09-22 17:10:05 -07:00
Kouhei Sutou
f8dae40fc8
spnego: Support ASN.1 BIT STRING and use it in SPNEGO.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-09-17 20:10:54 +02: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
41596d2c43
util_strlist: Add some more "const"s - small correction
2009-09-10 22:07:47 +02: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
Matthias Dieter Wallnöfer
56a0f995b8
s4:tests/iconv - Fix a warning
2009-09-07 12:38:44 +02:00
Inra
7ce01743c1
s4: Fix "Small memory leak after calling several times lp_update"
...
Should fix bug #6660 .
2009-09-07 09:40:34 +02:00
Andrew Kroeger
a32f4dd3cf
util:tests: Correct time tests for negative UTC offsets.
...
All:
Please find attached a patch to fix the timestring and http_timestring
tests on hosts that have a negative UTC offset (west of the Prime Meridian).
Sincerely,
Andrew Kroeger
>From 8a8ca35edccf64aa98f2f3ae1469c4c27db8215e Mon Sep 17 00:00:00 2001
From: Andrew Kroeger <andrew@id10ts.net>
Date: Fri, 4 Sep 2009 01:31:50 -0500
Subject: [PATCH] util:tests: Correct time tests for negative UTC offsets.
The timestring and http_timestring tests were failing on hosts with negative
offsets from UTC. Due to the timezone offset, the returned values were back in
the year 1969 (before the epoch) and did not match the test patterns.
The correction computes the offset from UTC, and if it is negative that offset
is added onto the value given to the timestring() and http_timestring() calls so
that the returned values fall on 01-Jan-1970 and match the test pattern.
2009-09-05 10:06:29 +10:00
Michael Adam
cc248f7dfc
util: fix comment and clarify argument name in DLIST_DEMOTE()
...
Michael
2009-08-27 22:29:22 +02:00
Jeremy Allison
e829ca560d
Fix make test.
...
Jeremy.
2009-08-24 11:24:10 -07:00
Kouhei Sutou
7fc94932ad
Rename ASN1_BITFIELD to ASN1_BIT_STRING.
...
X.690 uses "BIT STRING" not "BIT FIELD".
2009-08-11 12:59:14 +02:00
Andrew Tridgell
58e5e1ea8d
make the UID_WRAPPER skip checks at runtime
...
This fixes two issues pointed out by Andrew. It adds a runtime
uwrap_enabled() call that wraps the skips needed for uid emulation. It
also makes the skip in the directory_create_or_exist() function only
change the uid checking code, not the permissions code
2009-08-05 11:21:06 +10:00
Andrew Tridgell
fd43e0ee09
added a uid_wrapper library
...
This library intercepts seteuid and related calls, and simulates them
in a manner similar to the nss_wrapper and socket_wrapper
libraries. This allows us to enable the vfs_unixuid NTVFS module in
the build farm, which means we are more likely to catch errors in the
token manipulation.
The simulation is not complete, but it is enough for Samba4 for
now. The major areas of incompleteness are:
- no emulation of setreuid, setresuid or saved uids. These would be
needed for use in Samba3
- no emulation of ruid changing. That would also be needed for Samba3
- no attempt to emulate file ownership changing, so code that (for
example) tests whether st.st_uid matches geteuid() needs special
handling
2009-08-05 10:51:00 +10:00
Stefan Metzmacher
2ef1159c0d
util/asn1: fix potential memory leak in asn1_write_OID()
...
metze
2009-07-31 14:42:02 +02:00
Volker Lendecke
7c768ddab6
No explicit initialization necessary for a zero blob
2009-07-25 12:59:21 -04:00
Tim Prouty
04c3dfde0f
lib util: Fix const warning
2009-07-20 16:08:24 -07:00
Slava Semushin
5f8df16471
lib/util/util_file.c(file_save): fixed file descriptor leak when read(2) fails.
...
Found by cppcheck:
[./lib/util/util_file.c:383]: (error) Resource leak: fd
2009-07-19 16:00:39 +02:00
Matthieu Patou
a817cff5a0
Fix broken password quality check
...
This fixes broken password tests when the passwords contain non ASCII characters
(e.g. accentuated chars like ('e, `e, ...)
2009-07-19 16:00:19 +02:00
Michael Adam
8d982d91f2
lib/util: fix order of includes in tevent_ntstatus.c
...
replace.h needs to be included first.
Michael
2009-07-01 11:14:54 +02:00
Michael Adam
e4e855563b
lib/util: fix building tevent_ntstatus without config.h
...
(when called from places with "#define NO_CONFIG_H" set, such as configure)
Michael
2009-06-29 16:51:52 +02:00
Andrew Bartlett
6e92505080
Fix ndrdump to use a common setup_logging() API
...
By adding a new common setup_logging_stdout() API, we no longer need to abuse the ABI compatability between the different setup_logging() calls in Samba3 and Samba4's DEBUG() subsystems.
The revert of 49a6d757b4
works with this
to fix bug 6211.
Andrew Bartlett
2009-06-29 20:12:23 +10:00
Andrew Bartlett
0e95b807b9
Revert "s4:debug: make setup_logging() a bit more compatible with samba3"
...
The problem is that the enum was previously a 'rachet', that is, it
would only reset to a level higher than it was previouly set to.
Changing the order broke file-based logging for our production sites.
This reverts commit 49a6d757b4
.
2009-06-29 19:57:57 +10:00
Nathaniel McCallum
1e21adaaf6
Two patches which fix issues on cross compiling/building
2009-06-29 13:39:52 +10:00
Volker Lendecke
22cb9bdfd3
Move asn1_load_nocopy() to lib/util/asn1.c
2009-06-20 18:54:07 +02:00
Volker Lendecke
ecf8cebf32
Move asn1_blob() to lib/util/asn1.c
2009-06-20 18:54:07 +02:00
Andrew Bartlett
223b30f593
Fix build of recurusion fix in reopen_logs()
2009-06-11 19:08:33 +10:00
Andrew Bartlett
e5353ce95b
Don't recurse in reopen_logs().
...
Use the state to avoid recursion in reopen_logs(), as DEBUG() can call
this function.
Andrew Bartlett
2009-06-11 18:54:32 +10:00
Günther Deschner
27bb7ac5d1
lib-util: move set_blocking() call into own file.
...
Guenther
2009-06-10 21:25:57 +02:00
Andrew Tridgell
d42019644b
added asn1 functions for handling booleans in a simple context
2009-06-10 11:45:53 +10:00
Jelmer Vernooij
7f52c8fb50
libsamba-util: Fix soversion.
2009-06-08 22:43:36 +02:00
Volker Lendecke
537b257cca
Use data_blob_null instead of data_blob(NULL, 0)
2009-06-06 10:42:55 +02:00
Andrew Tridgell
8ca8dabe46
add gendb_search_single_extended_dn()
...
This function searches for a single record using a given filter,
adding the extended-dn control so that any returned DNs will have the
GUID and SID fields returned. This will be used in the sam auth code
to prevent us doing a member= search for the groups, which invokes an
unindexed search.
2009-06-04 14:10:11 +10:00
Jelmer Vernooij
4602cc0ac1
Build libsamba-util as a shared library.
2009-06-02 18:05:40 +02:00
Volker Lendecke
3d9e1f605c
util: Change license on tevent_unix to LGPLv3+
2009-05-29 18:31:30 +02: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
d73eab2b33
Add extensive tests for str_list function behaviour
2009-05-15 01:50:06 +10:00
Volker Lendecke
074890b39e
Remove two unused variables
2009-05-14 15:40:57 +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
Derrell Lipman
045af600f2
Take advantage of the easier-to-use thread macros
...
- Now that we initialize for the non-thread-safe case in the macro, there's no
need to do it here too.
Derrell
2009-05-13 14:37:28 -04:00
Derrell Lipman
088906b064
Make the thread functions a bit easier to use
...
- Create separate macros for lock and unlock so that it's easier to identify
which request is being made.
- Initialize *ponce in the SMB_THREAD_ONCE macro in the non-thread-safe case,
rather than requiring each init function to determine if it's in the
non-thread-safe case and manually initialize.
Derrell
2009-05-13 14:37:28 -04:00
Derrell Lipman
e03b9ae609
Allow a parameter to smb_thread_once's initialization function
...
- This should make life easier for ourselves. We're no longer constrained to
the semantics of pthread_once, so let's allow passing a parameter to the
initialization function. Some of Samba's init functions return a
value. Although I haven't searched, I suspect that some of the init
functions require in input parameters. The parameter added here can be used
for input, output, or both, as necessary... or ignored, as is now done in
talloc_stackframe_init().
Derrell
2009-05-13 09:50:17 -04:00
Derrell Lipman
7c39e450fc
Fix broken smb_thread_once function (again)
...
- It would help if smb_thread_once did, eventually, set the variable that
prevents the init function from being run again. Sigh. It must be getting
late.
Derrell
2009-05-12 21:32:33 -04:00
Derrell Lipman
8a60c26c7c
Fix broken smb_thread_once function
...
- We can't set *ponce=true before running the function because although other
threads wouldn't re-run the initialization function, they could potentially
proceed beyond the initialization point while the first thread was still
running the initialization function. If a second thread gets to an
SMB_THREAD_ONCE() call while one with the same ponce is running, we need to
ensure that it enters smb_thread_once() to await the mutex and then recheck
whether *ponce is set or not. My original comment about other "once"
functions possibly being called from within this "once" function is
irrelevant since those other ones would have their own unique ponce.
Derrell
2009-05-12 21:24:34 -04:00
Jeremy Allison
6bc1ce996d
Fix definition of smb_thread_once - must return int not void as
...
it's used in a ? : comparison macro.
Jeremy.
2009-05-11 22:33:32 -07:00
Jeremy Allison
d0865aeb5d
Ensure documentation matches the tdb_util function usage.
...
Jeremy.
2009-05-11 17:29:16 -07:00
Derrell Lipman
915518c0db
Use bool instead of int for a boolean variable
2009-05-10 23:04:00 -04:00
Derrell Lipman
9a93dc092c
Optimize smb_thread_once usage by not calling it if known already called
...
- The macro SMB_THREAD_ONCE now tests whether the "once" variable is already
set, and if so avoids calling smb_thread_once().
Derrell
2009-05-10 22:58:12 -04:00
Derrell Lipman
404327ad41
Panic upon mutex lock or unlock failure
...
- It's a serious error if we can't lock or unlock a mutex in
smb_thread_once(). Panic instead of just displaying a DEBUG message.
Derrell
2009-05-10 22:45:12 -04:00
Derrell Lipman
418a2eeae8
Don't require external use of internal enum smb_thread_lock_type
...
- Internally, when locking or unlocking a mutex, we'll pass one of the
values of enum smb_thread_lock_type. That enum is not available to users
providing a thread implementation. Externally, we'll document the integer
values which will be passed to their lock_mutex function, but not require
them to access our internal header file.
Derrell
2009-05-10 22:45:12 -04:00
Derrell Lipman
d3434477e6
Replace external thread "once" with an internal implementation
...
Jeremy, please check...
- I'm in the process of providing an interface in libsmbclient to the
recently-added threading capabilities. In the process, I discovered that
different thread implementations have varying types for the variable passed
to the thread_impl_once() function. pthreads, for example, uses type
pthread_once_t. Since Samba needs to internally declare these variables, it
would need to know the exact type required by each thread implementation's
function. After considering multiple methods of obtaining an appropriately
sized variable, I decided that for the basic "once" functionality required
by Samba, it would be much simpler to just implement our own "once"
functionality. We don't require cancellation points et all. This commit adds
an smb_thread_once() function that is implemented using an internal
mutex. The mutex itself uses the implementation's create_mutex
function. This eliminates the need for the user to provide a smb_thread_once
function pointer and the entire issue of that function's first parameter.
Derrell
2009-05-10 22:45:12 -04:00
Volker Lendecke
2467ae1b6a
Clean up after Tridge's util_strlist changes
2009-05-03 13:46:44 +02:00
Volker Lendecke
46bbdbd8c7
Fix a missing prototype warning
2009-04-28 15:34:22 +02:00
Michael Adam
664da577f9
pm_process():raise level of debug message
...
Michael
2009-04-28 12:20:38 +02:00
Jelmer Vernooij
3cf48ee05a
Fix push_codepoint function without iconv_convenience.
2009-04-23 17:50:18 +02:00
Jelmer Vernooij
80420745ff
Add a new non-convenience version of push_codepoint.
2009-04-23 17:50:18 +02:00
Jeremy Allison
5cbd7556c2
Ensure we have all the definitions needed in both threaded and non-threaded versions.
...
Jeremy.
2009-04-20 04:25:26 -07:00
Jeremy Allison
399c765538
Attempt to fix build farm on platforms where pthread_once_t is a struct.
...
Jeremy.
2009-04-20 04:00:06 -07:00
Jeremy Allison
3d2e95c296
Fix the pthread_once initialization issue. Make talloc_stackframe use
...
this.
Jeremy.
2009-04-20 03:04:42 -07:00
Jeremy Allison
d9804ae3cc
Fix bug #6089 - Winbind samr_OpenDomain not possible with Samba 3.2.6+
...
What a difference a name makes... :-). Just because something is missnamed
SAMR_ACCESS_OPEN_DOMAIN, when it should actually be SAMR_ACCESS_LOOKUP_DOMAIN,
don't automatically use it for a security check in _samr_OpenDomain().
Jeremy.
2009-04-15 15:40:00 -07:00
Jeremy Allison
8e06e945b6
Ensure a tls key is only generated once - wrap create & destroy in a mutex.
...
Change the function names to add _once to the tls_create & tls_destroy to
make this obvious.
Jeremy.
2009-04-14 15:19:39 -07:00
Jeremy Allison
27a3118bcf
Make talloc_stack threadsafe using TLS. Volker please
...
check. Passes make test and basic valgrind testing.
Jeremy.
2009-04-14 12:23:22 -07:00
Andrew Tridgell
65ad2ced60
Merge branch 'wspp-schema'
2009-04-09 14:40:19 +10: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
Jeremy Allison
e5702da72c
Add the thread functions to top level lib/util.
...
Not yet used, that's the next step.
Jeremy.
2009-04-08 15:46:49 -07: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
Andrew Tridgell
ef6c6ab4c6
added a str_list_append() function
2009-04-07 16:33:26 +10:00
Stefan Metzmacher
7ce1356c9f
lib/util: fallback to any id in idr_get_new_random()
...
metze
2009-04-01 16:41:15 +02:00
Jelmer Vernooij
1e200c1952
Merge branch 'master' of git://git.samba.org/samba
2009-03-26 15:31:02 +01:00
Volker Lendecke
6a2e71b12d
Add tevent_req_simple_recv_ntstatus()
2009-03-24 13:23:40 +01:00
Jelmer Vernooij
ca202cf464
Merge branch 'master' of ssh://git.samba.org/data/git/samba into displaysec
2009-03-20 16:40:09 +01:00
Stefan Metzmacher
b69e72deda
lib/util: build tevent_unix.o and tevent_ntstatus.o as UTIL_TEVENT subsystem
...
metze
2009-03-19 16:25:58 +01:00
Jelmer Vernooij
4478756571
Strip /usr/include from include flags, so we don't end up including
...
the system tevent if it's too old.
2009-03-15 18:10:20 +01:00
Jelmer Vernooij
7972d82436
Remove -L/usr/lib from a couple more make variables.
2009-03-15 00:54:55 +01:00
Jelmer Vernooij
218ce0e805
Fix prototype mismatch.
2009-03-09 21:49:44 +01:00
Jelmer Vernooij
f992416e23
Revert accidental reintroduction of void ** bug.
2009-03-08 06:57:52 +01:00
Stefan Metzmacher
b00204a461
lib/util: remove samba specific talloc_get_type_abort()
...
metze
2009-03-03 18:07:33 +01:00
Jelmer Vernooij
c7b9757b8a
Import ISO-8859-1, 646 from Samba 3 iconv.
2009-03-02 04:12:57 +01:00
Jelmer Vernooij
7ab8f373c8
Use common header file for character set handling in Samba 3 and Samba 4.
2009-03-01 22:24:34 +01:00
Jelmer Vernooij
94069bd274
s4: Use same function signature for convert_* as s3.
2009-03-01 19:55:46 +01:00
Jelmer Vernooij
4903d20c21
Merge branch 'master' of git://git.samba.org/samba into convenience
2009-03-01 16:41:57 +01:00
Jelmer Vernooij
55903e6f91
Move next_token_talloc to util.c, as util_str.c is only compiled inside samba 4.
2009-03-01 16:19:38 +01:00
Jelmer Vernooij
d776ac03c3
Move next_token_talloc() to top-level.
2009-03-01 16:16:16 +01:00
Jelmer Vernooij
9f6e2d6485
Sync smb_iconv_t type, convert_string return type with Samba 3 equivalents.
2009-03-01 12:59:58 +01:00
Jelmer Vernooij
9ffb6d2d9e
Add allow_badcharcnv argument to all conversion function, for
...
consistency with Samba 3.
2009-03-01 06:33:40 +01:00
Volker Lendecke
4d22554e98
Add tevent_ntstatus
2009-02-26 13:04:33 +01:00
Volker Lendecke
c50233695e
Add tevent_req_is_unix_error
2009-02-24 20:40:46 +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
Volker Lendecke
c2f7f1b40b
Fix Coverity ID 707 (RESOURCE_LEAK)
2009-02-13 10:21: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
Volker Lendecke
cfc27ece10
Attempt to fix "make test" on host "tridge"
2009-02-02 15:39:13 +01:00
Stefan Metzmacher
48a0721606
lib/util: s/new/pn in idtree.c
...
metze
2009-02-02 13:09:16 +01:00
Stefan Metzmacher
5e6e370c4e
lib/util: s/class/dclass
...
metze
2009-02-02 13:09:16 +01:00
Simo Sorce
10c907bcdb
Fix headers, only ldb.h is required
2009-02-01 13:06:13 -05:00
Stefan Metzmacher
24a1b556fc
s4:lib/util: fix the build
...
metze
2009-01-30 18:42:08 +01:00
Stefan Metzmacher
94cb0835ca
s4:build: kill DEFAULT_HEADERS variable
...
metze
2009-01-30 17:38:40 +01:00
Jeremy Allison
77bac5b78c
Fix coverity CID#66. Resource leak in error path.
...
Jeremy.
2009-01-29 17:16:34 -08:00
Stefan Metzmacher
9967907190
util_str: setup the correct talloc name for strings
...
metze
(partly from samba4wins tree 447e7f9532131117e896712db9def321c96718eb)
2009-01-19 07:05:21 +01:00
Günther Deschner
87fec1450f
lib: add strlen_m_term_null from s3.
...
Guenther
2009-01-16 00:28:45 +01:00
Stefan Metzmacher
49a6d757b4
s4:debug: make setup_logging() a bit more compatible with samba3
...
In samba3 the 2nd argument is bool interactive.
E.g ndrdump uses true there which used to map to DEBUG_FILE
in samba4, it maps to DEBUG_STDOUT now, which is better.
In the end end samba3 should also use the samba4 version of
setup_logging()
metze
2009-01-09 13:10:07 +01:00
Jelmer Vernooij
078879735b
Print the failed value in the time tests.
2009-01-08 12:45:57 +01:00
Jelmer Vernooij
ba5d6e6d70
Avoid using a utility header for Python replacements included in Samba,
...
since this will not be shipped with talloc/tdb/tevent/etc.
2009-01-08 12:20:20 +01:00
Tim Prouty
61a23c5eea
s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4
2009-01-07 15:03:16 -08: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
Jelmer Vernooij
ef80d1b794
Fix use of "time offset" parameter, and add test to make sure I don't break it again :-)
2008-12-23 22:10:34 +01:00
Stefan Metzmacher
b97f17ddf1
lib/util: make it possible to use debug.h with using xfile.h
...
metze
2008-12-17 13:31:29 +01:00
Tim Prouty
1eb743ab8e
s3: Change sockaddr util function names for consistency
...
Also eliminates name conflicts with OneFS system libraries
2008-12-03 10:40:20 -08:00
Tim Prouty
2b85288e82
s3 build: Fix incomplete types warnings
2008-11-20 13:11:59 -08:00
Tim Prouty
1115b7b342
s3/s4 build: Fix execinfo and sasl build error when the libs/headers are in non-standard locations.
...
These configure checks have the correct flags at configure time, so
let's pass them through so they are used at compile time.
2008-11-18 17:43:51 -08:00
Stefan Metzmacher
64b6d2d3e3
lib/util: hex_encode_talloc(): fix error path and set talloc name
...
metze
2008-11-16 16:24:33 +01:00
Jelmer Vernooij
29177203e5
Rename class to "cls" since the first is a keyword name in C++. Thanks,
...
Brad.
2008-11-02 04:50:32 +01:00
Jelmer Vernooij
57a60f0920
Move lp_*() calls a bit higher up the calls tack.
2008-11-01 22:13:47 +01:00
Jelmer Vernooij
fa7bb8ac53
Remove convert_string_talloc_descriptor, add iconv_talloc().
2008-11-01 20:56:27 +01:00
Jelmer Vernooij
e5081d6dad
Move ABS() to libutil.
2008-11-01 20:44:12 +01:00
Jelmer Vernooij
1b05be1039
ALlow util/debug.h to be included more than once.
2008-11-01 15:21:31 +01:00
Jelmer Vernooij
d880faae92
Fix includes in installed version of talloc_stack.h.
2008-11-01 15:13:00 +01:00
Jelmer Vernooij
31fa08dcbd
Merge branch 'master' of /home/jelmer/samba3
...
Conflicts:
lib/replace/README
lib/replace/libreplace.m4
lib/replace/replace.c
source3/include/proto.h
source3/lib/system.c
2008-11-01 04:02:47 +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
ce67cf0456
Install additional libutil headers.
2008-11-01 01:29:12 +01:00
Andrew Tridgell
55d55d9d9b
finished adding UTF16_MUNGED charset
...
Changed the approach for the charset to go via utf16, which makes a
bit more sense to read.
Added a testsuiite for UTF16_MUNGED as part of LOCAL-ICONV
2008-10-31 15:41:34 +11:00
Andrew Tridgell
391264a100
added a new charset for string2key
...
This charset follows the rules for converting random buffers to utf8
strings, matching the way windows does it. This should allow us to be
compatible for the generation of AES keys
2008-10-31 13:51:37 +11: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
23302413b3
Remove unused include param/param.h.
2008-10-24 16:37:56 +02:00
Jelmer Vernooij
f7692d16e3
Remove more global_loadparm instances, fix syntax errors.
2008-10-24 16:12:14 +02:00
Jelmer Vernooij
c3415b3e57
Add version of next_codepoint without iconv_convenience.
2008-10-24 16:00:43 +02:00
Jelmer Vernooij
61013deff8
Remove dependency of charset code on loadparm.
2008-10-24 14:45:31 +02:00
Jelmer Vernooij
37d885c51a
Remove iconv_convenience argument from convert_string{,talloc}() but
...
make them wrappers around convert_string{,talloc}_convenience().
2008-10-24 14:26:46 +02:00
Jelmer Vernooij
5d146d0178
Avoid retrieving iconv convenience during loops.
2008-10-24 04:39:09 +02:00
Jelmer Vernooij
922a29992e
Remove iconv_convenience parameter from simple string push/pull
...
functions.
2008-10-24 03:40:09 +02:00
Jelmer Vernooij
7ec58471df
Split up codepoints code, use consistent _m suffix.
2008-10-24 02:51:03 +02:00
Jelmer Vernooij
5e4767b532
Rename string_replace_w to string_replace_m, which is more correct.
2008-10-24 01:19:33 +02:00
Jelmer Vernooij
420781bf46
Remove unnecessary include, improve function name.
2008-10-24 01:18:56 +02:00
Jelmer Vernooij
09a63accb8
Move charset library to top level.
2008-10-24 00:06:35 +02:00
Jelmer Vernooij
22f566c39b
Move set_sockaddr_port to libutil.
2008-10-23 21:08:13 +02:00
Jelmer Vernooij
fe36fe8c3e
Use common net utility code (address and sockaddr manipulation).
2008-10-23 20:41:15 +02:00
Jelmer Vernooij
d1bc7e56d0
Rename same_net to same_net_v4 for consistency with Samba 3.
2008-10-23 19:56:09 +02:00
Jelmer Vernooij
d70efa57ce
Merge branch 'master' of git://git.samba.org/samba
...
Conflicts:
lib/util/asn1_proto.h
2008-10-23 18:04:16 +02:00
Jelmer Vernooij
2f265feb17
Inline asn1_proto.h since the API is stable and public.
2008-10-23 18:03:20 +02:00
Jelmer Vernooij
d805c714bb
Merge branch 'master' of ssh://git.samba.org/data/git/samba
2008-10-23 17:51:30 +02:00
Volker Lendecke
3f0406f609
Optimize x_fread to speed up the smbclient put command
2008-10-23 17:45:52 +02:00
Jelmer Vernooij
cf659fa4fe
Import talloc_stack into util library.
2008-10-23 17:27:30 +02:00
Jelmer Vernooij
44b728958a
Use common error definitions.
2008-10-23 15:35:21 +02:00
Jelmer Vernooij
94c522b1ab
Import NTSTATUS defines from Samba 3.
2008-10-23 03:29:20 +02:00
Günther Deschner
9994cbffa7
s3-build: temporarily add asn1_proto file.
...
Jelmer, how can we get this autogenerated from samba3 in the non merged-build
case ?
Guenther
2008-10-22 21:58:00 +02:00
Günther Deschner
5d805425b9
lib-util: merge from s3 asn1.
...
Guenther
2008-10-22 21:37:36 +02:00
Günther Deschner
d81a9a9837
lib-util: fix c++ compile warning.
...
Guenther
2008-10-22 21:37:36 +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
93e52145a8
Provide two symbols to allow ndrdump compiled by Samba 3 to be used for
...
Samba 4.
2008-10-20 13:24:16 +02:00
Jelmer Vernooij
085e7b0b6c
Fix segfault when using DEBUG() in the merged build.
2008-10-19 14:14:55 +02:00
Jelmer Vernooij
069437a2fa
Just call talloc_free directly rather than through a helper function.
2008-10-19 13:52:56 +02:00
Jelmer Vernooij
8e704e4107
Move more functions out of util_str.c into the shared util.c.
2008-10-19 12:38:16 +02:00
Jelmer Vernooij
c484b0465c
Move SMB-specific attribute function to SMB client library.
2008-10-19 10:45:02 +02:00
Günther Deschner
7966b00b3a
lib/util: fix strhex_to_data_blob to use data_blob_talloc.
...
Jelmer, I'm pretty sure you wanted to do this. Please check.
Guenther
2008-10-18 22:46:37 +02:00
Jelmer Vernooij
17b12ee183
Add extra parameter consistent with samba3.
2008-10-18 19:03:19 +02:00
Jelmer Vernooij
2243479b74
Merge branch 'master' of ssh://git.samba.org/data/git/samba
2008-10-18 18:30:10 +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
63de2d9823
Move substitute functions to a different file.
2008-10-18 15:56:45 +02:00
Jelmer Vernooij
23c95c9119
Add libutil README file.
2008-10-18 15:49:11 +02:00
Jelmer Vernooij
b3b6d8f3f9
Fix const, dupes.
2008-10-18 15:00:18 +02:00
Jelmer Vernooij
2d89b52be8
Use separate make variables for libutil and libcrypto.
2008-10-18 14:28:40 +02:00
Jelmer Vernooij
519458a2fa
Use shared util.c.
2008-10-18 14:27:13 +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
3189d14152
Use the new memory macro file from Samba 3.
2008-10-18 14:07:51 +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
fd443f819e
Use common fusage implementation.
2008-10-14 02:16:27 +02:00
Tim Prouty
abe443a65e
Remove extraneous comment from 0a33d8bd31
2008-10-13 15:10:23 -07:00
Tim Prouty
0a33d8bd31
Check for f_frsize when using statvfs
...
Add a configure test for the availability of f_frsize in struct
statvfs (for broken platforms that define statvfs but still have
f_bsize/f_iosize). Ported from source3's fsusage:
commit 472519eb69
2008-10-13 14:24:08 -07:00
Jelmer Vernooij
65d5b1e7b4
Test maxsize parameter to file_load() as used in Samba 3.
2008-10-13 16:40:27 +02:00
Jelmer Vernooij
eaba778416
Add test for data_blob_string_const_null.
2008-10-13 16:29:19 +02:00
Jelmer Vernooij
aa982895e5
Add data_blob_string_const_null() function that includes the terminating
...
null byte and use it in Samba 3.
This matches the behaviour prior to my data_blob changes.
2008-10-13 05:20:26 +02:00
Günther Deschner
d5a11f9679
fix build warnings.
...
Guenther
2008-10-13 00:40:57 +02:00
Jelmer Vernooij
3994c42f19
Fix number of arguments for file_load() functions.
2008-10-12 19:46:38 +02:00
Jelmer Vernooij
3b0a1b0363
Make util_tdb.h static since it is now used by Samba3.
2008-10-12 17:50:41 +02:00
Jelmer Vernooij
1b99d8fbb5
Use common util_file code.
2008-10-12 17:34:43 +02:00
Jelmer Vernooij
7d371c684d
Sync util_tdb implementations.
2008-10-12 16:53:17 +02:00
Jelmer Vernooij
a52e729f30
Move rbtree.[ch] to lib/util.
2008-10-12 16:27:00 +02:00
Jelmer Vernooij
a19929dac1
Add more tests to datablob testsuite.
2008-10-12 05:59:50 +02:00
Jelmer Vernooij
c4d3dc849f
Add extra const.
2008-10-12 02:27:38 +02:00
Jelmer Vernooij
d7371dae24
Add one-test testsuite for datablob.
2008-10-12 01:56:11 +02:00
Jelmer Vernooij
771e25b63b
Avoid problems with paranoid malloc checker.
2008-10-12 01:48:22 +02:00
Jelmer Vernooij
348be5f1e4
Share data_blob implementation.
2008-10-12 01:46:15 +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
cb78d4593b
Cope with changed signature of http_timestring().
2008-10-11 23:57:44 +02:00
Jelmer Vernooij
75a36a9a54
Add some simple tests for lib/util/time.c
2008-10-11 23:25:35 +02:00
Jelmer Vernooij
bb33097fb7
Make sure x_fdup compiles on Samba 4.
2008-10-11 22:23:07 +02:00
Jelmer Vernooij
e439b3e7ab
Use xfile from common lib/util in Samba 3.
...
Conflicts:
source3/Makefile.in
2008-10-11 21:52:55 +02:00
Jelmer Vernooij
7a27c07a27
Remove duplicate copy of dlinklist.h.
2008-10-11 21:48:00 +02:00
Jelmer Vernooij
5c44ed6954
Clean up properly.
2008-10-11 21:33:15 +02:00
Jelmer Vernooij
9565999755
Fix include paths to new location of libutil.
2008-10-11 21:31:42 +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