metze/samba/wip.git
15 years agoAdd checks for non_root mode to help buildfarm spoolss tests.
Jeremy Allison [Mon, 11 May 2009 16:42:08 +0000 (09:42 -0700)]
Add checks for non_root mode to help buildfarm spoolss tests.
Reviewed by Guenther.
Jeremy.

15 years agos3-lsa: Fix _lsa_LookupNames2() server implementation which always returned a NULL...
Günther Deschner [Mon, 11 May 2009 16:27:40 +0000 (18:27 +0200)]
s3-lsa: Fix _lsa_LookupNames2() server implementation which always returned a NULL sid_array since 3.2.0.

Found by torture test.

This makes it possible to search for users while adding them to groups via
windows usermanager.

Guenther
(cherry picked from commit a82bb4bd516e6a8e50c0272b79df8e506ea0cc91)

15 years agos3/ldap: also handle DirX return codes
Björn Jacke [Thu, 7 May 2009 15:50:34 +0000 (17:50 +0200)]
s3/ldap: also handle DirX return codes

15 years agos3-selftest: enable RPC-LSA-LOOKUPNAMES against Samba 3.
Günther Deschner [Mon, 11 May 2009 14:29:39 +0000 (16:29 +0200)]
s3-selftest: enable RPC-LSA-LOOKUPNAMES against Samba 3.

Guenther
(cherry picked from commit f5cab8913b77c37dc24188b9093b80a0b4d42749)

15 years agos4-smbtorture: add very basic RPC-LSA-LOOKUPNAMES test.
Günther Deschner [Mon, 11 May 2009 14:28:42 +0000 (16:28 +0200)]
s4-smbtorture: add very basic RPC-LSA-LOOKUPNAMES test.

Guenther
(cherry picked from commit 5f015920a80a22f5486e0679f017db3a5ff9d798)

15 years agos4-smbtorture: add optional very simple reply checks to lsa lookup name tests.
Günther Deschner [Mon, 11 May 2009 14:40:26 +0000 (16:40 +0200)]
s4-smbtorture: add optional very simple reply checks to lsa lookup name tests.

Guenther
(cherry picked from commit 7347373e7cb814d683c603ed958583ff70552a2b)

15 years agos4-smbtorture: remove trailing whitespace in RPC-LSA test.
Günther Deschner [Mon, 11 May 2009 12:54:04 +0000 (14:54 +0200)]
s4-smbtorture: remove trailing whitespace in RPC-LSA test.

Guenther
(cherry picked from commit 7672a033eff9db1203c69de422fb906504a54f77)

15 years agos4-smbtorture: use struct torture_context in RPC-LSA.
Günther Deschner [Mon, 11 May 2009 12:51:41 +0000 (14:51 +0200)]
s4-smbtorture: use struct torture_context in RPC-LSA.

Guenther
(cherry picked from commit 410f17cdebab929c68cd6d68b6e1a29ffe64e8d4)

15 years agos3-docs: document "net dom renamecomputer".
Günther Deschner [Mon, 11 May 2009 08:30:05 +0000 (10:30 +0200)]
s3-docs: document "net dom renamecomputer".

Guenther
(cherry picked from commit fe474861f87dc02081acf34d756329c66cc5c805)

15 years agos3-net: add "net dom renamecomputer" to rename machines in a domain.
Günther Deschner [Fri, 8 May 2009 19:56:17 +0000 (21:56 +0200)]
s3-net: add "net dom renamecomputer" to rename machines in a domain.

dmarkey, please test :)

Guenther
(cherry picked from commit b1a4649438e5f27722c8dae629037df2543871c7)

15 years agoDo not call SMB_VFS_GET_REAL_FILENAME if the name is mangled
Volker Lendecke [Sat, 9 May 2009 09:12:52 +0000 (11:12 +0200)]
Do not call SMB_VFS_GET_REAL_FILENAME if the name is mangled

The GPFS get_real_file name does not know about mangled names. Tim, if onefs
does not either, you need this bugfix :-)

In case onefs does 8.3 names, we need to pass the mangled flag down to
SMB_VFS_GET_REAL_FILENAME to give GPFS a chance say ENOTSUPP and do the
fallback.

15 years agos3: Fix chained sesssetupAndX/tconn messages
Tim Prouty [Wed, 25 Mar 2009 00:24:55 +0000 (00:24 +0000)]
s3: Fix chained sesssetupAndX/tconn messages

A sesssetupAndX chained with a tconn will not correctly set the TID in
the response header.  I'm seeing an XP client send this chained
sesssetup/tconn when samba has security = share.  Samba's current
behavior is to return a TID of 0 in the smb header rather than the
actual TID.  This patch also updates the UID in the header as well.

15 years agos4-smbtorture: avoid secdesc test on connect handle in RPC-SAMR-USERS for Samba3.
Günther Deschner [Fri, 8 May 2009 22:46:17 +0000 (00:46 +0200)]
s4-smbtorture: avoid secdesc test on connect handle in RPC-SAMR-USERS for Samba3.

With this, I think, we pass RPC-SAMR-USERS.

Guenther
(cherry picked from commit a3873bca516e0f89302409c89910561707360d14)

15 years agos3-samr: Fix SetUserInfo level 16 and 21 w.r.t. ACB_AUTOLOCK acct_flag.
Günther Deschner [Fri, 8 May 2009 22:03:50 +0000 (00:03 +0200)]
s3-samr: Fix SetUserInfo level 16 and 21 w.r.t. ACB_AUTOLOCK acct_flag.

