jra/samba/.git
16 years agor25309: Volker's fix for bug #4984 - samba4 torture test
Jeremy Allison [Mon, 24 Sep 2007 19:11:42 +0000 (19:11 +0000)]
r25309: Volker's fix for bug #4984 - samba4 torture test
to follow. Ensure we don't prepend "./" as a root
directory - this is an invalid pathname for unix_convert().
Jeremy.
(This used to be commit f70ac2e25847e41ecf54ae9d66e3247e1996b152)

16 years agor25294: Tidy up callers of unistr2_to_ascii() to pass sizeof(target_area) to
Michael Adam [Fri, 21 Sep 2007 14:37:35 +0000 (14:37 +0000)]
r25294: Tidy up callers of unistr2_to_ascii() to pass sizeof(target_area) to
the maxeln parameter instead of sizeof(target_area) - 1 (or even
sizeof(fstring) - 1 in some places.

I hope these were really all there were.

Michael
(This used to be commit 9a28be220df622322857dfe102fa35e108f932dc)

16 years agor25287: Eliminate a handful of red bars and overly long lines I just
Michael Adam [Fri, 21 Sep 2007 12:24:43 +0000 (12:24 +0000)]
r25287: Eliminate a handful of red bars and overly long lines I just
came across.

Michael
(This used to be commit bf12f0c0f843f088c7fa2d1eca3298a3d76e9761)

16 years agor25286: Fix one more caller of unistr2_to_ascii() that passed
Michael Adam [Fri, 21 Sep 2007 11:58:25 +0000 (11:58 +0000)]
r25286: Fix one more caller of unistr2_to_ascii() that passed
in -1 for maxlen.

Michael
(This used to be commit cd3d652d0d7609fc369ed0743c1fc54c87558438)

16 years agor25285: Fix some more callers of unistr2_to_ascii to use the size of
Michael Adam [Fri, 21 Sep 2007 11:53:14 +0000 (11:53 +0000)]
r25285: Fix some more callers of unistr2_to_ascii to use the size of
destination instead of source as maxlen.

Michael
(This used to be commit 76cb05deec153c1e0003776339da912a0f3d73a9)

16 years agor25281: Fix a caller of unistr2_to_ascii():
Michael Adam [Fri, 21 Sep 2007 10:46:09 +0000 (10:46 +0000)]
r25281: Fix a caller of unistr2_to_ascii():
The maxlen parameter should be set to the size of the
destination, not to the size of the soruce.

Michael
(This used to be commit 841ff0beee7ea44ee92d1f90de3edeb53edcae0a)

16 years agor25277: Belt-and-braces approach to Volker's fix for RPC-SAMBA3-GETUSERNAME.
Jeremy Allison [Fri, 21 Sep 2007 10:32:57 +0000 (10:32 +0000)]
r25277: Belt-and-braces approach to Volker's fix for RPC-SAMBA3-GETUSERNAME.
If we promise dest is null terminated, ensure we do it even on
fast path exits.
Jeremy.
(This used to be commit 32626e2b9770eb6b15c191a8feb881f81ed6c57a)

16 years agor25275: w2k3 (as PDC emulator) returns WERR_NO_SUCH_DOMAIN to netlogon_getanydcname()
Stefan Metzmacher [Fri, 21 Sep 2007 10:25:33 +0000 (10:25 +0000)]
r25275: w2k3 (as PDC emulator) returns WERR_NO_SUCH_DOMAIN to netlogon_getanydcname()
when called for it's own domain. So we should use netlogon_getdcname() which
returns WERR_OK:-)

gd: feel free to usage rpccli_netlogon_dsr_getdcname(), but please make sure
    the new WINBIND-STRUCT-GETDCNAME test is still passing.

metze
(This used to be commit 9a9c164366a252ab8268b687699d54048ced993f)

16 years agor25274: Attempt to fix RPC-SAMBA3-GETUSERNAME
Volker Lendecke [Fri, 21 Sep 2007 10:23:35 +0000 (10:23 +0000)]
r25274: Attempt to fix RPC-SAMBA3-GETUSERNAME
(This used to be commit f6f64cf0b51f2fb841bd1c0f800c66114c213577)

16 years agor25273: unistrX_to_ascii calls pull_ucs2 - ensure it's never
Jeremy Allison [Fri, 21 Sep 2007 09:58:36 +0000 (09:58 +0000)]
r25273: unistrX_to_ascii calls pull_ucs2 - ensure it's never
called with -1 (these calls were wrong anyway, target
was an fstring, not a pstring). Found by  Michael Adam <ma@sernet.de>,
now to check all other uses.
Michael - this version uses sizeof(target) not sizeof(fstring).
This way is more future proof.
Jeremy.
(This used to be commit 9ed3046633b6949c68c9aed61b8e9444601cf101)

16 years agor25272: Fix a bunch of callers of pull_ucs2 that passed -1 for dest_len.
Michael Adam [Fri, 21 Sep 2007 09:52:28 +0000 (09:52 +0000)]
r25272: Fix a bunch of callers of pull_ucs2 that passed -1 for dest_len.

Michael
(This used to be commit a4f53fe22569a63fe7b196971ac6c28a676ee4e8)

