ira/wip.git
16 years agor23297: This introduces the winbind:ads parameter which defaults to True. Setting it
Volker Lendecke [Fri, 1 Jun 2007 18:39:50 +0000 (18:39 +0000)]
r23297: This introduces the winbind:ads parameter which defaults to True. Setting it
to False makes winbind use RPC and not LDAP methods to connect to the DCs,
even when it figured out they are AD.
(This used to be commit 1c1f710e3e2e222c9d91a5650844c1db5ebd5a3a)

16 years agor23295: Apply proto_exists and bin/.dummy dependencies consistently for all
James Peach [Fri, 1 Jun 2007 16:06:40 +0000 (16:06 +0000)]
r23295: Apply proto_exists and bin/.dummy dependencies consistently for all
binaries.  Fix vfs_zfsacl build rule in SAMBA_3_0.
(This used to be commit 07fa76c6c7f54a95889415e27ce6d7c199a6a12c)

16 years agor23291: Undo the somewhat naive change of r23279:
Michael Adam [Fri, 1 Jun 2007 12:24:57 +0000 (12:24 +0000)]
r23291: Undo the somewhat naive change of r23279:
The clear text presentaion of the sid in the ldap expression
does work with w2k3 but not with w2k....

Thanks to Guenther for advising me of this issue.

Michael
(This used to be commit 7e6b0c19f816b52cca257c2837680e70f1af8594)

16 years agor23290: Fix another small and stupid but severe typo.
Michael Adam [Fri, 1 Jun 2007 12:18:16 +0000 (12:18 +0000)]
r23290: Fix another small and stupid but severe typo.
Hopfully, I have finally got this right... :-)

Michael
(This used to be commit 2190d838e49692fcba8f3a393dd30db937899fed)

16 years agor23287: Use talloc_move instead of talloc_steal as this is what I really
Michael Adam [Fri, 1 Jun 2007 10:10:57 +0000 (10:10 +0000)]
r23287: Use talloc_move instead of talloc_steal as this is what I really
wanted to do.

Michael
(This used to be commit f2adae8fc197be1e40769dbda27ee5b1085c3c64)

16 years agor23284: Oh what a nasty typo! This gave me some headache,
Michael Adam [Thu, 31 May 2007 23:58:56 +0000 (23:58 +0000)]
r23284: Oh what a nasty typo! This gave me some headache,
with talloc randomly failing.

Hey, shouldn't TALLOC_ARRAY _not_ return NULL when
requested to allocate an array with zero entries? :-)

Michael
(This used to be commit 7170d2e9f5381b405e0ea902d2b2463e5ca804e6)

16 years agor23283: Use a temporary talloc context in ads:lookup_groupmem.
Michael Adam [Thu, 31 May 2007 23:55:37 +0000 (23:55 +0000)]
r23283: Use a temporary talloc context in ads:lookup_groupmem.
And clean up unused stuff at the end.
Daringly, I use talloc_steal at some point, where it
appears natural to me.

Michael
(This used to be commit f2a29643bdb08bf026eaf974424f4eadfc920ca0)

16 years agor23279: Replace occurrence of sid_binstring inside lookup_groupmem
Michael Adam [Thu, 31 May 2007 22:02:49 +0000 (22:02 +0000)]
r23279: Replace occurrence of sid_binstring inside lookup_groupmem
by sid_string_static.
(This used to be commit ba3026dce02d554313647c3d6825bfe0d30d6ffc)

16 years agor23274: merge CloseEventlog() pidl conversion from 3.0.26 && fix a few init call...
Gerald Carter [Thu, 31 May 2007 17:59:04 +0000 (17:59 +0000)]
r23274: merge CloseEventlog() pidl conversion from 3.0.26 && fix a few init call renames for svcctl in the previous commit
(This used to be commit ebcae48ec10fefa74efcc3563cff50e3b9c2388c)

16 years agor23272: Fix main event loop - reviewed by Volker.
Jeremy Allison [Thu, 31 May 2007 17:26:30 +0000 (17:26 +0000)]
r23272: Fix main event loop - reviewed by Volker.
Jeremy.
(This used to be commit dfb4cb5d2bd6c50ad2ecfa729d76daccfc43925a)

16 years agor23271: merge service control pidl change for CloseServiceHandle() from SAMBA_3_0_26
Gerald Carter [Thu, 31 May 2007 17:24:30 +0000 (17:24 +0000)]
r23271: merge service control pidl change for CloseServiceHandle() from SAMBA_3_0_26
(This used to be commit 0b1bc3521fac52f3164b6cc9e053abc3ceabf5e7)

16 years agor23269: Regenerate svcctl files after IDL fixes
Gerald Carter [Thu, 31 May 2007 15:46:01 +0000 (15:46 +0000)]
r23269: Regenerate svcctl files after IDL fixes
(This used to be commit 92c505bf7f15a79c6e32a38b2d218f65b0283507)

16 years agor23268: Rename some variables in the svcctl.idl to prevent
Gerald Carter [Thu, 31 May 2007 15:43:40 +0000 (15:43 +0000)]
r23268: Rename some variables in the svcctl.idl to prevent
redeclaration compile failures in the generated client
code.
(This used to be commit 87b37de8ad4e91e75530996dde0900b6e1fed622)