It is not allowed to *set* this flag remotely if it has been not set already.

Found by torture test.

Guenther
(cherry picked from commit a21bfc4daff9e67750021d96ffa0c1e6e4cd3472)

15 years agos3-samr: Fix SetUserInfo level 7 when there has been no name change.
Günther Deschner [Fri, 8 May 2009 22:02:00 +0000 (00:02 +0200)]
s3-samr: Fix SetUserInfo level 7 when there has been no name change.

Found by torture test.

Guenther
(cherry picked from commit 705f36b804093f656498f7963768a418672cd422)

15 years agos3-selftest: enable running RPC-SAMR-USERS against Samba3.
Günther Deschner [Fri, 8 May 2009 20:23:51 +0000 (22:23 +0200)]
s3-selftest: enable running RPC-SAMR-USERS against Samba3.

Guenther
(cherry picked from commit d0100947002a892dff22aefd2491e3a66aaf3a07)

15 years agos4-smbtorture: skip unsupported ACB bits for Samba3 in RPC-SAMR-USER.
Günther Deschner [Fri, 8 May 2009 20:20:38 +0000 (22:20 +0200)]
s4-smbtorture: skip unsupported ACB bits for Samba3 in RPC-SAMR-USER.

Guenther
(cherry picked from commit 4f3bfb6261dfb9836404399db57373ef91a411bf)

15 years agos3-samr: more accurateness in _samr_SetDomainInfo().
Günther Deschner [Fri, 8 May 2009 09:24:35 +0000 (11:24 +0200)]
s3-samr: more accurateness in _samr_SetDomainInfo().

Guenther
(cherry picked from commit b7925cb3f219b0502bb7d5ffff2dbda7bb4c2bda)

15 years agos4-smbtorture: Support timestamp handling for Samba3 in RPC-SAMR-USERS.
Günther Deschner [Fri, 8 May 2009 20:01:55 +0000 (22:01 +0200)]
s4-smbtorture: Support timestamp handling for Samba3 in RPC-SAMR-USERS.

Timestamps in passdb (currently) only have second granularity.

Guenther
(cherry picked from commit 67df4489e20f17c334544818227e905136b6f5aa)

15 years agoFix bug #6330 - DFS doesn't work on AIX. Jeremy.
Jeremy Allison [Fri, 8 May 2009 18:31:34 +0000 (11:31 -0700)]
Fix bug #6330 - DFS doesn't work on AIX. Jeremy.

15 years agoExpand the comment explaining why user_in_group_sid is
Jeremy Allison [Fri, 8 May 2009 17:11:38 +0000 (10:11 -0700)]
Expand the comment explaining why user_in_group_sid is
not reliable for winbindd users from foreign domains.
Jeremy.

15 years agos3:smbd: fix posix acls when setting an ACL without explicit ACE for the owner (bug...
Stefan Metzmacher [Fri, 8 May 2009 12:33:49 +0000 (14:33 +0200)]
s3:smbd: fix posix acls when setting an ACL without explicit ACE for the owner (bug#2346)

The problem of bug #2346 remains for users exported by
winbindd, because create_token_from_username() just fakes
the token when the user is not in the local sam domain. This causes
user_in_group_sid() to give totally wrong results.
In uid_entry_in_group() we need to check if we already
have the full unix token in the current_user struct.
If so we should use the current_user unix token,
instead of doing a very complex user_in_group_sid()
which doesn't give reliable results anyway.

metze
(cherry picked from commit b79eff843be392f3065e912edca1434081d93c44)

15 years agos3-samr: Fix the build of _samr_QueryDomainInfo, sorry :)
Günther Deschner [Fri, 8 May 2009 10:14:02 +0000 (12:14 +0200)]
s3-samr: Fix the build of _samr_QueryDomainInfo, sorry :)

Guenther

15 years agos3-selftest: run RPC-LSA-GETUSER against Samba 3.
Günther Deschner [Fri, 8 May 2009 09:26:57 +0000 (11:26 +0200)]
s3-selftest: run RPC-LSA-GETUSER against Samba 3.

Guenther
(cherry picked from commit 66cf7e1835d5d711c91d0541b05eb11b61267ba8)

15 years agos4-smbtorture: Fix printf info-level mismatch in RPC-SAMR.
Günther Deschner [Fri, 8 May 2009 07:56:40 +0000 (09:56 +0200)]
s4-smbtorture: Fix printf info-level mismatch in RPC-SAMR.

Guenther
(cherry picked from commit c2498d133db4dcb76e636661110b6432d017d13c)

15 years agos3-samr: implement more info levels in _samr_QueryDomainInfo().
Günther Deschner [Fri, 8 May 2009 07:55:10 +0000 (09:55 +0200)]
s3-samr: implement more info levels in _samr_QueryDomainInfo().

Gets us closer to pass RPC-SAMR.

Guenther
(cherry picked from commit 266b79e004470ae1859085ca018fd6aff6836059)

15 years agos3-samr: Fix potential memory leak in _samr_ChangePasswordUser().
Günther Deschner [Thu, 7 May 2009 23:23:54 +0000 (01:23 +0200)]
s3-samr: Fix potential memory leak in _samr_ChangePasswordUser().