16 years agor25270: for internal domains we should not ask a remote DC.
Stefan Metzmacher [Fri, 21 Sep 2007 09:35:53 +0000 (09:35 +0000)]
r25270: for internal domains we should not ask a remote DC.

metze
(This used to be commit 579ed8ae87e449dbd5e4f78609754df0556fbf68)

16 years agor25260: add trusted domains always to the end of the list.
Stefan Metzmacher [Thu, 20 Sep 2007 18:37:34 +0000 (18:37 +0000)]
r25260: add trusted domains always to the end of the list.

Now BUILTIN is always the first domain followed
by the domain of our own SAM DB and the primary
domain (in member server mode).

metze
(This used to be commit b8d67b78aa1c35e4e7e61050c1fccbb6d76d9fd7)

16 years agor25258: Fix a panic message and remove superfluous return after the call to smb_panic().
Michael Adam [Thu, 20 Sep 2007 12:42:15 +0000 (12:42 +0000)]
r25258: Fix a panic message and remove superfluous return after the call to smb_panic().

Michael
(This used to be commit 8b5c34b7d141c44d65622f44f9432723230cea47)

16 years agor25257: When dumping eventlist, display full timestring.
Günther Deschner [Thu, 20 Sep 2007 11:02:27 +0000 (11:02 +0000)]
r25257: When dumping eventlist, display full timestring.

Guenther
(This used to be commit 38eca60913f513accb24b31dcb6d1d7e92b0ba66)

16 years agor25254: Add my C - Michael
Michael Adam [Thu, 20 Sep 2007 09:15:26 +0000 (09:15 +0000)]
r25254: Add my C - Michael
(This used to be commit 3246be8cf05a867b74b4b96697c99cc62f13c2a9)

16 years agor25252: move macro defines to the end of replace.h
Stefan Metzmacher [Thu, 20 Sep 2007 09:12:18 +0000 (09:12 +0000)]
r25252: move macro defines to the end of replace.h
and move the include location sys/param.h
before we redefine missing macros

metze
(This used to be commit 862046028c3c61adf6da2effac91abf3c763635d)

16 years agor25248: According to the build-farm all this defines are not needed
Stefan Metzmacher [Thu, 20 Sep 2007 06:52:30 +0000 (06:52 +0000)]
r25248: According to the build-farm all this defines are not needed
for HPUX large file support.

But it would be nice if someone could verify that.

metze
(This used to be commit b09024928d036933a47e4f1c2e246426fb3792aa)

16 years agor25247: Rename the rpccli_lsa_lookup_sids_all() function to rpccli_lsa_lookup_sids()
Michael Adam [Wed, 19 Sep 2007 22:11:09 +0000 (22:11 +0000)]
r25247: Rename the rpccli_lsa_lookup_sids_all() function to rpccli_lsa_lookup_sids()
and remove the old rpccli_lsa_lookup_sids() function. The old function would
fail due to server limits when requesting to resolve too many sids at once
(20480 for W2k3). The new version passes the list of sids in hunks to the
server. It has up to now been used (and tested) in the winbindd_ads
lookup_groupmem() function, and I think the time has come to replace the actual
function with this correct version.

Michael
(This used to be commit 1194d4f36ef720747e62dde31881c295e44e4a76)

16 years agor25245: rerun 'make idl'
Stefan Metzmacher [Wed, 19 Sep 2007 20:03:43 +0000 (20:03 +0000)]
r25245: rerun 'make idl'

metze
(This used to be commit af91f4fd08aae117d9b48eade4d49762c9634cbc)

16 years agor25244: see what the build-farm says when we only use large file support
Stefan Metzmacher [Wed, 19 Sep 2007 19:45:51 +0000 (19:45 +0000)]
r25244: see what the build-farm says when we only use large file support
detection from libreplace...

It would be good if someone could test that on HPUX...

metze
(This used to be commit 00ea030e67c519ebb69e5932f607b4ac6e834f0e)

16 years agor25241: remove sequence_number out of WINBINDD_DOMAIN_INFO call
Stefan Metzmacher [Wed, 19 Sep 2007 19:05:54 +0000 (19:05 +0000)]
r25241: remove sequence_number out of WINBINDD_DOMAIN_INFO call
as this is always answered by the winbindd parent and will
most times return old sequence number values.

metze
(This used to be commit 9caf54c868e8c0109730860e772c9cc404e2f899)

16 years agor25239: fix cut-n-paste bug in code with LIBUNWIND support
Stefan Metzmacher [Wed, 19 Sep 2007 19:01:20 +0000 (19:01 +0000)]
r25239: fix cut-n-paste bug in code with LIBUNWIND support

metze
(This used to be commit ff94d055760b16786d1a998e251d487fb886a64c)

16 years agor25238: Make the error returns from the string functions
Jeremy Allison [Wed, 19 Sep 2007 17:52:06 +0000 (17:52 +0000)]
r25238: Make the error returns from the string functions
always consistent. Return -1 on error, and ensure
we check for this. In cases where the dest is already
specified and we've been asked to terminate with a
null, ensure we always do so even on error.
Jeremy.
(This used to be commit abedd967869ade9a43c3a8e1b889c60d4aca81cf)