16 years agor23263: Remove an unused variable -- Fix Coverity ID 358
Volker Lendecke [Thu, 31 May 2007 09:23:51 +0000 (09:23 +0000)]
r23263: Remove an unused variable -- Fix Coverity ID 358
(This used to be commit c5929aa82b20e8a3877e6196c17bc9118cb399b0)

16 years agor23253: Add some debugging output.
Michael Adam [Wed, 30 May 2007 22:40:26 +0000 (22:40 +0000)]
r23253: Add some debugging output.
(This used to be commit bd90573fbb3ff243f343fcfc61b6228aa70b13e3)

16 years agor23252: Complete the reworking of the ads lookup_groupmem function
Michael Adam [Wed, 30 May 2007 22:04:42 +0000 (22:04 +0000)]
r23252: Complete the reworking of the ads lookup_groupmem function
started in r23070, r23072, r23073, r23078, r23081 and r23082:

After retrieving the list of sids with the extended dn
ldap query, instead of passing all sids to the lsa_lookup_sids
call, now while extracting the sids from the extended dn member
entries, we first try to lookup the sid from cache and only pass
the sids that were not in cache to the lsa_lookup_sids call.

Michael
(This used to be commit 5520c7d8557fe48957c2a85eaba8c3a0e9d8b9e2)

16 years agor23251: whoops! Fix compile error
Gerald Carter [Wed, 30 May 2007 21:55:49 +0000 (21:55 +0000)]
r23251: whoops!  Fix compile error
(This used to be commit 22a3ea40ac69fa3722abf28db845ab284a65ad97)

16 years agor23249: another sync from 3.0.26 for the echo work to rpcclient
Gerald Carter [Wed, 30 May 2007 21:46:03 +0000 (21:46 +0000)]
r23249: another sync from 3.0.26 for the echo work to rpcclient
(This used to be commit 7aa1f89eb369805e3c3e36b4d62dddbea9dfab2f)

16 years agor23248: Merge echo pipe implementation chanegs from SAMBA_3_0_26
Gerald Carter [Wed, 30 May 2007 21:43:48 +0000 (21:43 +0000)]
r23248: Merge echo pipe implementation chanegs from SAMBA_3_0_26
just to stay in sink.  This was more or less just for me
to play with.
(This used to be commit 6c4b85cce0f947771fd9aa93451c53adb1795e3f)

16 years agor23244: Fix loop with nscd and NSS recusive calls.
Gerald Carter [Wed, 30 May 2007 19:47:35 +0000 (19:47 +0000)]
r23244: Fix loop with nscd and NSS recusive calls.

> Here's the problem I hit:
>
> getgrnam("foo") -> nscd -> NSS -> winbindd ->
>   winbindd_passdb.c:nam_to_sid() -> lookup_global_sam_name() ->
>   getgrnam("foo") -> nscd -> ....
>
> This is in the SAMBA_3_0 specifically but in theory could happen
> SAMBA_3_0_25 (or 26) for an unknown group.
>
> The attached patch passes down enough state for the
> name_to_sid() call to be able to determine the originating
> winbindd cmd that came into the parent.  So we can avoid
> making more NSS calls if the original call came in trough NSS
> so we don't deadlock ?  But you should still service
> lookupname() calls which are needed for example when
> doing the token access checks for a "valid groups" from
> smb.conf.
>
> I've got this in testing now.  The problem has shown up with the
> DsProvider on OS X and with nscd on SOlaris and Linux.
(This used to be commit bcc8a3290aaa0d2620e9d391ffbbf65541f6d742)

16 years agor23242: BUG 4671: Fix Makefile syntax error when SMBMOUNT_PROGS is not defined
Gerald Carter [Wed, 30 May 2007 14:53:10 +0000 (14:53 +0000)]
r23242: BUG 4671: Fix Makefile syntax error when SMBMOUNT_PROGS is not defined
(This used to be commit 592e73dc31672c993aad5afde73b1c43dd31eed2)

16 years agor23241: In preparation for the cluster messaging import the parent smbd needs to
Volker Lendecke [Wed, 30 May 2007 13:41:38 +0000 (13:41 +0000)]
r23241: In preparation for the cluster messaging import the parent smbd needs to
respond to events.c style events.
(This used to be commit 476080df3ff19c3c4742928ff50293935e171f99)

16 years agor23236: Another bad merge: Correctly free and unlock the session record in
Volker Lendecke [Wed, 30 May 2007 07:02:40 +0000 (07:02 +0000)]
r23236: Another bad merge: Correctly free and unlock the session record in
session_claim. Jerry, this fixes the hanging smbstatus.

Sorry for that,

Volker
(This used to be commit 86ff82a5df998045185682cf09b2db3d37f01004)

16 years agor23228: Merge cleanup to the gpfs module from Tridge. Also potentially disable
Volker Lendecke [Tue, 29 May 2007 19:54:26 +0000 (19:54 +0000)]
r23228: Merge cleanup to the gpfs module from Tridge. Also potentially disable
gpfs share modes in special situations. This might be split up in
several modules later.
(This used to be commit 553fe9245165ce4a14902daa722935c94ff32d61)