Guenther
(cherry picked from commit d7b32b51f840d34e0ecb62dd8b7df862974d6271)

15 years agos3-selftest: finally enable RPC-SAMR-PASSWORDS which samba3 now passes.
Günther Deschner [Thu, 7 May 2009 22:31:11 +0000 (00:31 +0200)]
s3-selftest: finally enable RPC-SAMR-PASSWORDS which samba3 now passes.

Guenther
(cherry picked from commit 53713be2cbc1156769b8b82d3df9da02459232ce)

15 years agos4-smbtorture: avoid acct_flags check at the end of RPC-SAMR-PASSWORDS for Samba3.
Günther Deschner [Thu, 7 May 2009 22:30:11 +0000 (00:30 +0200)]
s4-smbtorture: avoid acct_flags check at the end of RPC-SAMR-PASSWORDS for Samba3.

I don't get this, why would the account suddenly get ACB_PWNOTREQ ?

Guenther
(cherry picked from commit 310031274d8b0fdf15a5e33fccfd7b6cb81c8a50)

15 years agos3-selftest: need to enable lanman auth in order make RPC-SAMR-PASSWORDS pass.
Günther Deschner [Thu, 7 May 2009 22:18:28 +0000 (00:18 +0200)]
s3-selftest: need to enable lanman auth in order make RPC-SAMR-PASSWORDS pass.

Guenther
(cherry picked from commit 6f4b5798c96ed69d965d6c3c005518f87afda8d6)

15 years agos3-samr: Do not leak information whether a user exist or not in pwd change calls.
Günther Deschner [Thu, 7 May 2009 21:56:22 +0000 (23:56 +0200)]
s3-samr: Do not leak information whether a user exist or not in pwd change calls.

Found by torture test.

Guenther
(cherry picked from commit 227b61d7ea9895240e0e7f554fbb10d3e78feaae)

15 years agos3-samr: implement _samr_ChangePasswordUser().
Günther Deschner [Thu, 7 May 2009 22:16:43 +0000 (00:16 +0200)]
s3-samr: implement _samr_ChangePasswordUser().

This is vastly copied from samba4 samr server.

Guenther
(cherry picked from commit 5773d7d10253f6f53a9ae96e9979a87393b242a6)

15 years agos3-samr: implement _samr_OemChangePasswordUser2().
Günther Deschner [Thu, 7 May 2009 21:26:54 +0000 (23:26 +0200)]
s3-samr: implement _samr_OemChangePasswordUser2().

Guenther
(cherry picked from commit d17c6af57c6e5ec10d71a9fcbffc6ce4d34a553f)

15 years agos3-samr: disable check for ACB_DISABLED in check_oem_password().
Günther Deschner [Thu, 7 May 2009 21:54:58 +0000 (23:54 +0200)]
s3-samr: disable check for ACB_DISABLED in check_oem_password().

It is a bad idea to just tell everyone that an account is disabled without
really having checked the password first.

Found by torture test.

Guenther
(cherry picked from commit c400fc1e1e9a0c3db82c9a96e9684c8debfb3b74)

15 years agos3-samr: rework check_oem_password() to take a struct samu, not to return one.
Günther Deschner [Thu, 7 May 2009 21:22:26 +0000 (23:22 +0200)]
s3-samr: rework check_oem_password() to take a struct samu, not to return one.

Guenther

15 years agos4-smbtorture: prepare for running RPC-SAMR-USERS against samba3.
Günther Deschner [Thu, 7 May 2009 19:47:47 +0000 (21:47 +0200)]
s4-smbtorture: prepare for running RPC-SAMR-USERS against samba3.

In Samba 3 there are no pdb calls to store comments, codepages and countrycodes
(yet).

Guenther
(cherry picked from commit 41cb06fba7126c79fe536321f2dc461e87e83076)

15 years agos3-samr: Let _samr_TestPrivateFunctionsUser() return not supported.
Günther Deschner [Thu, 7 May 2009 16:42:28 +0000 (18:42 +0200)]
s3-samr: Let _samr_TestPrivateFunctionsUser() return not supported.

This is to get us closer to pass RPC-SAMR-USERS.

Guenther
(cherry picked from commit 6aca5fca8dd73ff33cfac5000480520def04e7fa)

15 years agos3-samr: let set_user_info_16 and 20 follow the same pattern as all other levels.
Günther Deschner [Thu, 7 May 2009 19:45:51 +0000 (21:45 +0200)]
s3-samr: let set_user_info_16 and 20 follow the same pattern as all other levels.

Guenther
(cherry picked from commit f05d888d7ab910b3ed39e4d36eeb52cb86bd990e)

15 years agos3-samr: support some more info levels in samr_SetUserInfo calls.
Günther Deschner [Thu, 7 May 2009 15:06:26 +0000 (17:06 +0200)]
s3-samr: support some more info levels in samr_SetUserInfo calls.

Guenther
(cherry picked from commit f93f713898f2208fda51f24121b060ee09f5fe3a)

15 years agos3-samr: support some more info levels in samr_QueryUser calls.
Günther Deschner [Thu, 7 May 2009 15:05:49 +0000 (17:05 +0200)]
s3-samr: support some more info levels in samr_QueryUser calls.

Guenther
(cherry picked from commit b0df0e8cc76e67a977129aca8b254fe38de85ebd)

