summaryrefslogtreecommitdiffstats
path: root/lib/util
Commit message (Collapse)AuthorAgeFilesLines
* util: fix comment and clarify argument name in DLIST_DEMOTE()Michael Adam2009-08-271-3/+3
| | | | Michael
* Fix make test.Jeremy Allison2009-08-241-0/+1
| | | | Jeremy.
* Rename ASN1_BITFIELD to ASN1_BIT_STRING.Kouhei Sutou2009-08-111-1/+1
| | | | X.690 uses "BIT STRING" not "BIT FIELD".
* make the UID_WRAPPER skip checks at runtimeAndrew Tridgell2009-08-052-5/+8
| | | | | | | 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
* added a uid_wrapper libraryAndrew Tridgell2009-08-052-0/+3
| | | | | | | | | | | | | | | | | | | | 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
* util/asn1: fix potential memory leak in asn1_write_OID()Stefan Metzmacher2009-07-311-0/+1
| | | | metze
* No explicit initialization necessary for a zero blobVolker Lendecke2009-07-251-3/+1
|
* lib util: Fix const warningTim Prouty2009-07-201-1/+1
|
* lib/util/util_file.c(file_save): fixed file descriptor leak when read(2) fails.Slava Semushin2009-07-191-0/+1
| | | | | Found by cppcheck: [./lib/util/util_file.c:383]: (error) Resource leak: fd
* Fix broken password quality checkMatthieu Patou2009-07-192-1/+4
| | | | | This fixes broken password tests when the passwords contain non ASCII characters (e.g. accentuated chars like ('e, `e, ...)
* lib/util: fix order of includes in tevent_ntstatus.cMichael Adam2009-07-011-1/+1
| | | | | | replace.h needs to be included first. Michael
* lib/util: fix building tevent_ntstatus without config.hMichael Adam2009-06-291-1/+0
| | | | | | (when called from places with "#define NO_CONFIG_H" set, such as configure) Michael
* Fix ndrdump to use a common setup_logging() APIAndrew Bartlett2009-06-292-1/+18
| | | | | | | | | 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 49a6d757b4d944cd22c91b2838beb83f04fbe1e9 works with this to fix bug 6211. Andrew Bartlett
* Revert "s4:debug: make setup_logging() a bit more compatible with samba3"Andrew Bartlett2009-06-291-1/+1
| | | | | | | | 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 49a6d757b4d944cd22c91b2838beb83f04fbe1e9.
* Two patches which fix issues on cross compiling/buildingNathaniel McCallum2009-06-291-1/+1
|
* Move asn1_load_nocopy() to lib/util/asn1.cVolker Lendecke2009-06-202-0/+11
|
* Move asn1_blob() to lib/util/asn1.cVolker Lendecke2009-06-202-0/+17
|
* Fix build of recurusion fix in reopen_logs()Andrew Bartlett2009-06-111-1/+1
|
* Don't recurse in reopen_logs().Andrew Bartlett2009-06-111-0/+6
| | | | | | | Use the state to avoid recursion in reopen_logs(), as DEBUG() can call this function. Andrew Bartlett
* lib-util: move set_blocking() call into own file.Günther Deschner2009-06-103-31/+63
| | | | Guenther
* added asn1 functions for handling booleans in a simple contextAndrew Tridgell2009-06-102-0/+25
|
* libsamba-util: Fix soversion.Jelmer Vernooij2009-06-081-1/+1
|
* Use data_blob_null instead of data_blob(NULL, 0)Volker Lendecke2009-06-061-1/+1
|
* add gendb_search_single_extended_dn()Andrew Tridgell2009-06-042-0/+103
| | | | | | | | 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.
* Build libsamba-util as a shared library.Jelmer Vernooij2009-06-021-1/+4
|
* util: Change license on tevent_unix to LGPLv3+Volker Lendecke2009-05-292-16/+24
|
* util: move add_gid_to_array_unique to toplevel and add add_uid_to_array_unique.Günther Deschner2009-05-293-1/+102
| | | | Guenther
* Add extensive tests for str_list function behaviourAndrew Bartlett2009-05-151-15/+343
|
* Remove two unused variablesVolker Lendecke2009-05-141-2/+0
|
* Add new functions and tests: str_list_make_empty(), str_list_make_single()Andrew Bartlett2009-05-143-0/+85
|
* Take advantage of the easier-to-use thread macrosDerrell Lipman2009-05-131-8/+0
| | | | | | | - Now that we initialize for the non-thread-safe case in the macro, there's no need to do it here too. Derrell
* Make the thread functions a bit easier to useDerrell Lipman2009-05-133-8/+12
| | | | | | | | | | | - 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
* Allow a parameter to smb_thread_once's initialization functionDerrell Lipman2009-05-134-15/+28
| | | | | | | | | | | | - 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
* Fix broken smb_thread_once function (again)Derrell Lipman2009-05-121-0/+3
| | | | | | | | - 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
* Fix broken smb_thread_once functionDerrell Lipman2009-05-121-19/+3
| | | | | | | | | | | | | | - 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
* Fix definition of smb_thread_once - must return int not void asJeremy Allison2009-05-112-2/+5
| | | | | it's used in a ? : comparison macro. Jeremy.
* Ensure documentation matches the tdb_util function usage.Jeremy Allison2009-05-111-2/+2
| | | | Jeremy.
* Use bool instead of int for a boolean variableDerrell Lipman2009-05-101-1/+1
|
* Optimize smb_thread_once usage by not calling it if known already calledDerrell Lipman2009-05-101-2/+6
| | | | | | | - The macro SMB_THREAD_ONCE now tests whether the "once" variable is already set, and if so avoids calling smb_thread_once(). Derrell
* Panic upon mutex lock or unlock failureDerrell Lipman2009-05-101-2/+2
| | | | | | | - 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
* Don't require external use of internal enum smb_thread_lock_typeDerrell Lipman2009-05-101-3/+4
| | | | | | | | | | - 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
* Replace external thread "once" with an internal implementationDerrell Lipman2009-05-103-22/+66
| | | | | | | | | | | | | | | | | | | | | 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
* Clean up after Tridge's util_strlist changesVolker Lendecke2009-05-032-25/+30
|
* Fix a missing prototype warningVolker Lendecke2009-04-282-0/+3
|
* pm_process():raise level of debug messageMichael Adam2009-04-281-1/+1
| | | | Michael
* Fix push_codepoint function without iconv_convenience.Jelmer Vernooij2009-04-231-1/+1
|
* Add a new non-convenience version of push_codepoint.Jelmer Vernooij2009-04-234-7/+15
|
* Ensure we have all the definitions needed in both threaded and non-threaded ↵Jeremy Allison2009-04-201-9/+4
| | | | | | versions. Jeremy.
* Attempt to fix build farm on platforms where pthread_once_t is a struct.Jeremy Allison2009-04-202-3/+6
| | | | Jeremy.
* Fix the pthread_once initialization issue. Make talloc_stackframe useJeremy Allison2009-04-204-38/+85
| | | | | this. Jeremy.