1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

53421 Commits

Author SHA1 Message Date
Günther Deschner
a82bb4bd51 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
2009-05-11 18:31:46 +02:00
Günther Deschner
f5cab8913b s3-selftest: enable RPC-LSA-LOOKUPNAMES against Samba 3.
Guenther
2009-05-11 16:44:39 +02:00
Günther Deschner
5f015920a8 s4-smbtorture: add very basic RPC-LSA-LOOKUPNAMES test.
Guenther
2009-05-11 16:44:39 +02:00
Günther Deschner
7347373e7c s4-smbtorture: add optional very simple reply checks to lsa lookup name tests.
Guenther
2009-05-11 16:44:39 +02:00
Stefan Metzmacher
d51bb8e4e6 s4:smb_server: return after we have processed an invalid smb2 request
metze
2009-05-11 15:59:46 +02:00
Volker Lendecke
993bdd87b5 Move SMB2 constants to a separate file 2009-05-11 15:54:24 +02:00
Volker Lendecke
ce8f3528f1 Fix SMB2_CAP_DFS 2009-05-11 15:54:24 +02:00
Günther Deschner
7672a033ef s4-smbtorture: remove trailing whitespace in RPC-LSA test.
Guenther
2009-05-11 15:06:20 +02:00
Günther Deschner
410f17cdeb s4-smbtorture: use struct torture_context in RPC-LSA.
Guenther
2009-05-11 15:06:16 +02:00
Günther Deschner
fe474861f8 s3-docs: document "net dom renamecomputer".
Guenther
2009-05-11 10:56:22 +02:00
Günther Deschner
b1a4649438 s3-net: add "net dom renamecomputer" to rename machines in a domain.
dmarkey, please test :)

Guenther
2009-05-11 10:55:40 +02:00
Derrell Lipman
915518c0db Use bool instead of int for a boolean variable 2009-05-10 23:04:00 -04:00
Derrell Lipman
9a93dc092c Optimize smb_thread_once usage by not calling it if known already called
- The macro SMB_THREAD_ONCE now tests whether the "once" variable is already
  set, and if so avoids calling smb_thread_once().

Derrell
2009-05-10 22:58:12 -04:00
Derrell Lipman
404327ad41 Panic upon mutex lock or unlock failure
- It's a serious error if we can't lock or unlock a mutex in
  smb_thread_once(). Panic instead of just displaying a DEBUG message.

Derrell
2009-05-10 22:45:12 -04:00
Derrell Lipman
db69ebcbce Provide a libsmbclient interface for programs requiring threads
- This adds two functions: smbc_thread_posix() which provides access to the
  internal threading implementation using pthread; and smbc_thread_impl()
  where the user provides each of the functions required by Samba, to give
  access to the thread implementation's native capabilities.

Derrell
2009-05-10 22:45:12 -04:00
Derrell Lipman
418a2eeae8 Don't require external use of internal enum smb_thread_lock_type
- Internally, when locking or unlocking a mutex, we'll pass one of the
  values of enum smb_thread_lock_type. That enum is not available to users
  providing a thread implementation. Externally, we'll document the integer
  values which will be passed to their lock_mutex function, but not require
  them to access our internal header file.

Derrell
2009-05-10 22:45:12 -04:00
Derrell Lipman
d3434477e6 Replace external thread "once" with an internal implementation
Jeremy, please check...

- I'm in the process of providing an interface in libsmbclient to the
  recently-added threading capabilities. In the process, I discovered that
  different thread implementations have varying types for the variable passed
  to the thread_impl_once() function. pthreads, for example, uses type
  pthread_once_t. Since Samba needs to internally declare these variables, it
  would need to know the exact type required by each thread implementation's
  function. After considering multiple methods of obtaining an appropriately
  sized variable, I decided that for the basic "once" functionality required
  by Samba, it would be much simpler to just implement our own "once"
  functionality. We don't require cancellation points et all. This commit adds
  an smb_thread_once() function that is implemented using an internal
  mutex. The mutex itself uses the implementation's create_mutex
  function. This eliminates the need for the user to provide a smb_thread_once
  function pointer and the entire issue of that function's first parameter.

Derrell
2009-05-10 22:45:12 -04:00
Volker Lendecke
831b73ec82 Fix an unitialized variable warning 2009-05-10 07:43:24 +02:00
Volker Lendecke
46dea8c247 wb_int_trans -> wb_simple_trans in wbclient.c 2009-05-09 21:50:24 +02:00
Volker Lendecke
af2189cfed Add wb_simple_trans_send/recv 2009-05-09 21:50:24 +02:00
Simo Sorce
efa9bc9dc6 Pass also sername to check password script 2009-05-09 11:44:12 -04:00
Volker Lendecke
efbc4315d2 Fix the mangle1 test 2009-05-09 14:09:42 +02:00
Volker Lendecke
c291a55a35 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.
2009-05-09 14:09:41 +02:00
Stefan Metzmacher
5c76472491 s3:libsmb: fix layering of cli_ntrename_internal and its callers
It's easier to have cli_ntrename_internal as a semetric async
tevent_req function. cli_ntrename() and cli_nt_hardlink() should
be callers on top of cli_ntrename_internal().

