1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/source3/lib
Simo Sorce e9e6af5951 r21606: Implement escaping function for ldap RDN values
Fix escaping of DN components and filters around the code
Add some notes to commandline help messages about how to pass DNs

revert jra's "concistency" commit to nsswitch/winbindd_ads.c, as it was
incorrect.
The 2 functions use DNs in different ways.

- lookup_usergroups_member() uses the DN in a search filter,
and must use the filter escaping function to escape it
Escaping filters that include escaped DNs ("\," becomes "\5c,") is the
correct way to do it (tested against W2k3).

- lookup_usergroups_memberof() instead uses the DN ultimately as a base dn.
Both functions do NOT need any DN escaping function as DNs can't be reliably
escaped when in a string form, intead each single RDN value must be escaped
separately.

DNs coming from other ldap calls (like ads_get_dn()), do not need escaping as
they come already escaped on the wire and passed as is by the ldap libraries

DN filtering has been tested.
For example now it is possible to do something like:
'net ads add user joe#5' as now the '#' character is correctly escaped when
building the DN, previously such a call failed with Invalid DN Syntax.

Simo.
(This used to be commit 5b4838f62a)
2007-10-10 12:18:16 -05:00
..
ldb r21312: merge from SAMBA_4_0: 2007-10-10 12:17:55 -05:00
replace r21388: Merge support for providing replacement system headers. 2007-10-10 12:18:01 -05:00
socket_wrapper r19179: remove difference with samba4 2007-10-10 12:15:20 -05:00
talloc r21176: merged va_end() changes from Samba4 2007-10-10 12:17:45 -05:00
access.c r17408: Let us use netgroups even without a NIS domain but just using files 2007-10-10 11:38:32 -05:00
account_pol.c r19978: More "net sam policy" improvements. Thanks to Karolin Seeger <ks@sernet.de> 2007-10-10 12:16:17 -05:00
adt_tree.c r20838: Small fix from Jiri.Sasek@Sun.COM to fix null 2007-10-10 12:17:11 -05:00
afs_settoken.c r10976: Fix the build with openssl-0.9.8a. 2007-10-10 11:04:58 -05:00
afs.c r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need 2007-10-10 11:19:14 -05:00
arc4.c r10656: BIG merge from trunk. Features not copied over 2007-10-10 11:04:48 -05:00
audit.c r15041: Adding rpc client calls to manipulate auditing policies on remote CIFS 2007-10-10 11:15:59 -05:00
bitmap.c r4120: Never, ever, doubt valgrind :-). Fix order of evaluation bug that's been in the 2007-10-10 10:53:34 -05:00
charcnv.c r18897: Fix valgrind bug found by Volker. 2007-10-10 12:14:43 -05:00
clobber.c r12855: Remove erroneous commenting out of valgrind fix. 2007-10-10 11:06:05 -05:00
crc32.c r12043: It's amazing the warnings you find when compiling on a 64-bit 2007-10-10 11:05:42 -05:00
data_blob.c r18709: add some useful function from samba4 2007-10-10 12:00:49 -05:00
debug.c r21064: The core of this patch is 2007-10-10 12:17:32 -05:00
display_sec.c r18745: Use the Samba4 data structures for security descriptors and security descriptor 2007-10-10 12:00:54 -05:00
dmallocmsg.c r21064: The core of this patch is 2007-10-10 12:17:32 -05:00
dprintf.c r17334: Some C++ warnings 2007-10-10 11:38:26 -05:00
dummyroot.c r6588: just include includes.h to get prototypes here. 2007-10-10 10:56:46 -05:00
dummysmbd.c r21257: Better fix for bug #4188 : 2007-10-10 12:17:51 -05:00
events.c r20913: Fix the build. 2007-10-10 12:17:19 -05:00
fault.c r19626: Coalesce usage of DUMP_CORE. Fix formatting on chdir error message 2007-10-10 12:15:42 -05:00
fsusage.c r1608: Fix from Nick THOMPSON <nickthompson@agere.com> to protect smbd 2007-10-10 10:52:16 -05:00
gencache.c r19415: oh la la, always compile before commit, I'm very sorry. 2007-10-10 12:15:33 -05:00
genrand.c r13571: Replace all calls to talloc_free() with thye TALLOC_FREE() 2007-10-10 11:10:14 -05:00
hmacmd5.c r14454: Janitor for tridge - same code exists in Samba3 and 4. 2007-10-10 11:15:31 -05:00
iconv.c r20133: get rid of defined but not used warning - static function only used 2007-10-10 12:16:27 -05:00
interface.c r17334: Some C++ warnings 2007-10-10 11:38:26 -05:00
interfaces.c r20131: get rid of a few no previous prototype warnings 2007-10-10 12:16:26 -05:00
ldap_escape.c r21606: Implement escaping function for ldap RDN values 2007-10-10 12:18:16 -05:00
md4.c
md5.c updated the 3.0 branch from the head branch - ready for alpha18 2002-07-15 10:35:28 +00:00
messages.c r21115: notify_internal.c needs to remove the table entry if a process has crashed. So 2007-10-10 12:17:39 -05:00
module.c r15655: Log the result of module initialisation if it fails. 2007-10-10 11:17:05 -05:00
ms_fnmatch.c r6044: Ensure the old search calls always ask mask_match to translate 2007-10-10 10:56:18 -05:00
pam_errors.c r20183: Fix the build. 2007-10-10 12:16:31 -05:00
pidfile.c r19533: Add a suffix to the program name if this is a process with a 2007-10-10 12:15:41 -05:00
popt_common.c r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need 2007-10-10 11:19:14 -05:00
privileges.c r20090: Fix a class of bugs found by James Peach. Ensure 2007-10-10 12:16:24 -05:00
readline.c r19246: merge from samba4 rev 18207 and 18208: 2007-10-10 12:15:25 -05:00
repdir.c r14746: Add the Samba4 replacements for opendir/readdir etc. to 2007-10-10 11:15:45 -05:00
secace.c r18745: Use the Samba4 data structures for security descriptors and security descriptor 2007-10-10 12:00:54 -05:00
secacl.c r18745: Use the Samba4 data structures for security descriptors and security descriptor 2007-10-10 12:00:54 -05:00
secdesc.c r19963: Add 'registry shares = yes' and registry key security descriptors. 2007-10-10 12:16:16 -05:00
select.c r7440: * merge registry server changes from trunk (so far) for more 2007-10-10 10:57:09 -05:00
sendfile.c r14393: Fix a couple of AIX warnings. 2007-10-10 11:15:28 -05:00
server_mutex.c r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation 2007-10-10 10:53:32 -05:00
sharesec.c r19950: talloc_destroy is replaced these days 2007-10-10 12:16:15 -05:00
signal.c Merge from HEAD: 2003-01-14 08:26:54 +00:00
smbldap_util.c r21606: Implement escaping function for ldap RDN values 2007-10-10 12:18:16 -05:00
smbldap.c r21264: LDAP_OPT_ERROR_NUMBER seems more portable than LDAP_OPT_RESULT_CODE 2007-10-10 12:17:52 -05:00
smbrun.c r14668: Set the FILE_STATUS_OFFLINE bit by observing the events a DMAPI-based 2007-10-10 11:15:42 -05:00
sock_exec.c Refactor existing sock_exec() and socketpair_tcp() functions into their own 2003-04-30 17:35:56 +00:00
substitute.c r17039: Eliminate snum from enumshares and getshareinfo. Get rid of some pstrings. 2007-10-10 11:19:21 -05:00
sysacls.c r18016: OpenBSD apparently does not have ENOTSUP 2007-10-10 11:39:49 -05:00
sysquotas_4A.c r10163: try to fix the build on fedora 4, when --with-quota is not used 2007-10-10 11:03:35 -05:00
sysquotas_linux.c r19982: From Michael Adam (ma@sernet.de) (thanks!:-) 2007-10-10 12:16:17 -05:00
sysquotas_xfs.c r6586: get rid of a few more compiler warnings 2007-10-10 10:56:46 -05:00
sysquotas.c r14342: Fix coverity #68, resource leak on error path. 2007-10-10 11:15:26 -05:00
system_smbd.c r20090: Fix a class of bugs found by James Peach. Ensure 2007-10-10 12:16:24 -05:00
system.c r21526: Fix stray character in sys_memalign() that is only 2007-10-10 12:18:10 -05:00
tallocmsg.c r21064: The core of this patch is 2007-10-10 12:17:32 -05:00
time.c r21060: Start refactoring out the non-return case statements 2007-10-10 12:17:31 -05:00
ufc.c
username.c r13571: Replace all calls to talloc_free() with thye TALLOC_FREE() 2007-10-10 11:10:14 -05:00
util_file.c r20179: Sync up with Samba4 - remove blank lines at the 2007-10-10 12:16:30 -05:00
util_nscd.c r18707: Fix the build when you have libnscd installed (which apparently no host 2007-10-10 12:00:49 -05:00
util_pw.c r17334: Some C++ warnings 2007-10-10 11:38:26 -05:00
util_reg.c r19991: Sorry for this 2000-liner... 2007-10-10 12:16:18 -05:00
util_seaccess.c r18745: Use the Samba4 data structures for security descriptors and security descriptor 2007-10-10 12:00:54 -05:00
util_sec.c r21005: Add a debug message for EAGAIN error of setresuid. 2007-10-10 12:17:26 -05:00
util_sid.c r20090: Fix a class of bugs found by James Peach. Ensure 2007-10-10 12:16:24 -05:00
util_sock.c r20148: Forgot to merge. Ensure open_any_socket_out() 2007-10-10 12:16:27 -05:00
util_str.c r20208: Change sprintf_append() never to use malloc, 2007-10-10 12:16:32 -05:00
util_tdb.c r21076: Two pieces of infrastructure from Samba4: An API-compatible messaging wrapper 2007-10-10 12:17:33 -05:00
util_unistr.c r20361: Prevent strnlen_w reading beyond max. Valgrind 2007-10-10 12:16:44 -05:00
util_uuid.c r18654: Rename "struct uuid" => "struct GUID" for consistency. 2007-10-10 11:52:19 -05:00
util.c r21560: Convert name_to_fqdn to BOOL. 2007-10-10 12:18:13 -05:00
version.c r13231: apparently strncat() is converted to strcat() on RH7.3 and similar systems. Fix the build on those boxes 2007-10-10 11:06:19 -05:00
wins_srv.c r13915: Fixed a very interesting class of realloc() bugs found by Coverity. 2007-10-10 11:10:59 -05:00
xfile.c r17869: More sensible fix for Stanford Checker null deref. 2007-10-10 11:38:55 -05:00