15 years agos3-samr: Fix _samr_Connect5(). In error case it still needs to return empty info1.
Günther Deschner [Thu, 7 May 2009 12:19:43 +0000 (14:19 +0200)]
s3-samr: Fix _samr_Connect5(). In error case it still needs to return empty info1.

Guenther
(cherry picked from commit 599b9fe86eba932171bb4ec13347ed28ea5edebd)

15 years agoAfter getting confirmation from Guenther, add 3 changes we'll
Jeremy Allison [Wed, 6 May 2009 23:10:20 +0000 (16:10 -0700)]
After getting confirmation from Guenther, add 3 changes we'll
ultimately need to fix bug #6099 Samba returns incurrate capabilities list.
1). Add a comment to point out that r->in.negotiate_flags is an aliased pointer to
r->out.negotiate_flags.
2). Ensure we return NETLOGON_NEG_STRONG_KEYS in our flags
return if the client requested it.
3). Clean up the error exits so we always return the same
way.
Signed off by Guenther.
Jeremy.
(cherry picked from commit 78fb479325ce7073ab8383ada3903080d12aef91)

15 years agos3-netlogon: Fix NETLOGON credential chain. Fixes Bug #6099 (Windows 7 joining Samba3...
Günther Deschner [Wed, 6 May 2009 17:29:01 +0000 (19:29 +0200)]
s3-netlogon: Fix NETLOGON credential chain. Fixes Bug #6099 (Windows 7 joining Samba3) and probably many, many more.

Jeremy, with 9a5d5cc1db0ee60486f932e34cd7961b90c70a56 you alter the in negotiate
flags (which are a pointer to the out negotiate flags assigned in the generated
netlogon server code). So, while you wanted to just set the *out* negflags, you
did in fact reset the *in* negflags, effectively eliminating the
NETLOGON_NEG_STRONG_KEYS bit (formerly known as NETLOGON_NEG_128BIT) which then
caused creds_server_init() to generate 64bit creds instead of 128bit, causing
the whole chain to break. *Please* check.

Guenther
(cherry picked from commit 78754ab2c9b28ea8ab09d3fd1f5450abe721a2c1)

15 years agos3-rpcclient: rework enumdrivers call a bit to allow queries like win7 does.
Günther Deschner [Thu, 7 May 2009 11:35:00 +0000 (13:35 +0200)]
s3-rpcclient: rework enumdrivers call a bit to allow queries like win7 does.

Guenther
(cherry picked from commit b8ddb8765c6421b595737dac8deaeb88546a847a)

15 years agos3-credentials: protect netlogon_creds_server_step() against NULL creds.
Günther Deschner [Thu, 7 May 2009 11:32:41 +0000 (13:32 +0200)]
s3-credentials: protect netlogon_creds_server_step() against NULL creds.

Found by SCHANNEL torture tests.

Guenther
(cherry picked from commit 8e490d2fa1c52be5da331df0b314508f77ec1f6e)

15 years agos3-selftest: run RPC-SCHANNEL, RPC-SCHANNEL2 and RPC-BENCH-SCHANNEL1 against Samba3.
Günther Deschner [Thu, 7 May 2009 11:06:03 +0000 (13:06 +0200)]
s3-selftest: run RPC-SCHANNEL, RPC-SCHANNEL2 and RPC-BENCH-SCHANNEL1 against Samba3.

Guenther
(cherry picked from commit 949cd77ca2529249dc8cd04740c2ca342fb0c283)

15 years agos4-smbtorture: Avoid failing RPC-SCHANNEL when testing lsa_GetUserName behaviour...
Günther Deschner [Thu, 7 May 2009 11:05:13 +0000 (13:05 +0200)]
s4-smbtorture: Avoid failing RPC-SCHANNEL when testing lsa_GetUserName behaviour against Samba 3.

Guenther
(cherry picked from commit 2cdfd67cae1ce4a08c6d42314916959ce6ef99fb)

15 years agos3-auth: use full 16byte session key in make_user_info_netlogon_interactive().
Günther Deschner [Thu, 7 May 2009 11:36:52 +0000 (13:36 +0200)]
s3-auth: use full 16byte session key in make_user_info_netlogon_interactive().

Guenther

15 years agoFix bug 6336: "net groupmap set" segfaults
Volker Lendecke [Thu, 7 May 2009 08:09:32 +0000 (10:09 +0200)]
Fix bug 6336: "net groupmap set" segfaults

15 years agos3/docs: Remove unnecessary .sp.
Karolin Seeger [Wed, 6 May 2009 14:06:59 +0000 (16:06 +0200)]
s3/docs: Remove unnecessary .sp.

Karolin
(cherry picked from commit 4a4dc776b2f0ca813abcf4f47f0d5721f75f3e6a)

15 years agos3-docs: Fix Bug #6331. Document "net dom join/net dom unjoin".
Günther Deschner [Wed, 6 May 2009 13:43:23 +0000 (15:43 +0200)]
s3-docs: Fix Bug #6331. Document "net dom join/net dom unjoin".

Guenther
(cherry picked from commit e398f1e91575909d2a90fab1e6f00804815a0b2f)

15 years agos3-docs: Fix "net eventlog dump" syntax in manpage.
Günther Deschner [Wed, 6 May 2009 13:43:00 +0000 (15:43 +0200)]
s3-docs: Fix "net eventlog dump" syntax in manpage.