16 years agor23226: Make the "debug prefix timestamp" output a bit more readable by making
Volker Lendecke [Tue, 29 May 2007 19:36:13 +0000 (19:36 +0000)]
r23226: Make the "debug prefix timestamp" output a bit more readable by making
the debug level alway at least 2 digits
(This used to be commit 94d2fd919c268efa3df2661d2ccb32e492c52f53)

16 years agor23225: Attached find a patch that makes use of NetSamLogonEx in
Volker Lendecke [Tue, 29 May 2007 19:31:57 +0000 (19:31 +0000)]
r23225: Attached find a patch that makes use of NetSamLogonEx in
winbind. With this and W2k3 DCs around it is possible to use
more than one winbind on the same machine account, because
NetSamLogonEx does not use the credentials chain.

I added the flag domain->can_do_samlogon_ex because this
only works against W2k3 and with schannel. The theory is to
try if we're AD and have schannel, and fall back to
NetSamLogon if this fails. can_do_samlogon_ex is thus a
protection against multiple failures.

Only checking into 3_0, this needs more review before going
into a production release.

Feel free to comment :-)
(This used to be commit f5d525399b0b03a3d0b223fe72ef0a8a631fc599)

16 years agor23224: Move map_nt_error_from_unix to lib/errmap_unix.c. This function is
Volker Lendecke [Tue, 29 May 2007 19:09:38 +0000 (19:09 +0000)]
r23224: Move map_nt_error_from_unix to lib/errmap_unix.c. This function is
useful even in binaries that don't link in libsmb
(This used to be commit 52545d119277b42a46d13b5b031c85f47d96b84c)

16 years agor23223: Convert a leftover direct tdb access to sessionid.tdb
Volker Lendecke [Tue, 29 May 2007 18:41:16 +0000 (18:41 +0000)]
r23223: Convert a leftover direct tdb access to sessionid.tdb
(This used to be commit 201c8952a812fe0c9be95a71fbc55c12ba8daa55)

16 years agor23222: share_mode_forall() is only for counting and status display stuff, so
Volker Lendecke [Tue, 29 May 2007 18:32:49 +0000 (18:32 +0000)]
r23222: share_mode_forall() is only for counting and status display stuff, so
traverse_read is enough here
(This used to be commit 40991badef046233326815e50097aa7f493790e8)

16 years agor23221: Fix a bad merge, avoid a memory leak and tdb lock problem
Volker Lendecke [Tue, 29 May 2007 18:14:54 +0000 (18:14 +0000)]
r23221: Fix a bad merge, avoid a memory leak and tdb lock problem
(This used to be commit 2e2415655d352708b9799ae5ff4d9276c49cfb3b)

16 years agor23220: Add traverse_read to dbwrap
Volker Lendecke [Tue, 29 May 2007 18:04:38 +0000 (18:04 +0000)]
r23220: Add traverse_read to dbwrap
(This used to be commit b38dc5ffdfe9fdc2879c57dc181815f06b4747fe)

16 years agor23219: Two warnings
Volker Lendecke [Tue, 29 May 2007 17:57:52 +0000 (17:57 +0000)]
r23219: Two warnings
(This used to be commit eccd50abdaed3e4e06cc5da5473ca1beeb3fc49a)

16 years agor23210: Very funny, we thought to use netr_GetDcName (e.g. in winbind) but were using
Günther Deschner [Tue, 29 May 2007 15:27:13 +0000 (15:27 +0000)]
r23210: Very funny, we thought to use netr_GetDcName (e.g. in winbind) but were using
netr_GetDcAnyName all the time (which is the correct thing to do).

Fix the naming and opcode mixup in all branches.

Guenther
(This used to be commit def6464c872a5939f0028837254f2c019d2d71c8)

16 years agor23207: merge net help test fix from SAMBA_3_0_26
Gerald Carter [Tue, 29 May 2007 14:53:46 +0000 (14:53 +0000)]
r23207: merge net help test fix from SAMBA_3_0_26
(This used to be commit dbee1088bb06a4ccb440d372102eb5c105cc4294)

16 years agor23206: remove unreachable code
Gerald Carter [Tue, 29 May 2007 14:53:13 +0000 (14:53 +0000)]
r23206: remove unreachable code
(This used to be commit 6e2bb4836fab5e548429613dea431007af3a7995)

16 years agor23204: Add MSG_SMB_BRL_VALIDATE. Tridge, this is a bit different from your bzr
Volker Lendecke [Tue, 29 May 2007 14:49:19 +0000 (14:49 +0000)]
r23204: Add MSG_SMB_BRL_VALIDATE. Tridge, this is a bit different from your bzr
branch, please check if it fulfils your needs.

Two changes: The validation is not done inside the brlock.c traverse_fn,
it's done as a separate routine.

Secondly, this patch does not call the checker routines in smbcontrol
directly but depends on a running smbd.
(This used to be commit 7e39d77c1f90d9025cab08918385d140e20ca25b)

16 years agor23195: Add void *private_data to brl_forall
Volker Lendecke [Tue, 29 May 2007 13:26:44 +0000 (13:26 +0000)]
r23195: Add void *private_data to brl_forall
(This used to be commit c91b2bdc160d76bf0b0770fe7f92cbc7124d6c3c)

