1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

283 Commits

Author SHA1 Message Date
Andrew Tridgell
cbb3c6eece build: check for backtrace 2010-04-06 20:26:42 +10:00
Andrew Tridgell
b81100c710 debug: enable talloc logging
we want to ensure talloc warnings are printed in the log
2010-04-02 18:52:29 +11:00
Andrew Tridgell
0f113faea8 charset: look for the codepages in the right place
selftest runs from source3/source4. The codepages when not installed
are in ../codepages
2010-03-30 12:31:03 +11:00
Andreas Schneider
a6f25fc635 s3-smbd: Don't close stdout if we want to log to stdout. 2010-03-26 14:48:54 +01:00
Andrew Tridgell
525a4fb2c4 util: on FreeBSD true is in /usr/bin. Use execvp to find it 2010-03-26 19:03:22 +11:00
Andrew Tridgell
fae84f98e3 libutil: moved the networking defines to util_net.h
These were causing thousands of warnings on solaris8
2010-03-26 17:36:02 +11:00
Matthias Dieter Wallnöfer
31b4585489 convert_string_talloc_convenience - print out the input buffer in a better way (using dump_data since it isn't always directly readable) 2010-03-22 23:21:17 +01:00
Stefan Metzmacher
01f2c023f7 lib/util: add allocate_anonymous_shared()
metze
2010-03-22 17:15:10 +01:00
Volker Lendecke
56940a28ff Fix an uninitialized variable 2010-03-21 21:01:28 +01:00
Volker Lendecke
d097d9fb09 Use TALLOC_FREE in talloc_pop() 2010-03-21 17:12:23 +01:00
Volker Lendecke
0f3040a61f Use calloc instead of ZERO_STRUCTP in talloc_stackframe_create() 2010-03-21 17:12:23 +01:00
Volker Lendecke
6695b0e87d Trim an overlong line 2010-03-21 17:12:23 +01:00
Andrew Tridgell
55c45110e6 charset: fixed a problem with the global use of the iconv_convenience structure
We had a crash bug where a cached copy of a iconv convenience pointer
was used after being freed when loadparm asked for iconv to
reload. This could happen if a python module used a iconv based
function before loadparm was completed.

The fix is to ensure that any use of this pointer remains valid, by
reusing the pointer itself when it has already been initialised, but
filling in the child elements with the updated values.
2010-03-18 14:18:41 +11:00
Stefan Metzmacher
d23581b4d7 talloc_stack: reset stackframe pointers to NULL
This makes it easier to debug the code in future.

metze
2010-03-15 15:08:24 +01:00
Stefan Metzmacher
10ed809a1a talloc_stack: make sure we never let talloc_tos() return ts->talloc_stack[-1]
In smbd there's a small gab between TALLOC_FREE(frame); before
be call smbd_parent_loop() where we don't have a valid talloc stackframe.

smbd_parent_loop() calls talloc_stackframe() only within the while(1) loop.
As DEBUG(2,("waiting for connections")) uses talloc_tos() to construct
the time header for the debug message we crash on some systems.

metze
2010-03-15 15:08:23 +01:00
Andrew Bartlett
6441a5b0b9 Explain why we don't use certain characters in the generated pw 2010-03-11 15:34:01 +11:00
Endi S. Dewata
a6253a45c0 lib/util - Removed curly braces from generate_random_password(). 2010-03-11 15:31:08 +11:00
Andrew Bartlett
4ab3e220c4 Move prototype to header of common code for set_sockaddr_port 2010-03-11 11:27:47 +11:00
Stefan Metzmacher
6ea3393798 lib/util: change samba_runcmd() to use tevent_req _send/_recv
metze
2010-03-09 21:49:45 +11:00
Andrew Tridgell
ee4ae0e7ad s4-privs: add root_privileges_original_uid()
This can be used to get the uid we changed away from when we gained 
root privileges

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-03-05 23:07:31 +11:00
Stefan Metzmacher
792dd38d7c lib/util: add generate_random_password()
metze
2010-02-26 08:57:28 +01:00
Andrew Tridgell
b0b857d6ca s4-dns: use a loadparm list for samba_runcmd() commands
This allows commands with multiple arguments and quoting to be used,
while still avoiding running a shell (and this having shell expansion
problems)
2010-02-26 18:19:27 +11:00
Andreas Schneider
8ac0c9fc67 libutil: Remove obsolete signal type cast. 2010-02-23 12:23:44 +01:00
Brad Hards
dd89dc2c31 Spelling fixes for libutil
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:35 +01:00
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
0bedb9cf5e s4-dsdb: removed gendb_search_single_extended_dn()
Use dsdb_search_one() instead, which allows for arbitrary controls

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-16 21:10:51 +11:00
Andrew Tridgell
76a7382346 lib: use TYPESAFE_QSORT() in lib/ and libcli/ 2010-02-14 18:44:20 +11:00
Andrew Tridgell
282cc79454 s4-ldb: use TYPESAFE_QSORT() in the rest of the ldb code 2010-02-14 18:44:20 +11:00
Volker Lendecke
e371317686 use ZERO_STRUCT 2010-02-13 13:25:32 +01:00
Volker Lendecke
95ca53f3e0 Use ZERO_STRUCTP 2010-02-13 13:25:17 +01:00
Volker Lendecke
1a995ab51e s3: Fix a typo 2010-02-13 13:25:03 +01:00
Andrew Tridgell
63844609da util: added TYPESAFE_QSORT() macro
This makes it much harder to get the type of a qsort comparison
function wrong.
2010-02-13 22:36:11 +11:00
Volker Lendecke
ebc08b9938 s3: Add tdb_data_equal 2010-02-12 23:12:10 +01: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
Andrew Tridgell
91cb7b7c60 test:local added LOCAL-DLINKLIST testsuite
(cherry picked from commit 95a5bee2c30a67a35604b0456ab7836f6dc67702)
2010-02-10 15:55:34 -08:00
Andrew Tridgell
32809bd8c1 util: rewrite dlinklist.h so that DLIST_ADD_END() is O(1)
This changes the meaning of the ->prev pointer in our doubly linked
lists to point at the end of the list from the front of the list. That
allows us to implement DLIST_ADD_END() and related functions in O(1)
time, which can be a huge saving in many places in Samba.

This also means that the 'type' argument to various DLIST_*() macros
is no longer needed, but I have left it in for now to keep the
patchset small, which will make it easier to revert if any problems
are found. In the future we should remove the 'type' arguments.

(jra. Move the one use of DLIST_TAIL over to the new macros).
2010-02-10 15:53:58 -08:00
Jeremy Allison
32575ed70f Temporary changes to dlinklist to keep the implementation static whilst
uses of (list)->prev are moved over to DLIST_PREV. This will be replaced
when the final (new) version of the dlinklist.h header is added.

Jeremy.
2010-02-10 15:30:59 -08:00
Matthias Dieter Wallnöfer
16aa0744c6 s4:UID wrapper - Fix includes
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".
2010-02-05 19:47:26 +01:00
Matt Kraai
a7250eb142 Change uint_t to unsigned int in lib/util
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:17 +01:00
Stefan Metzmacher
ad6ea7b189 lib/util: remove data_blob_talloc_reference()
We want to avoid the usage of talloc_reference() in Samba.

metze
2010-01-29 11:16:44 +01:00
Andrew Tridgell
273a4d9803 s4-debug: removed debug_ctx(). It didn't catch on :-)
There was only one user, which isn't worth it for the overhead.
2010-01-09 10:15:13 +11:00
Björn Jacke
571ee54b79 lib/util: move TIME_T_MIN/MAX defines into header file 2010-01-07 00:50:29 +01:00
Brendan Powers
027cba6a49 Return NULL in strlower_talloc if src is NULL
Prevents strlower_talloc from segfaulting if you pass it a NULL string.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-12-18 14:27:43 +11:00
Andrew Tridgell
71943e8858 util: added binsearch.h for binary array searches
This was moved from the schema_query code. It will now be used in more
than one place, so best to make it a library macro. I think there are
quite a few places that could benefit from this.
2009-12-10 17:51:29 +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
c1cb1f7724 charset/tests/iconv - Remove the "const" from "ptr_in" to prevent "discard_const_p" use
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-20 16:50:49 +01: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
Volker Lendecke
4a777ec4d7 Attempt to fix the s4 build -- we can not use map_nt_error_from_unix in lib/ 2009-11-14 11:32:38 +01:00
Volker Lendecke
f38edcd61a Introduce tevent_req_poll_ntstatus 2009-11-14 11:03:28 +01:00
Volker Lendecke
c254349261 Introduce tevent_req_simple_finish_ntstatus 2009-11-14 11:03:28 +01:00