Guenther
(cherry picked from commit bf197a9c0ab8a58a775277896d40617d36279288)

15 years agos3-rpcclient: print more infolevels in printer and driver info levels.
Günther Deschner [Mon, 4 May 2009 15:25:41 +0000 (17:25 +0200)]
s3-rpcclient: print more infolevels in printer and driver info levels.

Guenther
(cherry picked from commit d77c45675744895b01d905f7f27ae55e64264c26)

15 years agos3-printing: fix debug statement in virtual registry layer
Günther Deschner [Wed, 6 May 2009 08:20:52 +0000 (10:20 +0200)]
s3-printing: fix debug statement in virtual registry layer
(key_driver_fetch_keys).

Guenther
(cherry picked from commit 7ac1ae8d1c3bcf4d001e29fdc1ee314dcbe3df76)

15 years agos3-printing: simplify print_queue helper functions and return WERROR.
Günther Deschner [Tue, 5 May 2009 23:10:33 +0000 (01:10 +0200)]
s3-printing: simplify print_queue helper functions and return WERROR.

Guenther
(cherry picked from commit 9966541f89b45834cdf63060202621f885bf9f5c)

15 years agos3:loadparm: handle registry config source in file_list - fixes bug #6320
Michael Adam [Wed, 6 May 2009 00:08:33 +0000 (02:08 +0200)]
s3:loadparm: handle registry config source in file_list - fixes bug #6320

Michael
(cherry picked from commit 4842e45d59dbd6c9ac138e796d30fcf747807d1c)

15 years agoFix Coverity ID 897: REVERSE_INULL
Volker Lendecke [Wed, 6 May 2009 10:00:49 +0000 (12:00 +0200)]
Fix Coverity ID 897: REVERSE_INULL

15 years agos3 onefs: Turn up the debug level for non-error cases
tprouty [Tue, 5 May 2009 01:17:04 +0000 (01:17 +0000)]
s3 onefs: Turn up the debug level for non-error cases

15 years agos3: Fix trans2 path to use case-insensitive stat optimization
tprouty [Sat, 2 May 2009 00:28:38 +0000 (00:28 +0000)]
s3: Fix trans2 path to use case-insensitive stat optimization

Often times before creating a file, a client will first query to see
if it already exists.  Since some systems have a case-insensitive stat
that is called from unix_convert, we can definitively return
STATUS_NO_SUCH_FILE to the client without scanning the whole
directory.

This code path is taken from trans2querypathinfo, but trans2findfirst
still does a full directory scan even though the get_real_filename
(the case-insensitive stat vfs call) can prevent this.

This patch adds the get_real_filename call to the trans2find* path,
and also changes the vfs_default behavior for
SMB_VFS_GET_REAL_FILENAME.  Previously, in the absence of a
get_real_filename implementation, we would fallback to the full
directory scan.  The default behavior now returns -1 and sets errno to
EOPNOTSUPP.  This allows SMB_VFS_GET_REALFILENAME to be called from
trans2* and unix_convert.

15 years agos3:onefs.so Change system function names
Steven Danneman [Tue, 5 May 2009 21:42:19 +0000 (14:42 -0700)]
s3:onefs.so Change system function names

Addendum to c49730e1.  Use newer cookie conversion names.

15 years agoFix bug 6302: Give the VFS a chance to read from 0-byte files
Volker Lendecke [Sat, 2 May 2009 09:31:37 +0000 (11:31 +0200)]
Fix bug 6302: Give the VFS a chance to read from 0-byte files

15 years agos3:loadparm: use the returnvalue of service_ok() in process_smbconf_service().
Michael Adam [Tue, 5 May 2009 15:46:20 +0000 (17:46 +0200)]
s3:loadparm: use the returnvalue of service_ok() in process_smbconf_service().

Michael
(cherry picked from commit 0ca795ef4fab1f880c2b76d7fe8f0aabb302b6e2)

15 years agos3-ldap: fix more callers of smbldap_dn_talloc() that were passing a NULL context.
Günther Deschner [Tue, 5 May 2009 19:12:33 +0000 (21:12 +0200)]
s3-ldap: fix more callers of smbldap_dn_talloc() that were passing a NULL context.

Guenther
(cherry picked from commit fee4c99be494b9679c414d6ba1938aa88adeacd3)

15 years agos3-ldapsam: Fix Bug #6313: ldapsam_update_sam_account() crashes while doing talloc_fr...
Günther Deschner [Tue, 5 May 2009 16:50:48 +0000 (18:50 +0200)]
s3-ldapsam: Fix Bug #6313: ldapsam_update_sam_account() crashes while doing talloc_free on malloced memory.

Guenther
(cherry picked from commit 5b37df21f6af52d20ad3a25361b1d7faa51308d1)

15 years agoerror-codes: add some more group specific windows error codes.
Günther Deschner [Tue, 5 May 2009 17:38:58 +0000 (19:38 +0200)]
error-codes: add some more group specific windows error codes.

Guenther
(cherry picked from commit e7a8577df1e92982ff717a62280f86e3b0384d54)

15 years agos3-printing: Fix driver upload for Xerox 4110 PS printer driver.
Günther Deschner [Fri, 1 May 2009 00:17:23 +0000 (02:17 +0200)]
s3-printing: Fix driver upload for Xerox 4110 PS printer driver.