metze
2009-05-09 09:26:15 +02:00
Tim Prouty
6c935f95b3 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.
2009-05-08 17:09:16 -07:00
Günther Deschner
a3873bca51 s4-smbtorture: avoid secdesc test on connect handle in RPC-SAMR-USERS for Samba3.
With this, I think, we pass RPC-SAMR-USERS.

Guenther
2009-05-09 00:51:04 +02:00
Günther Deschner
a21bfc4daf 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
2009-05-09 00:03:50 +02:00
Günther Deschner
705f36b804 s3-samr: Fix SetUserInfo level 7 when there has been no name change.
Found by torture test.

Guenther
2009-05-09 00:02:00 +02:00
Günther Deschner
d010094700 s3-selftest: enable running RPC-SAMR-USERS against Samba3.
Guenther
2009-05-08 22:23:51 +02:00
Günther Deschner
4f3bfb6261 s4-smbtorture: skip unsupported ACB bits for Samba3 in RPC-SAMR-USER.
Guenther
2009-05-08 22:21:41 +02:00
Günther Deschner
b7925cb3f2 s3-samr: more accurateness in _samr_SetDomainInfo().
Guenther
2009-05-08 22:15:31 +02:00
Günther Deschner
67df4489e2 s4-smbtorture: Support timestamp handling for Samba3 in RPC-SAMR-USERS.
Timestamps in passdb (currently) only have second granularity.

Guenther
2009-05-08 22:14:50 +02:00
Jeremy Allison
3d6f4a7af7 Fix bug #6330 - DFS doesn't work on AIX. Jeremy. 2009-05-08 11:39:05 -07:00
Jeremy Allison
f47b220ce1 Expand the comment explaining why user_in_group_sid is
not reliable for winbindd users from foreign domains.
Jeremy.
2009-05-08 10:12:36 -07:00
Stefan Metzmacher
b79eff843b 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
2009-05-08 16:56:46 +02:00
Michael Adam
7d6e4c7e95 s3:smbd: fix the fix for mapped IPv4 address handling in release_ip().
It was too late... Thanks Metze for noticing.

Michael
2009-05-08 16:42:56 +02:00
Günther Deschner
66cf7e1835 s3-selftest: run RPC-LSA-GETUSER against Samba 3.
Guenther
2009-05-08 11:28:45 +02:00
Günther Deschner
c2498d133d s4-smbtorture: Fix printf info-level mismatch in RPC-SAMR.
Guenther
2009-05-08 09:56:40 +02:00
Günther Deschner
266b79e004 s3-samr: implement more info levels in _samr_QueryDomainInfo().
Gets us closer to pass RPC-SAMR.

Guenther
2009-05-08 09:55:10 +02:00
Günther Deschner
d7b32b51f8 s3-samr: Fix potential memory leak in _samr_ChangePasswordUser().
Guenther
2009-05-08 01:24:28 +02:00
Michael Adam
c469ec5c10 s4:loadparm: fix a comment typo. and line wrapping.
Michael
2009-05-08 01:18:58 +02:00
Michael Adam
31e06e63b7 s4:loadparm: fix brace indentation and add brace for clarity
Michael
2009-05-08 01:18:58 +02:00
Michael Adam
e86a534fa7 s3: make release_ip() call (ctdb) cope with IPv4 mapped addresses
Michael
2009-05-08 01:18:58 +02:00
Günther Deschner
53713be2cb s3-selftest: finally enable RPC-SAMR-PASSWORDS which samba3 now passes.
Guenther
2009-05-08 00:47:16 +02:00
Günther Deschner
310031274d 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
2009-05-08 00:46:54 +02:00
Günther Deschner
6f4b5798c9 s3-selftest: need to enable lanman auth in order make RPC-SAMR-PASSWORDS pass.
Guenther
2009-05-08 00:46:54 +02:00
Günther Deschner
227b61d7ea s3-samr: Do not leak information whether a user exist or not in pwd change calls.
Found by torture test.

Guenther
2009-05-08 00:46:54 +02:00
Günther Deschner
5773d7d102 s3-samr: implement _samr_ChangePasswordUser().
This is vastly copied from samba4 samr server.

Guenther
2009-05-08 00:46:49 +02:00
Günther Deschner
d17c6af57c s3-samr: implement _samr_OemChangePasswordUser2().
Guenther
2009-05-08 00:44:46 +02:00
Günther Deschner
c400fc1e1e 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
2009-05-08 00:43:24 +02:00