summaryrefslogtreecommitdiffstats
path: root/source3/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: move filename_util.c out of source3/smbd to source3/lib.Günther Deschner2011-03-301-0/+206
| | | | Guenther
* s3-build: only include intl protos where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-passdb: use passdb headers where needed.Günther Deschner2011-03-302-0/+2
| | | | Guenther
* s3-passdb: move util_builtin.c out of passdb.Günther Deschner2011-03-301-0/+124
| | | | Guenther
* s3-passdb: move util_unixsids.c out of passdb.Günther Deschner2011-03-301-0/+116
| | | | Guenther
* s3-passdb: move util_wellknown.c out of passdb.Günther Deschner2011-03-301-0/+173
| | | | Guenther
* s3-build: only include transfer_file.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* registry: create and use shared libcli/registry/util_reg.h header.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-includes: only include system/filesys.h when needed.Günther Deschner2011-03-3019-1/+20
| | | | Guenther
* s3-includes: only include system/passwd.h when needed.Günther Deschner2011-03-306-0/+6
| | | | Guenther
* s3-includes: only include system/capability.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-includes: only include system/glob.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-includes: only include system/syslog.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-winbind: remove global inclusion of libwbclient.Günther Deschner2011-03-302-0/+61
| | | | Guenther
* lib/util/util_pw: share more code between lib/util/util_pw.c and ↵Günther Deschner2011-03-302-35/+1
| | | | | | source3/lib/username.c Guenther
* lib/util/util_pw: share sys_get{pw,gr} group of calls.Günther Deschner2011-03-303-44/+2
| | | | Guenther
* charconv: Fix the slow-path character conversionsVolker Lendecke2011-03-291-3/+3
| | | | | | | | | | | | | | | This reverts a part of 0189087e257f. That one might have fixed the fast path, but it broke the slow path. convert_string_internal returns 0/-1 despite the size_t result type and the misleading comment. If you follow the path to smb_iconv and for example iconv_copy(), you will see that this routine returns 0 even after it copied something. How to check: Use German locale, and do an smbclient "allinfo" on a file modified in march (März in German). Notice the "ä". Before 0189087 this printed correctly, after 0189087 it cut off the fields after the M for März. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Mar 29 19:17:41 CEST 2011 on sn-devel-104
* =?UTF-8?q?alpha=5Fstrcpy()=20is=20a=20utility=20function=20which=20reportedly:David Disseldorp2011-03-291-3/+9
| | | | | | | | | | =20Strips=20out=20all=20but=20'a-Z0-9'=20and=20the=20character=20in=20other=5Fsafe=5Fchars=20and =20replaces=20with=20'=5F'. =20This=20statement=20does=20not=20currently=20hold=20true=20in=20all=20cases=20(e.g.=20src=20=3D =20"=D0=A2=D0=90=D0=9D=D0=A6=D0=95=D0=92=D0=90=D0=A2=D0=AC").?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
* s3: Fix Coverity ID 590: DEADCODEVolker Lendecke2011-03-271-4/+0
|
* Fix bug 8040 - smbclient segfaults when a Cyrillic netbios name or workgroup ↵Jeremy Allison2011-03-251-2/+23
| | | | | | | | | | | | | | | | | | | | | | | is configured. As discovered by David Disseldorp <ddiss@suse.de>, convert_string_talloc() doesn't always return consistent results for a zero length string. The API states an incoming string must *always* contain the terminating null, but unfotunately too much code expects passing in a zero source length to return a null terminated string, so at least ensure we return a correct null string in the required character set and return the correct length. Also ensure we cannot return a zero length for a converted string (we ensure that the returned buffer is always allocated and zero terminated anyway) as calling code depends on the fact that returning true from this function will *always* return a non-zero length (as it must include the terminating null). Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Mar 25 23:25:40 CET 2011 on sn-devel-104
* s3-netapi: fix memoryleak while not using talloc_tos() in ↵Günther Deschner2011-03-252-6/+6
| | | | | | | | | | | cli_get_session_key() usage. Thanks Volker! Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Mar 25 18:21:18 CET 2011 on sn-devel-104
* s3-charcnv: fixed converted_size return in fast pathsAndrew Tridgell2011-03-251-9/+20
|
* s3-charcnv: removed unused functionAndrew Tridgell2011-03-251-7/+0
| | | | lp_failed_convert_char() is not needed any more
* lib/util/charset rename iconv_convenience to iconv_handleAndrew Bartlett2011-03-251-7/+7
| | | | | | This better reflects what this structure is Andrew Bartlett
* s3-charcnv: convert_string_internal() should not display errorsAndrew Tridgell2011-03-251-31/+4
| | | | debug error display happens in the convert_string() outer function
* s3-string: removed the conv_silent globalAndrew Tridgell2011-03-251-29/+17
| | | | | | use convert_string_error() instead Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s3-string: removed last use of conv_silentAndrew Tridgell2011-03-251-31/+11
| | | | | | | This replaces the push_ascii_nstring() implementation with a call to convert_string_error() Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s3-charcnv Add convert_string_error()Andrew Bartlett2011-03-251-18/+71
| | | | | | This function returns errors rather than printing them. Andrew Bartlett
* unistr: moved some UCS2 macros into util_unistrAndrew Tridgell2011-03-251-0/+9
| | | | | | | we need to move towards eliminating smb_ucs2_t. This moves a couple of the related macros into the only file they are used in Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s3-string: sec_len==-1 support is no longer neededAndrew Tridgell2011-03-251-41/+20
| | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s3-lib: make pull_ucs2_base_talloc staticAndrew Tridgell2011-03-251-6/+6
| | | | it is local to charcnv.c
* s3-string: moved fstring functions into their own fileAndrew Tridgell2011-03-252-105/+131
| | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s3:dbwrap_ctdb: fix non-locked fetch on persistent db's causing corruptionMichael Adam2011-03-251-2/+34
| | | | | | | | | | | | | | | | | | | | | When doing a non-locking fetch on a record of a persistent db when no transaction is running, the old behaviour was to fetch locally and do a ctdb call when the record was not found in the local db. The call is useless for persistent dbs anyway since they are only written to using transactions and hence kept in sync, but it is also harmful, because a ctdb call will bump the record RSN when it does actually migrate the record from one node to another. Recently, ctdb has been changed to make all calls do a migration. This uncovered the client misbehaviour for persistent dbs, because now _each_ non-locking fetch will render the persistent db inconsistent: A subsequent transaction which touches the record in question will fail because the RSNs are out of sync. This patch fixes this old bug. Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Mar 25 01:26:32 CET 2011 on sn-devel-104
* s3-charcnv: remove unused labels.Günther Deschner2011-03-241-6/+0
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Mar 24 23:54:25 CET 2011 on sn-devel-104
* s3-netapi: use cli_get_session_key() in netapi.Günther Deschner2011-03-242-6/+53
| | | | Guenther
* Fix is_myname_or_ipaddr() to be robust against strange DNS setups.Jeremy Allison2011-03-241-30/+56
| | | | | | | | | | | | | If IPv6 DNS names are turned on, but Samba isn't configured to listen on an IPv6 interface, then is_myname_or_ipaddr() can return false on a valid DNS name that it should detect is our own. If the IPv6 addr is returned by preference, then looking at the first addr only causes is_myname_or_ipaddr() to fail. We need to look at all the addresses returned by the DNS lookup and check all of them against our interface list. This is an order N^2 lookup, but there shouldn't be enough addresses to make this a practical problem. Jeremy.
* charcnv: removed the allow_badcharcnv and allow_bad_conv options to ↵Andrew Tridgell2011-03-245-210/+33
| | | | | | | | | convert_string*() we shouldn't accept bad multi-byte strings, it just hides problems Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
* s3: Fix a shadowed declaration warningVolker Lendecke2011-03-231-3/+3
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Mar 23 17:19:01 CET 2011 on sn-devel-104
* s3: Include prctl where it is actually usedVolker Lendecke2011-03-231-0/+4
|
* s3: Attempt to fix the build on FreeBSDVolker Lendecke2011-03-231-0/+4
|
* lib/util: Merge basic string length and comparison functionsAndrew Bartlett2011-03-231-292/+0
| | | | | | | | | | These functions now use the codepoints for more accurate string handling and now form common code. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Mar 23 08:21:54 CET 2011 on sn-devel-104
* s3-lib prepare Samba3 to use common codepoint based string functionsAndrew Bartlett2011-03-231-108/+82
| | | | | | | This patch changes the source3 util_str.c functions so that the next patch just contains the move into common code, without code changes. Andrew Bartlett
* s3-safe_str: Futher simplify the macros by removing indirectionAndrew Bartlett2011-03-231-5/+5
| | | | | | | | Now that we don't need to pass in the function name and string, another level of indirection can be safely removed, and the operation of these macros made much clearer. Andrew Bartlett
* s3-lib Remove the clobber_region() code.Andrew Bartlett2011-03-235-197/+37
| | | | | | | | | | | | | | | | | | This code wrote to the full buffer in fstrcpy(), pstrcpy() and other fixed-length string manipulation functions. The hope of this code was to find out at run time if we were mixing up pstring and fstring etc, and to record where this came from. It has a runtime performance impact (particularly if compiled with --enable-developer). It is being removed because of the complexity it adds, and the distinct lack of bugs that this complexity has been credited in finding. The macro-based compile-time checking of string sizes remains. Andrew Bartlett
* fault: get fault.c ready for use by s4Andrew Tridgell2011-03-232-1/+333
| | | | | 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
* fault: moved s3 fault.c to top levelAndrew Tridgell2011-03-231-381/+0
|
* s3-fault: removed the cont_fn from fault_setup()Andrew Tridgell2011-03-221-17/+2
| | | | | | | | | | cont_fn() was supposed to be a way to continue after a seg fault. It could never be called however, as smb_panic() from fault_report() could never return, as dump_core() never returns at the end of smb_panic() Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Mar 22 05:07:58 CET 2011 on sn-devel-104
* s3: Fix early tldap_search cancelsVolker Lendecke2011-03-201-1/+1
| | | | | | | | | | | A callback of tldap_search_send might not interested in the rest of the results and could do a TALLOC_FREE of the search request. In this case, "subreq" is already free'ed. So we have to set it to pending before the callback is called. The TALLOC_FREE of the search request will set it to non-pending again via tldap_msg_destructor. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Mar 20 11:26:57 CET 2011 on sn-devel-104
* s3: use getgrset() when it is availableChristian Ambach2011-03-191-2/+57
| | | | | | | | | | When getgrouplist() is not defined, use getgrset() if it is defined instead of using the initgroups() + getgroups() combo Major contributions from Yannick Bergeron <yaberger@ca.ibm.com> Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sat Mar 19 10:09:38 CET 2011 on sn-devel-104