16 years agor23194: cherry pick two fixes from SAMBA_3_0_26
Gerald Carter [Tue, 29 May 2007 13:20:40 +0000 (13:20 +0000)]
r23194: cherry pick two fixes from SAMBA_3_0_26

* strptime() failure check
* make legcacy sid/uid/gid calls static
(This used to be commit 3c9fb1c6f3263c0ce6edbf2a8824c153317a84a3)

16 years agor23192: Remove fallback to looking up group mappings by the
Gerald Carter [Tue, 29 May 2007 13:18:57 +0000 (13:18 +0000)]
r23192: Remove fallback to looking up group mappings by the
Unix name after discussion with Simo.
(This used to be commit 6af4c1a73cdb523e5a81c15128c706a16f76c84d)

16 years agor23186: Checkin on behalf of Tridge:
Volker Lendecke [Tue, 29 May 2007 10:50:25 +0000 (10:50 +0000)]
r23186: Checkin on behalf of Tridge:

Change notify.tdb to use dbwrap
(This used to be commit 3a089403871df88f4a3bf86c3db0d169cd4fb434)

16 years agor23185: Try to fix the IRIX build, also add the forgotten file_id.c in .26
Volker Lendecke [Tue, 29 May 2007 10:48:42 +0000 (10:48 +0000)]
r23185: Try to fix the IRIX build, also add the forgotten file_id.c in .26
(This used to be commit 5360e6405b170137e558fd0696ebd6030e0f5deb)

16 years agor23184: Checkin for Tridge: Add a speed test to tdbtool
Volker Lendecke [Tue, 29 May 2007 10:15:01 +0000 (10:15 +0000)]
r23184: Checkin for Tridge: Add a speed test to tdbtool
(This used to be commit a343521439f68c76c9939f04eea96c6e6d6b01e4)

16 years agor23183: Check in a change made by Tridge:
Volker Lendecke [Tue, 29 May 2007 09:30:34 +0000 (09:30 +0000)]
r23183: Check in a change made by Tridge:

This replaces the internal explicit dev/ino file id representation by a
"struct file_id". This is necessary as cluster file systems and NFS
don't necessarily assign the same device number to the shared file
system. With this structure in place we can now easily add different
schemes to map a file to a unique 64-bit device node.

Jeremy, you might note that I did not change the external interface of
smb_share_modes.c.

Volker
(This used to be commit 9b10dbbd5de8813fc15ebbb6be9b18010ffe8139)

16 years agor23173: Convert sessionid.tdb to ctdb. The 3.0.26 patch is a bit larger because
Volker Lendecke [Mon, 28 May 2007 13:33:54 +0000 (13:33 +0000)]
r23173: Convert sessionid.tdb to ctdb. The 3.0.26 patch is a bit larger because
it brings across the tdb-based list_sessions
(This used to be commit 0153386c1a3625b2f699863991893f399c40af48)

16 years agor23172: Change shutdown_other_smbds to use connections_traverse instead of
Volker Lendecke [Mon, 28 May 2007 12:39:39 +0000 (12:39 +0000)]
r23172: Change shutdown_other_smbds to use connections_traverse instead of
session_traverse.
(This used to be commit ccb5eb245e962b0264b337c2d0275c22e2a36830)

16 years agor23171: Convert connections.tdb to dbwrap
Volker Lendecke [Mon, 28 May 2007 11:38:42 +0000 (11:38 +0000)]
r23171: Convert connections.tdb to dbwrap
(This used to be commit 80a1f43825063bbbda896175d99700ede5a4757a)

16 years agor23170: Add map_nt_error_from_tdb()
Volker Lendecke [Mon, 28 May 2007 11:08:58 +0000 (11:08 +0000)]
r23170: Add map_nt_error_from_tdb()
(This used to be commit 02beae81c8ecef7cfe300a29852d74813c9409bf)

16 years agor23169: Merge 535 of Tridge's bzr tree:
Volker Lendecke [Sun, 27 May 2007 17:12:08 +0000 (17:12 +0000)]
r23169: Merge 535 of Tridge's bzr tree:

  store the right data after cleaning lock records. This fixes
  RAW-BENCH-LOCK after a recovery on a cluster
(This used to be commit 3da3086dbf594fbdc4cfabf78f8d3ea1df4dc8ce)

16 years agor23168: Move the lp_max_connections() into service.c.
Volker Lendecke [Sun, 27 May 2007 16:34:49 +0000 (16:34 +0000)]
r23168: Move the lp_max_connections() into service.c.
(This used to be commit 4afe37d431b6eb475769a2057025da9aa8d1bb14)

16 years agor23167: Remove an unused parameter
Volker Lendecke [Sun, 27 May 2007 16:22:12 +0000 (16:22 +0000)]
r23167: Remove an unused parameter
(This used to be commit 3452a870d58cdddf03ddf6ee698bca8416e05cbf)

16 years agor23166: Bring samba.org's iniparser copy in sync with the upstream version 2.17.
Lars Müller [Sun, 27 May 2007 15:58:19 +0000 (15:58 +0000)]
r23166: Bring samba.org's iniparser copy in sync with the upstream version 2.17.
(This used to be commit 3fa98245d98436a0f042ffca9bf102e9f920bace)