We need to allow to set filesystem capabilities from the default vfs in
create_conn_struct() in order to find mixed-case filenames. Thanks Volker!

This one was hard to find, so a little longer explanation:

When a Windows client tries to upload e.g. the Xerox 4110 PS driver, the client
first uploads the driver files to the [print$] share. Some of them (in this case
the Windows Postscript drivers) are with uppercase filenames while some of them
(like the PPD file) are in lowercase. After the driver upload the client issues
the spoolss_AddPrinterDriverEx() call with level 6. There the client tries to
add the PPD file with an uppercase filename (while having stored it in lowercase
on the server). The internal spoolss add driver functions then could not find the
appropriate filename while trying to move them to the version subdirectory (in
this case W32X86/3) and fails then entire spoolss_AddPrinterDriverEx() call.
With this fix, the convert_unix_name() name finds the correct file and
the spoolss_AddPrinterDriverEx() succeeds.

Guenther
(cherry picked from commit fe839b65a7b4e8d5e085287b7d33ee1f970fe7c2)

15 years agos3-pam_winbind: Fix Bug 6253: Use correct value for password expiry calculation.
Günther Deschner [Tue, 5 May 2009 10:54:21 +0000 (12:54 +0200)]
s3-pam_winbind: Fix Bug 6253: Use correct value for password expiry calculation.

Patch from Blindauer Emmanuel <samba@mooby.net>.

Guenther
(cherry picked from commit 290449aeae950d7490cdcf9d601052fc45bb84dd)

15 years agos3:onefs.so fix issue with missing entries when enumerating directories
Steven Danneman [Mon, 4 May 2009 22:02:17 +0000 (15:02 -0700)]
s3:onefs.so fix issue with missing entries when enumerating directories

This bug prompted several, fairly large changes to the of OneFS's
readdirplus() within Samba.

One fundamental problem is that we kept our cache cursor pointed at the
next entry to be returned from onefs_readdir(), while the resume cookie
needed to refill the cache such that our cursor would be on this entry,
was located in the previous cache entry.  This meant that to correctly handle
seekdir() cases which could be found within the existing cache, and cases
where a cache reload was needed, required that the cache always hold
at least two entries: the entry we wished to return, and the previous entry
which held the resume cookie.  Since the readdirplus() syscall gives us no
guarantee that it will always return these two direntries, there was a
fundamental problem with this design.

To fix this problem, I have rearchitected the onefs_readdir() path to keep
its pointer on the entry which contains the resume_cookie, not the entry
which will be returned next.  Essentially, I changed onefs_readdir() from a
"return an entry then increment the cursor" model to "increment the cursor
then return an entry".  By doing this, we only require that a single entry
be within the cache: the entry containing the resume cookie.

Second, there have been numerous off-by-one bugs in my implementation of
onefs_seekdir() which did a mapping between the 64-bit resume cookie
returned by readdirplus() and its own monotonically increasing "location"
offset.  Furthermore, this design caused a somewhat frequent waste of
cycles, as in some cases we'd need to re-enumerate the entire directory to
recover the current "location" from an old resume cookie.  As this code was
somewhat difficult to understand, prone to bugs, and innefficient in some
cases I decided it was better to wholesale replace it now, rather than later.

It is possible to algorithmically map the 64-bit resume cookies from
readdirplus() into 32-bit offset values which SMB requires.  The onefs.so
module now calls into a system library to do this conversion.  This greatly
simplifies both the seekdir() and telldir() paths and is more efficient.

15 years agoFix bug #6315 smbd crashes doing vfs_full_audit on IPC$ close event.
Jeremy Allison [Mon, 4 May 2009 15:31:40 +0000 (08:31 -0700)]
Fix bug #6315 smbd crashes doing vfs_full_audit on IPC$ close event.
The underlying problem
is that once SMBulogoff is called, all server_info contexts associated with the
vuid should become invalid, even if that's the context being currently used by
the connection struct (tid). When the SMBtdis comes in it doesn't need a valid
vuid value, but the code called inside vfs_full_audit always assumes that there
is one (and hence a valid conn->server_info pointer) available.

This is actually a bug inside the vfs_full_audit and other code inside Samba,
which should only indirect conn->server_info on calls which require AS_USER to
be set in our process table. I could fix all these issues, but there's no
guarentee that someone might not add more code that fails this assumption, as
it's a hard assumption to break (it's usually true).

So what I've done is to ensure that on SMBulogoff the previously used
conn->server_info struct is kept around to be used for print debugging purposes
(it won't be used to change to an invalid user context, as such calls need
AS_USER set). This isn't strictly correct, as there's no association with the
(now invalid) context being freed and the call that causes conn->server_info to
be indirected, but it's good enough for most cases.

The hard part was to ensure that once a valid context is used again (via new
sessionsetupX calls, or new calls on a still valid vuid on this tid) that we
don't leak memory by simply replacing the stored conn->server_info pointer. We
would never actually leak the memory (as all conn->server_info pointers are
talloc children of conn), but with the previous patch a malicious client could
cause many server_info structs to be talloced by the right combination of SMB
calls. This new patch introduces free_conn_server_info_if_unused(), which
protects against the above.
Jeremy.

15 years agos3/docs: Fix typo.
Karolin Seeger [Mon, 4 May 2009 13:17:30 +0000 (15:17 +0200)]
s3/docs: Fix typo.

Karolin