16 years agor25236: make it possible to alter WINBINDD_SOCKET_DIR via
Stefan Metzmacher [Wed, 19 Sep 2007 17:19:57 +0000 (17:19 +0000)]
r25236: make it possible to alter WINBINDD_SOCKET_DIR via
"winbindd:socket dir=/path/to/dir" for usage in make test

metze
(This used to be commit 5566cf01e827edf60c0235a661d95dd376210108)

16 years agor25232: sync lib/replace with SAMBA_4_0
Stefan Metzmacher [Wed, 19 Sep 2007 14:57:20 +0000 (14:57 +0000)]
r25232: sync lib/replace with SAMBA_4_0

metze
(This used to be commit 828d2ca0610ab5ee3b96d187b3432b9b4fea72f8)

16 years agor25230: sync lib/talloc with SAMBA_4_0
Stefan Metzmacher [Wed, 19 Sep 2007 14:44:16 +0000 (14:44 +0000)]
r25230: sync lib/talloc with SAMBA_4_0

metze
(This used to be commit 84ebb6cac224cabf3856a632de80a8a9c687329b)

16 years agor25227: Patch from "Steven Danneman" <steven.danneman@isilon.com>:
Stefan Metzmacher [Wed, 19 Sep 2007 14:33:32 +0000 (14:33 +0000)]
r25227: Patch from "Steven Danneman" <steven.danneman@isilon.com>:

-
We ran across a bug joining our Samba server to a Win2K domain with LDAP
signing turned on.  Upon investigation I discovered that there is a bug
in Win2K server which returns a duplicated responseToken in the LDAP
bindResponse packet.  This blob is placed in the optional mechListMIC
field which is unsupported in both Win2K and Win2K3.  You can see RFC
2478 for the proper packet construction.  I've worked with metze on this
to confirm all these finding.

This patch properly parses then discards the mechListMIC field if it
exists in the packet, so we don't produce a malformed packet error,
causing LDAP signed joins to fail.  Also attached is a sniff of the
domain join, exposing Win2Ks bad behavior (packet 21).
-