16 years agor23165: Convert brlock.tdb to dbwrap
Volker Lendecke [Sun, 27 May 2007 10:35:14 +0000 (10:35 +0000)]
r23165: Convert brlock.tdb to dbwrap
(This used to be commit 84f9885cf8cc57dcf3c2738d6b245de314890a41)

16 years agor23164: Minor cosmetic checkin
Volker Lendecke [Sun, 27 May 2007 10:25:23 +0000 (10:25 +0000)]
r23164: Minor cosmetic checkin
(This used to be commit 8de1ac9fadb1b0dcac28eef32f7826e9e3a7eca4)

16 years agor23163: Convert locking.tdb to dbwrap
Volker Lendecke [Sun, 27 May 2007 09:57:05 +0000 (09:57 +0000)]
r23163: Convert locking.tdb to dbwrap
(This used to be commit afe90224bf151acf6c7be8974408f79cfd459dbf)

16 years agor23162: Make use of messaging_send_buf
Volker Lendecke [Sun, 27 May 2007 09:29:26 +0000 (09:29 +0000)]
r23162: Make use of messaging_send_buf
(This used to be commit 3f8186fe85a897b104cd825a005333259d6d008b)

16 years agor23161: Add TDB_VOLATILE as open_flag to activate the per-hashchain dead record
Volker Lendecke [Sun, 27 May 2007 09:22:11 +0000 (09:22 +0000)]
r23161: Add TDB_VOLATILE as open_flag to activate the per-hashchain dead record
optimization.
(This used to be commit 945f73fa39ba6f2b637379ac20d52b4d0306d77f)

16 years agor23156: Install the smb_share_modes.h header file.
Lars Müller [Sat, 26 May 2007 13:33:56 +0000 (13:33 +0000)]
r23156: Install the smb_share_modes.h header file.
(This used to be commit e03a67ebc622aefb898b58aee55ac9ebadadd349)

16 years agor23155: Rename INSTALLPERMS to INSTALLPERMS_BIN to differenciate clearer from
Lars Müller [Sat, 26 May 2007 13:30:45 +0000 (13:30 +0000)]
r23155: Rename INSTALLPERMS to INSTALLPERMS_BIN to differenciate clearer from
INSTALLPERMS_DATA.
(This used to be commit 7a9ea106ff7ce54029bcd604d7a89b7134c2b885)

16 years agor23154: Add INSTALLPERMS_DATA set to 0644 to install the header files with this
Lars Müller [Sat, 26 May 2007 13:24:56 +0000 (13:24 +0000)]
r23154: Add INSTALLPERMS_DATA set to 0644 to install the header files with this
permission set instead of 0755.
(This used to be commit 1db52993eda542757e80e1d7d2ce82a9c9abd93a)

16 years agor23151: Re-arrange the logic so it looks identical to the
Jeremy Allison [Sat, 26 May 2007 01:26:09 +0000 (01:26 +0000)]
r23151: Re-arrange the logic so it looks identical to the
"file existed" case above. This has no functional
change but is easier to see that it's doing the
same thing.
Jeremy.
(This used to be commit 0a7d8362be8379b77e6afb803ab88d726ae7877d)

16 years agor23150: Fix Samba3 in the build farm again. In the case where the
Jeremy Allison [Sat, 26 May 2007 01:19:51 +0000 (01:19 +0000)]
r23150: Fix Samba3 in the build farm again. In the case where the
file was being created and we go into the race condition check,
we were testing for compatible open modes, but were not breaking
oplocks in the same way as if the file existed. This meant that
we weren't going into the code path that sets fsp->oplock = FAKE_LEVEL_II_OPLOCK
if the client didn't ask for an oplock on file create. We need
to do this as internally it's what Windows does.
Jeremy.
(This used to be commit 9b9513856e9e9f84d5acd94e3e3d6e73358ee7dc)