15 years agoDo not crash in ctdbd_traverse if ctdbd is not around
Volker Lendecke [Mon, 4 May 2009 12:39:56 +0000 (14:39 +0200)]
Do not crash in ctdbd_traverse if ctdbd is not around

15 years agoIncrease debug level of "create_connection_server_info failed" message
Volker Lendecke [Mon, 4 May 2009 10:36:13 +0000 (12:36 +0200)]
Increase debug level of "create_connection_server_info failed" message

I don't think we should unconditionally send every refused connection attempt
to a share to syslog, that's where all debug level 0 messages end up.

15 years agoFix bug 6136: New AFS syscall conventions
Geza Gemes [Sun, 3 May 2009 20:13:36 +0000 (22:13 +0200)]
Fix bug 6136: New AFS syscall conventions

Haven't checked this myself, but as I've already got several reports that Samba
won't compile against current OpenAFS anymore, I just believe Geza Gemes. This
patch only affects AFS code, so it should not hurt anything else.

Volker

15 years agos3/docs: Fix typos.
Karolin Seeger [Sun, 3 May 2009 07:55:46 +0000 (09:55 +0200)]
s3/docs: Fix typos.

That fixes bug #4247. Thanks to David McNeill <davemc [at] mcpond.co.nz>
for reporting!

Karolin
(cherry picked from commit eaf949947c2eb03363c4b6f588f87b70110d6ff7)

15 years agos3/docs: Fix typo.
Karolin Seeger [Sun, 3 May 2009 07:35:55 +0000 (09:35 +0200)]
s3/docs: Fix typo.

This fixes bug #4245. Thanks to David McNeill <davemc [at] mcpond.co.nz>
for reporting!

Karolin
(cherry picked from commit 579c91581f5b6d5341a12923fe6cde377223caff)

15 years agoFix bug #6291 - force user stop working.
Jeremy Allison [Tue, 28 Apr 2009 18:07:51 +0000 (11:07 -0700)]
Fix bug #6291 - force user stop working.
A previous fix broke the invariant that *uid is always
initialized on return from create_token_from_username().
Restore it.
Jeremy.

15 years agos3:config.sub: clean some space/tab mixup that git complains about
Michael Adam [Thu, 30 Apr 2009 23:15:38 +0000 (01:15 +0200)]
s3:config.sub: clean some space/tab mixup that git complains about

Michael
(cherry picked from commit 384c1aaa8ee8879b6cc4bc34dfc4d3c9fa11667b)

15 years agos3:config.sub: replace old FSF address by the web site url.
Michael Adam [Thu, 30 Apr 2009 23:10:10 +0000 (01:10 +0200)]
s3:config.sub: replace old FSF address by the web site url.

Michael
(cherry picked from commit f3308b91d75356a83e99aade7e88d2cd1edc2042)

15 years agos3:config.sub: move to GPLv3
Michael Adam [Thu, 30 Apr 2009 23:09:13 +0000 (01:09 +0200)]
s3:config.sub: move to GPLv3

Michael
(cherry picked from commit 62a69994f252f7cc98ef12bc39a25a2ee25afb0a)

15 years agos3:update config.sub from gnu.org (2009-04-17)
Michael Adam [Thu, 30 Apr 2009 22:53:49 +0000 (00:53 +0200)]
s3:update config.sub from gnu.org (2009-04-17)

as requested in bug #6292.

This is taken from
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

Michael
(cherry picked from commit f81c02c3f31a4700d32aff884254fcd752797be7)

15 years agos3:config.guess: clean some whitespace/tab mixtures that git complains about
Michael Adam [Thu, 30 Apr 2009 23:13:30 +0000 (01:13 +0200)]
s3:config.guess: clean some whitespace/tab mixtures that git complains about

Michael
(cherry picked from commit faaa306c6ae7b00fa5e53321203f072776eefa0a)

15 years agos3:config.guess: replace old FSF address by the web site url.
Michael Adam [Thu, 30 Apr 2009 23:06:34 +0000 (01:06 +0200)]
s3:config.guess: replace old FSF address by the web site url.

Michael
(cherry picked from commit d230ac7b322827930de2e1b922cd4b6a597c933f)

15 years agos3:config.guess: move to GPLv3
Michael Adam [Thu, 30 Apr 2009 23:04:55 +0000 (01:04 +0200)]
s3:config.guess: move to GPLv3
(cherry picked from commit fee78294589a02090887233ad112c69d3a5bd383)

15 years agos3:update config.guess form gnu.org (version 2009-04-27)
Michael Adam [Thu, 30 Apr 2009 22:52:43 +0000 (00:52 +0200)]
s3:update config.guess form gnu.org (version 2009-04-27)

as requested in bug #6292.

This is taken from
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD

Michael
(cherry picked from commit 1188c78f53fb7d56f4bf61c41fe635b639a311fd)

15 years agos3-netapi: Fix Bug #6309: support remote unjoining of Windows 2003 or greater.
Günther Deschner [Thu, 30 Apr 2009 21:37:26 +0000 (23:37 +0200)]
s3-netapi: Fix Bug #6309: support remote unjoining of Windows 2003 or greater.

Found by David Markey <admin@dmarkey.com>. Thanks!

Guenther
(cherry picked from commit ab4b8c9c0438bc5afca17e3ebf05dde6f98bc0aa)