(I've just changed the scope of the DATA_BLOB mechList)

metze
(This used to be commit 200b5bfb8180af09446762e915eac63d14c6c7b0)

16 years agor25226: Get rid of more red bars...
Michael Adam [Wed, 19 Sep 2007 12:45:35 +0000 (12:45 +0000)]
r25226: Get rid of more red bars...
(This used to be commit aa603bcc6c848de67ea07d6028ab841a8401d9ad)

16 years agor25225: Add a debug message.
Michael Adam [Wed, 19 Sep 2007 12:05:47 +0000 (12:05 +0000)]
r25225: Add a debug message.

Michael
(This used to be commit 7238884c2cb25dd9279703004ffab6618715a275)

16 years agor25224: Fix a potential segfault in lsa_lookupsids client code due to
Michael Adam [Wed, 19 Sep 2007 12:03:02 +0000 (12:03 +0000)]
r25224: Fix a potential segfault in lsa_lookupsids client code due to
uninitialized data.

Michael
(This used to be commit b4fff6d09d17a18eae61e8ca789f128cd094ba09)

16 years agor25223: Fix behaviour of rpccli_lsa_lookupsids_all() when
Michael Adam [Wed, 19 Sep 2007 11:01:44 +0000 (11:01 +0000)]
r25223: Fix behaviour of rpccli_lsa_lookupsids_all() when
rpccli_lsa_lookupsids_noalloc() returns an error for one hunk
of SIDs: free all allocated arrays and return the error code
returned by the hunk lookup.

Michael
(This used to be commit 2c68ebd6934206186dc6e635401f66c2fd1e1234)

16 years agor25222: Fix last assumptions that (size_t)-1 can be used
Jeremy Allison [Wed, 19 Sep 2007 09:40:40 +0000 (09:40 +0000)]
r25222: Fix last assumptions that (size_t)-1 can be used
as a special dest_len of sizeof(pstring).
Jeremy.
(This used to be commit 9fc14c83cc5e3a360464c33e26b1073db63763d7)

16 years agor25201: Fight those red bars...
Michael Adam [Mon, 17 Sep 2007 21:04:10 +0000 (21:04 +0000)]
r25201: Fight those red bars...
(This used to be commit cc4599fdc1fb9aa51f6a4487cb1aa78a5556757a)

16 years agor25200: Fix a debug message.
Michael Adam [Mon, 17 Sep 2007 20:01:47 +0000 (20:01 +0000)]
r25200: Fix a debug message.
(This used to be commit f1f4758e2c40a470c19b4b738f79ec5807522909)

16 years agor25199: Remove pstring from strdup_upper - make it the
Jeremy Allison [Mon, 17 Sep 2007 19:43:06 +0000 (19:43 +0000)]
r25199: Remove pstring from strdup_upper - make it the
same as talloc_strdup_upper.
Jeremy.
(This used to be commit db1b6293771755f20660b071aac0284638dbed46)

16 years agor25198: Change net_rpc_join_ok() to return NTSTATUS for better
Michael Adam [Mon, 17 Sep 2007 15:34:22 +0000 (15:34 +0000)]
r25198: Change net_rpc_join_ok() to return NTSTATUS for better
error propagation.

Michael
(This used to be commit 5a16da2185f07d1f48fabd93a7a6b8f2d6b91089)

16 years agor25197: Change net_make_ipc_connection() and net_make_ipc_connection_ex() to
Michael Adam [Mon, 17 Sep 2007 15:11:20 +0000 (15:11 +0000)]
r25197: Change net_make_ipc_connection() and net_make_ipc_connection_ex() to
return NTSTATUS to allow for better error propagation.

Michael
(This used to be commit 46093004a788dae83a4ddb888ca5d72f555c236c)

16 years agor25195: Fix issue with calling pull_uc2_*alloc with
Jeremy Allison [Mon, 17 Sep 2007 10:50:59 +0000 (10:50 +0000)]
r25195: Fix issue with calling pull_uc2_*alloc with
str_len == 0. We should just return 0 in this
case.
Jeremy.
(This used to be commit 8bb85f3f141f0f45b06d28f004cb2cf18252d4e1)

16 years agor25184: Fix some C++ warnings and an uninitialized variable
Volker Lendecke [Sat, 15 Sep 2007 20:24:35 +0000 (20:24 +0000)]
r25184: Fix some C++ warnings and an uninitialized variable
(This used to be commit b64df8a3c504ab7749c21ffb26e4771a9a0a328f)

16 years agor25179: fix libunwind detection on x86 based hosts
Stefan Metzmacher [Sat, 15 Sep 2007 19:14:49 +0000 (19:14 +0000)]
r25179: fix libunwind detection on x86 based hosts
we need -lunwind-x86 not -lunwind-i686

metze
(This used to be commit 2e5f4781652961d6369a64c48b92697c11262c51)

16 years agor25177: if configured using --enable-socket-wrapper
Stefan Metzmacher [Sat, 15 Sep 2007 18:55:04 +0000 (18:55 +0000)]
r25177: if configured using --enable-socket-wrapper
allow overwritting the location of the WINBINDD_SOCKET_DIR
via an environment variable

metze
(This used to be commit 93bdd2724cc711005a5f2f223b499199394e78e7)

16 years agor25173: Use the append_buffer version in a loop.
Jeremy Allison [Fri, 14 Sep 2007 22:27:27 +0000 (22:27 +0000)]
r25173: Use the append_buffer version in a loop.
Jeremy.
(This used to be commit 37cf2c272751065245dd46708af0a78f1f0c47df)

16 years agor25172: Remove commented out code we will never enable.
Jeremy Allison [Fri, 14 Sep 2007 22:16:21 +0000 (22:16 +0000)]
r25172: Remove commented out code we will never enable.
Jeremy.
(This used to be commit 6032fbc358c5015b2b6a23e13d978bf41ef9e5f3)

16 years agor25171: More pstring removal.
Jeremy Allison [Fri, 14 Sep 2007 22:14:39 +0000 (22:14 +0000)]
r25171: More pstring removal.
Jeremy.
(This used to be commit 4748d2639796e8caa67fae44d1cf660d49d82663)

16 years agor25170: Remove pstring limits from ms_fnmatch and module load.
Jeremy Allison [Fri, 14 Sep 2007 22:03:41 +0000 (22:03 +0000)]
r25170: Remove pstring limits from ms_fnmatch and module load.
Jeremy.
(This used to be commit 764574ee05ea4f13cdd30c0a0668ffeb81756989)

16 years agor25169: Fix bug 4028
Volker Lendecke [Fri, 14 Sep 2007 18:31:33 +0000 (18:31 +0000)]
r25169: Fix bug 4028
(This used to be commit 1a022267003480b4487a780ebaa6016f491828a3)

16 years agor25167: Fix breakage from mangling rewrite. Use the
Jeremy Allison [Fri, 14 Sep 2007 18:24:31 +0000 (18:24 +0000)]
r25167: Fix breakage from mangling rewrite. Use the
new name if unmangling succeeded, not if it
failed. Jerry - please re-test, this should
fix your bug.
Jeremy.
(This used to be commit c215d6e84929b70e4472e19f32ec4f1db7449d90)

16 years agor25165: Use talloc_asprintf_append_buffer with an unmodified
Jeremy Allison [Fri, 14 Sep 2007 17:42:10 +0000 (17:42 +0000)]
r25165: Use talloc_asprintf_append_buffer with an unmodified
string.
Jeremy.
(This used to be commit fe30a523dfc77cc373145624246fd3ad5c62b9ac)

16 years agor25164: Add talloc_asprintf_append_buffer() and the docs for it.
Jeremy Allison [Fri, 14 Sep 2007 17:40:58 +0000 (17:40 +0000)]
r25164: Add talloc_asprintf_append_buffer() and the docs for it.
Jeremy.
(This used to be commit 2243a73d650319208aebbbaf65dfba2a508a7c10)

16 years agor25163: Fix wrong ctx passed to talloc_asprintf_append().
Jeremy Allison [Fri, 14 Sep 2007 16:50:54 +0000 (16:50 +0000)]
r25163: Fix wrong ctx passed to talloc_asprintf_append().
Found by Metze's code review (thanks Metze !).
Jeremy.
(This used to be commit a7370eea6be29c0e2adf5ae62aa6182b9165e744)

16 years agor25162: Refactor further: add mapping functions between
Michael Adam [Fri, 14 Sep 2007 16:12:38 +0000 (16:12 +0000)]
r25162: Refactor further: add mapping functions between
REGISTRY_VALUE and struct registry_value formats for
registry values. Lacking better naming, I called them
regval_hilvl_to_lolvl and regval_lolvl_to_hilvl for a
start. The might be useful elsewhere, so might be put
into another place later on.

Michael
(This used to be commit 883fd7906165ca10413e4745b3beed59516adf34)

16 years agor25161: Don't panic if setgroups fails in non-root mode.
James Peach [Fri, 14 Sep 2007 15:08:07 +0000 (15:08 +0000)]
r25161: Don't panic if setgroups fails in non-root mode.
(This used to be commit ea226c5ed97d47649833546d5499213093d1925e)

16 years agor25160: Refactor out and slightly clean up canonicalization of the registry value
Michael Adam [Fri, 14 Sep 2007 14:20:46 +0000 (14:20 +0000)]
r25160: Refactor out and slightly clean up canonicalization of the registry value
from smbconf_store_values().

Michael
(This used to be commit 7761f9b3ccf0d9ae9ffe830b04c3be8451ce2112)

16 years agor25156: Update coding guiding wrt to primitive data types
Gerald Carter [Fri, 14 Sep 2007 12:06:34 +0000 (12:06 +0000)]
r25156: Update coding guiding wrt to primitive data types
(This used to be commit 01d42744903d7ef9044fa4d2ad1cc64594717573)

16 years agor25154: move winbindd code into winbindd/
Stefan Metzmacher [Fri, 14 Sep 2007 12:03:58 +0000 (12:03 +0000)]
r25154: move winbindd code into winbindd/

metze
(This used to be commit 3ac7566ae14c48ff9b0f6b232e0ec4b2f73df558)

16 years agor25152: fix headers used in wbinfo.c
Stefan Metzmacher [Fri, 14 Sep 2007 11:56:10 +0000 (11:56 +0000)]
r25152: fix headers used in wbinfo.c

metze
(This used to be commit 2a794db3c548330d477497aa66245845486d9888)

16 years agor25150: don't recursivly call call dump_core()
Stefan Metzmacher [Fri, 14 Sep 2007 11:07:02 +0000 (11:07 +0000)]
r25150: don't recursivly call call dump_core()
as currently seen in 'make test' localy and in the farm

metze
(This used to be commit f41efe01b5a22889f5b18916df9a2f924263e7f9)

16 years agor25148: Adapt to coding conventions.
Günther Deschner [Fri, 14 Sep 2007 08:21:20 +0000 (08:21 +0000)]
r25148: Adapt to coding conventions.

Guenther
(This used to be commit c3b423c52a2bf3f50870158d8c7ffd314c8ac935)

16 years agor25146: rename winbindd_nss.h => winbind_struct_protocol.h
Stefan Metzmacher [Fri, 14 Sep 2007 08:06:03 +0000 (08:06 +0000)]
r25146: rename winbindd_nss.h => winbind_struct_protocol.h

as this header has nothing todo with winbindd nor nss
and it contains the definitions for the struct based
protocol

metze
(This used to be commit e9e03aac2221c44eec89cc957b8bb3be721103bd)

16 years agor25143: rename public functions from winbind_client.h
Stefan Metzmacher [Fri, 14 Sep 2007 07:07:59 +0000 (07:07 +0000)]
r25143: rename public functions from winbind_client.h

init_request => winbindd_init_request
free_response => winbindd_free_response
read_reply => winbindd_read_reply

write_sock => winbind_write_sock
read_sock => winbind_read_sock
close_sock => winbind_close_sock(void)

metze
(This used to be commit 8a95d7a7edcfa5e45bccc6eda5c45d9c308cb95d)

16 years agor25142: Panic if setting the group list fails while switching security
James Peach [Fri, 14 Sep 2007 04:17:17 +0000 (04:17 +0000)]
r25142: Panic if setting the group list fails while switching security
contexts. Patch from Tim Prouty <tim.prouty@isilon.com>.
(This used to be commit a136de663f122603e8d34e06027896ff39b35e11)

16 years agor25141: More pstring removal.
Jeremy Allison [Fri, 14 Sep 2007 01:07:57 +0000 (01:07 +0000)]
r25141: More pstring removal.
Jeremy.
(This used to be commit cfcf7cf03e1be34e6839c1a659c4e8c1b5358c37)

16 years agor25140: Less red bars to hurt my eyes...
Michael Adam [Thu, 13 Sep 2007 22:41:04 +0000 (22:41 +0000)]
r25140: Less red bars to hurt my eyes...
(This used to be commit f935d21200294c8d29ce527300f605e721cb3620)

16 years agor25139: Avoid code duplication: let regval_ctr_copyvalue() call regval_ctr_addvalue().
Michael Adam [Thu, 13 Sep 2007 22:36:10 +0000 (22:36 +0000)]
r25139: Avoid code duplication: let regval_ctr_copyvalue() call regval_ctr_addvalue().
This also corrects regval_ctr_copyvalue() in that it cannot create (invalid)
regval containers with dupliacte entries...

Michael
(This used to be commit 2daaaaa835078c543fa12cd1819e8a3d86cf6e5e)

16 years agor25138: More pstring elimination. Add a TALLOC_CTX parameter
Jeremy Allison [Thu, 13 Sep 2007 22:08:59 +0000 (22:08 +0000)]
r25138: More pstring elimination. Add a TALLOC_CTX parameter
to unix_convert().
Jeremy.
(This used to be commit 39c211a702e91c34c1a5a689e1b0c4530ea8a1ac)

16 years agor25136: When tallocing a string to uppercase remember the terminating
Jeremy Allison [Thu, 13 Sep 2007 17:25:57 +0000 (17:25 +0000)]
r25136: When tallocing a string to uppercase remember the terminating
'\0' in size calculations.
Jeremy.
(This used to be commit 54c658867db3b6c602080d60936abab3af26e112)

16 years agor25135: Remove one END_PROFILE(SMBntcreateX) from call_nt_transact_create() which
Günther Deschner [Thu, 13 Sep 2007 16:48:46 +0000 (16:48 +0000)]
r25135: Remove one END_PROFILE(SMBntcreateX) from call_nt_transact_create() which
appears to be a leftover. Should fix the build with profiling enabled.

Jeremy, please check.

Guenther
(This used to be commit 98f2e10e3f7a86b1b30619a25ee15a489ad10d43)

16 years agor25134: Fix Bug #4968 and make dns updates work with heimdal as well (again,
Günther Deschner [Thu, 13 Sep 2007 16:11:46 +0000 (16:11 +0000)]
r25134: Fix Bug #4968 and make dns updates work with heimdal as well (again,
gss_import_name() needs to follow the same logic as in the LDAP sasl wrapping
(see -r25133).

Tested with MIT 1.2.7, 1.3.6, 1.4.3, 1.5.1, 1.6.1 and Heimdal 0.7.2, 1.0,
1.0.1.

Guenther
(This used to be commit 913fb138aa90a6627ee49b2e92d1bbc73e11f9ea)

16 years agor25133: Fix sasl wrapping (for ldap sign&seal).
Günther Deschner [Thu, 13 Sep 2007 15:59:46 +0000 (15:59 +0000)]
r25133: Fix sasl wrapping (for ldap sign&seal).

The gss_import_name() broke as we switched from the internal MIT OID
"gss_nt_krb5_principal" to "GSS_KRB5_NT_PRINCIPAL_NAME" and didn't switch from
passing the krb5_principal (or better: a pointer to that, see MIT's "*HORRIBLE*
bug") to pass the string principal directly.

Jerry, Jeremy, neither I could figure out the need of passing in a
krb5_principal at all nor could I reproduce the crash you were seeing.

I sucessfully tested the code (now importing a string) with MIT 1.2.7, 1.3.6,
1.4.3, 1.5.1, 1.6.1 and Heimdal 0.7.2, 1.0, 1.0.1.

Guenther
(This used to be commit cb2dc715e33467c8b588161e816e72a948f6860c)

16 years agor25130: make use only of base types which are provided by libreplace
Stefan Metzmacher [Thu, 13 Sep 2007 14:14:02 +0000 (14:14 +0000)]
r25130: make use only of base types which are provided by libreplace
in winbind client and nss/pam stuff

metze
(This used to be commit 2e13e05fa91788bd128e6940bccc0d2cc7140986)

16 years agor25128: _XOPEN_SOURCE_EXTENDED and socklen_t are always provided by libreplace
Stefan Metzmacher [Thu, 13 Sep 2007 12:54:53 +0000 (12:54 +0000)]
r25128: _XOPEN_SOURCE_EXTENDED and socklen_t are always provided by libreplace

metze
(This used to be commit b3ee9adf28ee8136528d0236a3a2c894c2223053)

16 years agor25127: Add ol-schema-migrate.pl to the repo.
Simo Sorce [Thu, 13 Sep 2007 12:51:00 +0000 (12:51 +0000)]
r25127: Add ol-schema-migrate.pl to the repo.
This script is useful for migrating OpenLDAP schema files to FDS/RHDS
lidf schema files.

License kindly updated to GPLv3+ at our request.

Simo.
(This used to be commit ab7770b34b3202a5836cfa098187eeed1bd16be3)

16 years agor25125: create prototypes for 'bool ' functions
Stefan Metzmacher [Thu, 13 Sep 2007 12:25:28 +0000 (12:25 +0000)]
r25125: create prototypes for 'bool ' functions

metze
(This used to be commit 5afa66970ee831a8be887c9e7eeeaceead6049db)

16 years agor25121: Remove pstring limits from much of our string handling function.
Jeremy Allison [Thu, 13 Sep 2007 01:10:01 +0000 (01:10 +0000)]
r25121: Remove pstring limits from much of our string handling function.
Still a few left (mainly the substitute ones).
Jeremy.
(This used to be commit 6552e52979a7c6954faa8b2c9c0f08b3779835c4)

16 years agor25120: One more warning.
Jeremy Allison [Thu, 13 Sep 2007 00:31:02 +0000 (00:31 +0000)]
r25120: One more warning.
Jeremy.
(This used to be commit 9cc70e3ccff9c3b20076572235d9dcbfd23e97e5)

16 years agor25119: Fix a couple of warnings.
Jeremy Allison [Thu, 13 Sep 2007 00:29:25 +0000 (00:29 +0000)]
r25119: Fix a couple of warnings.
Jeremy.
(This used to be commit 0e655ac94653128566a8764ea804f37c4c7b300f)

16 years agor25118: More pstring elimination.
Jeremy Allison [Wed, 12 Sep 2007 23:50:21 +0000 (23:50 +0000)]
r25118: More pstring elimination.
Jeremy.
(This used to be commit 7632f8fb4003657591778d2b55f546d1737859d1)

16 years agor25117: The mega-patch Jerry was waiting for. Remove all pstrings from
Jeremy Allison [Wed, 12 Sep 2007 21:48:20 +0000 (21:48 +0000)]
r25117: The mega-patch Jerry was waiting for. Remove all pstrings from
the main server code paths. We should now be able to cope with
paths up to PATH_MAX length now.
Final job will be to add the TALLOC_CTX * parameter to
unix_convert to make it explicit (for Volker).
Jeremy.
(This used to be commit 7f0db75fb0f24873577dcb758a2ecee74fdc4297)

16 years agor25116: Fix talloc_asprintf_append to do the right thing with
Jeremy Allison [Wed, 12 Sep 2007 21:41:36 +0000 (21:41 +0000)]
r25116: Fix talloc_asprintf_append to do the right thing with
truncated strings.
Jeremy.
(This used to be commit 93c42fd9b52d9135d8c8b52e97cf342c1c5b5010)

16 years agor25111: Move to talloced pathnames on most code paths.
Jeremy Allison [Tue, 11 Sep 2007 23:57:59 +0000 (23:57 +0000)]
r25111: Move to talloced pathnames on most code paths.
There are now ony 17 pstrings left in reply.c,
and these will be easy to remove (and I'll be
doing that shortly). Had to fix an interesting
bug in pull_ucs2_base_talloc() when a source
string is not null terminated :-).
Jeremy.
(This used to be commit 0c9a8c4dff10974dbffd2a302ae982896122fcc0)

16 years agor25109: Remove obsolete argument from ads_guess_service_principal().
Günther Deschner [Tue, 11 Sep 2007 23:35:17 +0000 (23:35 +0000)]
r25109: Remove obsolete argument from ads_guess_service_principal().

Guenther
(This used to be commit 2dea9464bba76af4315a8207ccd3e564ec19d146)

16 years agor25108: Make ifdef labyrinth in sasl code a bit more readable.
Günther Deschner [Tue, 11 Sep 2007 23:21:50 +0000 (23:21 +0000)]
r25108: Make ifdef labyrinth in sasl code a bit more readable.

Guenther
(This used to be commit f31949ec3456134de474a0219a8cd5dcd15adea6)

16 years agor25107: Fix const warning caused by the way I reformatted this
Simo Sorce [Tue, 11 Sep 2007 23:04:14 +0000 (23:04 +0000)]
r25107: Fix const warning caused by the way I reformatted this
(This used to be commit 6ce01bf41339b4c48aa458bb0667664727d3dac3)

16 years agor25104: Fix extra lines added by mistake.
Jeremy Allison [Tue, 11 Sep 2007 21:52:44 +0000 (21:52 +0000)]
r25104: Fix extra lines added by mistake.
Jeremy.
(This used to be commit a28a35f9cdddb9da1b2adb9e2e6c86d78cf07ea6)

16 years agor25103: Ensure we don't return unwritten memory (valgrind caught).
Jeremy Allison [Tue, 11 Sep 2007 19:27:34 +0000 (19:27 +0000)]
r25103: Ensure we don't return unwritten memory (valgrind caught).
Jeremy.
(This used to be commit b3f0d39d11fa18b7bfef6cec88efaf4a2be2d6e0)

16 years agor25102: Rewrite msdfs code to use talloced filenames. Passes make test
Jeremy Allison [Tue, 11 Sep 2007 18:31:29 +0000 (18:31 +0000)]
r25102: Rewrite msdfs code to use talloced filenames. Passes make test
and make valgrindtest. Final step will be to change srvstr_get_path()
to return talloced memory in the major codepaths.
Jeremy.
(This used to be commit cf6b6f9c3a38b68d2671c753f412772344506742)

16 years agor25099: Commit fix for CVE-2007-4138 from 3.0.26 release.
Gerald Carter [Tue, 11 Sep 2007 18:08:07 +0000 (18:08 +0000)]
r25099: Commit fix for CVE-2007-4138 from 3.0.26 release.
(This used to be commit aa768a4a20930833d6921ed112601873b228a64d)

16 years agor25092: Add support for storing trusted domain passwords in LDAP for
Michael Adam [Tue, 11 Sep 2007 16:50:32 +0000 (16:50 +0000)]
r25092: Add support for storing trusted domain passwords in LDAP for
passdb backend = ldapsam.

Along with reproducing the functionality of the secrets.tdb
code, I have prepared the handling of the previous trust password
(in case we are contacting a dc which does not yet know of a recent
password change). This information has still to be propagated
to the outside, but this requires a change of the api and also
a change of the secrets.tdb code.

Michael
(This used to be commit 6c3c20e6c4a2b04de8111f2c79b431f0775c2a0f)

16 years agor25091: Start adding support for storing trusted domain passwords in LDAP
Michael Adam [Tue, 11 Sep 2007 16:38:31 +0000 (16:38 +0000)]
r25091: Start adding support for storing trusted domain passwords in LDAP
(for passdb backen = ldapsam). At a first step, add the hooks,
calling the secrets_ functions.

Michael
(This used to be commit 9c03cdf3a449149c50451a44deb420341e65af34)

16 years agor25090: Fix a syntax error just introduced into the LDAP schema.
Michael Adam [Tue, 11 Sep 2007 16:30:38 +0000 (16:30 +0000)]
r25090: Fix a syntax error just introduced into the LDAP schema.

Michael
(This used to be commit 7dc68ce0fb4490761326eaaca516fde3bf642ed5)

16 years agor25088: Change the objectclass sambaTrustedDomainPassword to
Michael Adam [Tue, 11 Sep 2007 16:25:47 +0000 (16:25 +0000)]
r25088: Change the objectclass sambaTrustedDomainPassword to
have the current and possibly the previous trust password
stored as clear text passwords. (Previous use of NTPassword
was a mistake - this is a hash value.)

Michael
(This used to be commit 0beae52ff469903adbfefdffd93a34bb7ad7d68d)

16 years agor25087: Reformatting: Get rid of an abundance of leading tabs...
Michael Adam [Tue, 11 Sep 2007 16:18:14 +0000 (16:18 +0000)]
r25087: Reformatting: Get rid of an abundance of leading tabs...
(This used to be commit d8676f30d5b8168ff0c82993fb51cff18bea1f96)

16 years agor25086: Fix interdomain trusts (this povides the fix expected in r22709):
Michael Adam [Tue, 11 Sep 2007 16:15:36 +0000 (16:15 +0000)]
r25086: Fix interdomain trusts (this povides the fix expected in r22709):

Fix winbindd on a Samba DC talking to a trusted domain DC by
making it use the trusted domain password...

Michael

I hope this does not brake any other setup.
(This used to be commit 2322fe5cd76c5b7214c66f8a403debe1e36a82d6)

16 years agor25080: Once we decrypted the packet but have timing problems (closkew, tkt not yet or
Günther Deschner [Tue, 11 Sep 2007 14:56:43 +0000 (14:56 +0000)]
r25080: Once we decrypted the packet but have timing problems (closkew, tkt not yet or
no longer valid) there is no point to bother the keytab routines.

Guenther
(This used to be commit 7e4dcf8e7ecfd35668e86e22bed5a9280ae83959)

16 years agor25074: as all requests in the winbindd child are sync, we can use talloc_tos()
Stefan Metzmacher [Tue, 11 Sep 2007 10:21:34 +0000 (10:21 +0000)]
r25074: as all requests in the winbindd child are sync, we can use talloc_tos()

metze
(This used to be commit 6e238fe5b458fc6b9184144fa124f497c81eec8d)

16 years agor25068: Older samba3 DCs will return DCERPC_FAULT_OP_RNG_ERROR for every opcode on the
Günther Deschner [Mon, 10 Sep 2007 23:12:27 +0000 (23:12 +0000)]
r25068: Older samba3 DCs will return DCERPC_FAULT_OP_RNG_ERROR for every opcode on the
LSARPC_DS pipe, continue with no_lsarpc_ds mode here as well to get
domain->initialized set to True. This avoids permanent scanning of Samba3 DCs
in winbindd. Thanks Michael, for pointing this out.

Guenther
(This used to be commit 9b85f7ca43896ddd40dd8cb4a52969e94914db43)

16 years agor25064: We use BOOL/True/False not bool/true/false
Simo Sorce [Mon, 10 Sep 2007 19:19:59 +0000 (19:19 +0000)]
r25064: We use BOOL/True/False not bool/true/false
(This used to be commit f624a269bf242630e9bda7a89b9b0e8e12646982)

16 years agor25063: Fix segfault in smbldp_set_creds when we want to use anonymous, the
Simo Sorce [Mon, 10 Sep 2007 19:14:22 +0000 (19:14 +0000)]
r25063: Fix segfault in smbldp_set_creds when we want to use anonymous, the
code was not passing in the "anon" flag correctly and was passing
NULL pointers.
(This used to be commit 6316a9c14d8bc467c84c1604248a9e30abaacd2f)

16 years agor25062: Reformat, remove trailing spaces and fit lines into 80 columns
Simo Sorce [Mon, 10 Sep 2007 19:04:57 +0000 (19:04 +0000)]
r25062: Reformat, remove trailing spaces and fit lines into 80 columns
(This used to be commit 1850d1c10f1fe77402e0ed79d6980d55d90637fb)