16 years agor23148: Fix old old bug in cli_smbwrite() (not incrementing
Jeremy Allison [Fri, 25 May 2007 23:50:35 +0000 (23:50 +0000)]
r23148: Fix old old bug in cli_smbwrite() (not incrementing
data being sent). Patch from mnix@wanm.com.au.
Jeremy.
(This used to be commit 2524d85465ba5406e684199c10f59e685ab860b5)

16 years agor23147: Patch #4566 from jacob berkman <jberkman@novell.com>. Pass password data...
Jeremy Allison [Fri, 25 May 2007 22:04:03 +0000 (22:04 +0000)]
r23147: Patch #4566 from jacob berkman <jberkman@novell.com>. Pass password data to krb5_prompter.
Jeremy.
(This used to be commit 232fc5d69d44404df13f6516864352f9a5721552)

16 years agor23128: Fix typo.
Günther Deschner [Thu, 24 May 2007 23:17:24 +0000 (23:17 +0000)]
r23128: Fix typo.

Guenther
(This used to be commit 52fdbbda53df79461322b9d21aba998f19181df8)

16 years agor23127: Fill in some more netlogon dsgetdcname flavours (netr_DsRGetDCNameEx,
Günther Deschner [Thu, 24 May 2007 23:11:11 +0000 (23:11 +0000)]
r23127: Fill in some more netlogon dsgetdcname flavours (netr_DsRGetDCNameEx,
netr_DsRGetDCNameEx2) and add new ds request and reply flags, also add some
more WERROR codes.

Guenther
(This used to be commit 37ae7f419702c563bcd0d9c27c02bde7efd34dd7)

16 years agor23122: Fix bug #4655. We marshall the enumdataex correctly,
Jeremy Allison [Thu, 24 May 2007 20:40:46 +0000 (20:40 +0000)]
r23122: Fix bug #4655. We marshall the enumdataex correctly,
but W2K3 doesn't follow our rules when sending data to
us. Ensure we look for the data at the correct offsets
when reading the data.
Too late for 3.0.25a - don't merge.
Jeremy.
(This used to be commit a871191395eef6ed76f9e7666fd1c0fde3105984)

16 years agor23121: Fix Bug #2727 and let pam_smbpass at least link and dlopen correctly again.
Günther Deschner [Thu, 24 May 2007 20:26:07 +0000 (20:26 +0000)]
r23121: Fix Bug #2727 and let pam_smbpass at least link and dlopen correctly again.

Thanks to Bartlomiej Solarz-Niesluchowski <Bartlomiej.Solarz-Niesluchowski@wit.edu.pl>.

Guenther
(This used to be commit ba956ab8e4097d46bbad12caf2fad6857f463618)

16 years agor23117: Factor out local messaging.
Volker Lendecke [Thu, 24 May 2007 14:47:24 +0000 (14:47 +0000)]
r23117: Factor out local messaging.

This removes message_block / message_unblock. I've talked to Jeremy and
Günther, giving them my reasons why I believe they have no effect.
Neither could come up with a counter-argument, so they go :-)
(This used to be commit a925e0991ffbaea4a533bab3a5d61e5d367d46c8)

16 years agor23116: Fix typo, found by Karolin Seeger
Volker Lendecke [Thu, 24 May 2007 13:49:10 +0000 (13:49 +0000)]
r23116: Fix typo, found by Karolin Seeger
(This used to be commit a7b9581a5c01b701129cdd5a7a330748f9e3859e)

16 years agor23112: Trim down the message.c API slightly: The messages_pending_for_pid is now
Volker Lendecke [Thu, 24 May 2007 11:09:37 +0000 (11:09 +0000)]
r23112: Trim down the message.c API slightly: The messages_pending_for_pid is now
replaced by MSG_FLAG_LOWPRIORITY or'ed into the msg_type. To enable this,
changed the msg_type definitions to hexadecimal.

This way we could theoretically add the MSG_FLAG_NODUPLICATES again, but I
would rather not do this, because that one is racy and can't be guaranteed at
all.
(This used to be commit 3f5eb8a9600839a9f9c44c553f0bda6df22b30b0)

16 years agor23109: Redo the change from r22772 I accidentially undid in r23108.
Michael Adam [Thu, 24 May 2007 09:06:15 +0000 (09:06 +0000)]
r23109: Redo the change from r22772 I accidentially undid in r23108.

Michael
(This used to be commit 18a7e739ea5d19b2e220641e19662e2c263d281a)

16 years agor23108: Add defines of RTLD_NOW and RTLD_GLOBAL to replace.h.
Michael Adam [Thu, 24 May 2007 07:15:36 +0000 (07:15 +0000)]
r23108: Add defines of RTLD_NOW and RTLD_GLOBAL to replace.h.
Fixing build of ldb for instance on some systems without dlfcn.h.
(This used to be commit 5a06726e6873accd255d584e2c18e62dfcac108d)

16 years agor23107: Fix renames on file descriptors that are supposed to overwrite the
Jeremy Allison [Thu, 24 May 2007 01:57:02 +0000 (01:57 +0000)]
r23107: Fix renames on file descriptors that are supposed to overwrite the
target. Needs merging for 3.0.25a (sorry).
Jeremy.
(This used to be commit a56bce3d44e89b4fd7806cc5b464c7481ec0197f)

16 years agor23106: Use lchown for symlinks.
Jeremy Allison [Thu, 24 May 2007 00:13:24 +0000 (00:13 +0000)]
r23106: Use lchown for symlinks.
Jeremy.
(This used to be commit b98175440b2c235fe223b4375441f15ea027a5b2)

16 years agor23105: Add lchown to the vfs layer. We need this in the POSIX code.
Jeremy Allison [Wed, 23 May 2007 23:55:12 +0000 (23:55 +0000)]
r23105: Add lchown to the vfs layer. We need this in the POSIX code.
Jeremy.
(This used to be commit 932523cbb508db869b726768e86bfa8e248f768b)

16 years agor23100: Implement the delete on close semantics I've just tested for
Jeremy Allison [Wed, 23 May 2007 21:32:10 +0000 (21:32 +0000)]
r23100: Implement the delete on close semantics I've just tested for
in Samba4 smbtorture. Fix rename on an open file handle.
Needed for 3.0.25a.
Jeremy.
(This used to be commit a301467d5f645dada27093ddfd74890b88bb4ce8)

16 years agor23098: Fix the case of the #include statements so this module can be built on a
James Peach [Wed, 23 May 2007 20:48:53 +0000 (20:48 +0000)]
r23098: Fix the case of the #include statements so this module can be built on a
case-sensitive filesystem.
(This used to be commit 0fd0b57107fcdbf7eda85b3f3b969c5dc9eaadc5)

16 years agor23097: Add a new configure option to disable building SWAT (it is still built by
James Peach [Wed, 23 May 2007 20:46:07 +0000 (20:46 +0000)]
r23097: Add a new configure option to disable building SWAT (it is still built by
default).
(This used to be commit 910d498a0e44d1c2b76ccddef0cf05e693cf580e)

16 years agor23096: Make the lock failure message prettier.
James Peach [Wed, 23 May 2007 20:38:14 +0000 (20:38 +0000)]
r23096: Make the lock failure message prettier.
(This used to be commit 853f41edb8b23d7fdfaba9c4bb37dc27af92a982)

16 years agor23095: Support systems that have their PAM headers in /usr/include/pam.
James Peach [Wed, 23 May 2007 20:31:28 +0000 (20:31 +0000)]
r23095: Support systems that have their PAM headers in /usr/include/pam.
(This used to be commit f1e8de4b576b3954d456cb64c02417908bab8da4)

16 years agor23094: Update the iconv detection to handle cross-compiles better. If we are
James Peach [Wed, 23 May 2007 19:57:13 +0000 (19:57 +0000)]
r23094: Update the iconv detection to handle cross-compiles better. If we are
cross-compiling, we accept the first iconv library that we find (with a
warning).
(This used to be commit 9417832155d634864f37d0fdb173ec607c154069)

16 years agor23093: Allow modules with the same name but different types.
James Peach [Wed, 23 May 2007 19:10:04 +0000 (19:10 +0000)]
r23093: Allow modules with the same name but different types.
(This used to be commit 190a69b1f9d7a0f858ed56c505c2d3c473273463)

16 years agor23091: Add rpccli_netlogon_sam_network_logon_ex, fix its parsing. This does not
Volker Lendecke [Wed, 23 May 2007 15:17:49 +0000 (15:17 +0000)]
r23091: Add rpccli_netlogon_sam_network_logon_ex, fix its parsing. This does not
use the credential chain and only works over netlogon, but it would
allow multiple outstanding auth requests for a single workstation
account.
(This used to be commit 123290d0947191abca4a3b3d81718c823c1bc4a0)

16 years agor23088: Fix rename for cifsfs client. This may be needed for
Jeremy Allison [Tue, 22 May 2007 23:56:47 +0000 (23:56 +0000)]
r23088: Fix rename for cifsfs client. This may be needed for
3.0.25a.
Jeremy.
(This used to be commit 02e4f6b0f1f1a1cc6bfe5fed7866eb5b18ab87e0)

16 years agor23087: Fix POSIX setfilepathinfo to use lstat, not stat.
Jeremy Allison [Tue, 22 May 2007 22:35:13 +0000 (22:35 +0000)]
r23087: Fix POSIX setfilepathinfo to use lstat, not stat.
Still missing lchown (will add this for 3.0.26).
Don't merge for 3.0.25a - possibly 3.0.25b (if it
exists).
Jeremy.
(This used to be commit f546750176a22cdd7298a73afc81587923baaff9)

16 years agor23082: Ooops - that portion of the last checkin was by accident.
Michael Adam [Tue, 22 May 2007 21:17:31 +0000 (21:17 +0000)]
r23082: Ooops - that portion of the last checkin was by accident.
Before comitting that, I have to verify that it does not
break anything...

Michael
(This used to be commit 55ea93d47e72d13b7e6d6900eea5da1e9a49ff8d)

16 years agor23081: Reorder the lsa_lookup_sids functions so that the order makes more sense...
Michael Adam [Tue, 22 May 2007 21:04:56 +0000 (21:04 +0000)]
r23081: Reorder the lsa_lookup_sids functions so that the order makes more sense...
(This used to be commit 374dea8c6f5192224ee46e0c3c9b63221028858e)

16 years agor23080: Fix bug #4637 - we hads missed some cases where
Jeremy Allison [Tue, 22 May 2007 20:20:01 +0000 (20:20 +0000)]
r23080: Fix bug #4637 - we hads missed some cases where
we were calling PRS_ALLOC_MEM with zero count.
Jeremy.
(This used to be commit 9a10736e6fa276ca4b0726fbb7baf0daafbdc46d)

16 years agor23078: Don't handle return code NT_STATUS_NONE_MAPPED from lookup sids
Michael Adam [Tue, 22 May 2007 15:13:32 +0000 (15:13 +0000)]
r23078: Don't handle return code NT_STATUS_NONE_MAPPED from lookup sids
as an error. (This is purely cosmetic here, issuing a success
message at the end.)
(This used to be commit 4d9e8c91dc387cef37ea9035ac4483916e854732)

16 years agor23077: Minor cleanup
Volker Lendecke [Tue, 22 May 2007 14:31:26 +0000 (14:31 +0000)]
r23077: Minor cleanup
(This used to be commit 72ed8388252bed07627b3a4636744dc8acf1c98b)

16 years agor23075: more duplicate code blocks from bad merge
Gerald Carter [Tue, 22 May 2007 13:55:31 +0000 (13:55 +0000)]
r23075: more duplicate code blocks from bad merge
(This used to be commit 86b6a41d5784a0214810c9cbc52ca5e99952898d)

16 years agor23074: Remove duplicate code blocks from bad merge
Gerald Carter [Tue, 22 May 2007 13:43:34 +0000 (13:43 +0000)]
r23074: Remove duplicate code blocks from bad merge
(This used to be commit 2c64638934e83e5716e47986adbb1fa07c057486)

16 years agor23073: In the internal rpccli_lsa_lookup_sids_noalloc(), use a temporary
Michael Adam [Tue, 22 May 2007 13:40:01 +0000 (13:40 +0000)]
r23073: In the internal rpccli_lsa_lookup_sids_noalloc(), use a temporary
talloc context for use with the actual rpc query and response.
So the the parent context does not get flooded by the posslibly
large amount of response data (when looking up a lot of sids).

Note: It not possible, to simply use the names and domains arrays
as talloc contexts for the talloc_strdup calls, because from
rpccli_lsa_lookup_sids_all, this is called with names + offset
and domains + offset where names and domains are talloced
arraye for the complete response.
(This used to be commit 8e60900c5c5fccbe1718b805b6b1628d32b920d0)

16 years agor23072: In winbindd_ads.c:lookup_groupmem, replace the bottleneck
Michael Adam [Tue, 22 May 2007 12:49:41 +0000 (12:49 +0000)]
r23072: In winbindd_ads.c:lookup_groupmem, replace the bottleneck
dn_lookup loop by a rpccli_lsa_lookupsids_all (see r23070)
call. This replaces one ldap search per member sid by one
rpc call per 1000 sids. This greatly speeds up groupmem
lookups for groups with lots of users.

Since the loop in lookup_groupmem was the only use of dn_lookup,
the function is removed.

Michael
(This used to be commit 88dac65ab1b951d445f0eedb638e9ace93139872)

16 years agor23070: The lsa rpc lookup sids call has a maximum number of SIDS to be
Michael Adam [Tue, 22 May 2007 11:30:35 +0000 (11:30 +0000)]
r23070: The lsa rpc lookup sids call has a maximum number of SIDS to be
looked up at one time. This limit is at 20480 for w2k3.
Our rpccli_lsa_lookup_sids function ignores this limit, so when
we give the server too long a list of SIDs, then we will get
nothing back. Since typically rpccli_lsa_lookup_sids is given
one SID  (or a small number of SIDS), this did not do harm
up to now. But since I want to use lsa_lookup_sids in a subsequent
modification to winbindd_ads.c:lookup_groupmem to get rid of
a vast number of dn_lookup calls to the server, I had to make
sure we do it correctly.

I have added a function rpccli_lsa_lookup_sids_all function
that has the same prototype but internally splits the list
of SIDs up into hunks of a (conservative, hard coded) 1000
SIDs each for a first go.

If this approach is agreed upon, the new function could replace
the original rpccli_lsa_lookup_sids function.

Michael
(This used to be commit 66ff0bc6c39f86a9830dc508cd891e33638b475d)

16 years agor23068: Fix some uninitialized variables in the solarisacl module
Volker Lendecke [Tue, 22 May 2007 10:05:56 +0000 (10:05 +0000)]
r23068: Fix some uninitialized variables in the solarisacl module
(This used to be commit 569c04a2445a74469663cec33ae42ddfcdbe1dfc)

16 years agor23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
Volker Lendecke [Mon, 21 May 2007 22:17:13 +0000 (22:17 +0000)]
r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more
than one place, so I wanted a decent routine to marshall a message_rec
struct which was not there before.

Tridge, this seems about the same speed as it used to be before, the
librpc/ndr overhead in my tests was under the noise.

Volker
(This used to be commit eaefd00563173dfabb7716c5695ac0a2f7139bb6)

16 years agor23054: Move the check for the lookup_domain of S-1-22-{1,2} before the
Gerald Carter [Mon, 21 May 2007 21:33:51 +0000 (21:33 +0000)]
r23054: Move the check for the lookup_domain of S-1-22-{1,2} before the
check for IS_DC.  Otherwise we will for example fail to lookup a
sid of S-1-22-1-780 because it has no valid struct winbindd_domain*
in the list.   Thanks to Simo for the catch.
(This used to be commit f53aa56998411b90de238e12e9c3de7f2ff0d2b6)

16 years agor23051: sid_to_[ug]id fixes for smbd
Simo Sorce [Mon, 21 May 2007 20:51:15 +0000 (20:51 +0000)]
r23051: sid_to_[ug]id fixes for smbd
(This used to be commit 2d636ad2a33d0ca61bf6022feceed47dd68ef855)

16 years agor23048: Simo is correct in that winbind_lookup{sid,name}_async() needs
Gerald Carter [Mon, 21 May 2007 20:36:22 +0000 (20:36 +0000)]
r23048: Simo is correct in that winbind_lookup{sid,name}_async() needs
to be able to handle SIDs in the S-1-22-{1,2} domain in order
for winbindd_sid_to_uid(), et. al. to succeed.  For 3.0.25a,
we will short circuit in the sid_to_uid() family of functions
so that smbd is ok.

For 3.0.26, we need to allow winbindd to handle all types of SIDs.
(This used to be commit d70cec31965de41d3296c9b585ff0aea4f2bcffe)