15 years agowkssvcs: add WKSSVC_JOIN_FLAGS_IGNORE_UNSUPPORTED_FLAGS join flag.
Günther Deschner [Thu, 30 Apr 2009 21:36:24 +0000 (23:36 +0200)]
wkssvcs: add WKSSVC_JOIN_FLAGS_IGNORE_UNSUPPORTED_FLAGS join flag.

Guenther
(cherry picked from commit 26b9c9370ce047ecc732082b2b554ffc295ae406)

15 years agos3-printing: rework move_driver_file_to_download_area() a bit for clarity.
Günther Deschner [Thu, 30 Apr 2009 14:49:50 +0000 (16:49 +0200)]
s3-printing: rework move_driver_file_to_download_area() a bit for clarity.

Guenther
(cherry picked from commit baf78506895b8bd50433058ba0f18e1aaf8aeee5)

15 years agos3-lsa: use LSA_POLICY_MODE flags in _lsa_GetSystemAccessAccount().
Günther Deschner [Thu, 30 Apr 2009 10:30:10 +0000 (12:30 +0200)]
s3-lsa: use LSA_POLICY_MODE flags in _lsa_GetSystemAccessAccount().

Guenther
(cherry picked from commit af5a71d5280984a7d707e39fb522ecc7e1b71436)

15 years agos3-nss_wins: Fix unresolved ldb symbols in libnss_wins.so.
Günther Deschner [Thu, 30 Apr 2009 12:16:01 +0000 (14:16 +0200)]
s3-nss_wins: Fix unresolved ldb symbols in libnss_wins.so.

The objects for this module should probably be cleaned up once.

Guenther
(cherry picked from commit eee446a94841a5df97b3a47c7076ef52fb5ccdcf)

15 years agos3-spoolss: avoid referring to uid 0 in spoolss server (use sec_initial_uid() instead).
Günther Deschner [Thu, 30 Apr 2009 09:19:42 +0000 (11:19 +0200)]
s3-spoolss: avoid referring to uid 0 in spoolss server (use sec_initial_uid() instead).

Guenther
(cherry picked from commit d22965e2e596c8ad78f5330398d43d96bf564773)

15 years agos3-printing: use move_driver_file_to_download_area() to avoid code duplication.
Günther Deschner [Wed, 29 Apr 2009 23:25:23 +0000 (01:25 +0200)]
s3-printing: use move_driver_file_to_download_area() to avoid code duplication.

Guenther
(cherry picked from commit 233bfb25c9443688f74c506348b0a7b34489e1d1)

15 years agos3-printing: add move_driver_file_to_download_area().
Günther Deschner [Wed, 29 Apr 2009 23:07:31 +0000 (01:07 +0200)]
s3-printing: add move_driver_file_to_download_area().

Guenther
(cherry picked from commit a2a155bee59c7e849a492933d1ea5769e409bac5)

15 years agoRe-import the v3-3 version of str_list_make().
Volker Lendecke [Thu, 30 Apr 2009 11:37:19 +0000 (13:37 +0200)]
Re-import the v3-3 version of str_list_make().

The merged version behaves differently: "Domain Users" is parsed into two
values, as it does not look at quotes. Samba3 users depend on the ability do
say for example

valid users = "domain users"

which would not work anymore with the merged version.

Thanks to Björn Jacke for testing this!

Volker

15 years agoWHATSNEW: Add new net service subcommands to the WHATSNEW.
Karolin Seeger [Thu, 30 Apr 2009 07:33:43 +0000 (09:33 +0200)]
WHATSNEW: Add new net service subcommands to the WHATSNEW.

Karolin

15 years agoWHATSNEW: Add some WHATSNEW improvements.
Karolin Seeger [Thu, 30 Apr 2009 07:27:43 +0000 (09:27 +0200)]
WHATSNEW: Add some WHATSNEW improvements.

Karolin

15 years agoWHATSNEW: Correct WHATSNEW.
Karolin Seeger [Wed, 29 Apr 2009 12:44:59 +0000 (14:44 +0200)]
WHATSNEW: Correct WHATSNEW.

Karolin

15 years agos3-test: make it possible to find the built vlp in "make test".
Günther Deschner [Wed, 29 Apr 2009 12:29:25 +0000 (14:29 +0200)]
s3-test: make it possible to find the built vlp in "make test".

Guenther
(cherry picked from commit 3316ae9d75dfe6c7a960938c9503367880510079)

15 years agoSpecify explicit path to vlp, for those not having vlp in $PATH.
Jelmer Vernooij [Wed, 22 Apr 2009 21:54:10 +0000 (23:54 +0200)]
Specify explicit path to vlp, for those not having vlp in $PATH.
(cherry picked from commit 79177c1d36e125b08aa4d6e0e42e9a97f625b3c8)

15 years agos3/docs: Fix serveral typos.
Karolin Seeger [Wed, 29 Apr 2009 12:12:01 +0000 (14:12 +0200)]
s3/docs: Fix serveral typos.

This fixes bug #4315.
Thanks to Felipe Augusto van de Wiel <faw [at] cathedrallabs [dot] org>!

Karolin
(cherry picked from commit 3422b9c546cdd262bd747e1e737c2b6479b4d21e)

15 years agoWHATSNEW: Update WHATSNEW.
Karolin Seeger [Wed, 29 Apr 2009 10:45:39 +0000 (12:45 +0200)]
WHATSNEW: Update WHATSNEW.

Karolin