1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-19 21:57:57 +03:00

26477 Commits

Author SHA1 Message Date
Günther Deschner
29737ab5da s3-samr-server: fix return code in _samr_QueryDisplayInformation.
Guenther
2008-10-23 11:46:18 +02:00
Jelmer Vernooij
60164e9002 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-10-23 04:58:08 +02:00
Jelmer Vernooij
52923c4ff4 Remove unused copy of tables.pl 2008-10-23 03:07:27 +02:00
Jelmer Vernooij
ad50d78496 Remove unused copy of ndrdump.c. 2008-10-23 03:04:48 +02:00
Günther Deschner
d115c4587f s3-build: fix some const build warnings.
Guenther
2008-10-23 01:43:41 +02:00
Günther Deschner
c017909e2e netapi: NetGroupEnum_r needs to handle servers with no groups.
Guenther
2008-10-23 01:43:06 +02:00
Günther Deschner
74a9a391aa s3-samr-server: _samr_DeleteUser needs to wipe out the user_handle on success.
Guenther
2008-10-23 01:42:27 +02:00
Günther Deschner
f9c6313e66 s3-samr-server: fix access check in _samr_QuerySecurity().
Guenther
2008-10-22 23:17:02 +02:00
Günther Deschner
0f89871837 s3-build: fix the build.
Guenther
2008-10-22 22:45:04 +02:00
Jeremy Allison
f53578daf4 Fix net rpc vampire, based on an *amazing* piece of debugging work by "Cooper S. Blake" <the_analogkid@yahoo.com>.
"I believe I have found two bugs in the 3.2 code and one bug that
carried on to the 3.3 branch.  In the 3.2 code, everything is
located in the utils/net_rpc_samsync.c file.  What I believe is the
first problem is that fetch_database() is calling
samsync_fix_delta_array() with rid_crypt set to true, which means
the password hashes are unencrypted from the RID encryption.
However, I believe this call is redundant, and the corresponding
call for samdump has rid_crypt set to false.  So I think the
rid_crypt param should be false in fetch_database().

If you follow the code, it makes its way to sam_account_from_delta()
where the password hashes are decrypted a second time by calling
sam_pwd_hash().  I believe this is what is scrambling my passwords.

These methods were refactored somewhere in the 3.3 branch.  Now the
net_rpc_samsync.c class calls rpc_vampire_internals, which calls
libnet/libnet_samsync.c, which calls samsync_fix_delta_array() with
rid_crypt always set to false.  I think that's correct.  But the
second bug has carried through in the sam_account_from_delta()
function:

 208         if (memcmp(r->ntpassword.hash, zero_buf, 16) != 0) {
 209                 sam_pwd_hash(r->rid, r->ntpassword.hash, lm_passwd, 0);
 210                 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED);
 211         }
 212
 213         if (memcmp(r->lmpassword.hash, zero_buf, 16) != 0) {
 214                 sam_pwd_hash(r->rid, r->lmpassword.hash, nt_passwd, 0);
 215                 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED);

If you look closely you'll see that the nt hash is going into the
lm_passwd variable and the decrypted value is being set in the lanman
hash, and the lanman hash is being decrypted and put into the nt hash
field.  So the LanMan and NT hashes look like they're being put in
the opposite fields."

Fix this by removing the rid_crypt parameter.
Jeremy.
2008-10-22 13:21:23 -07:00
Günther Deschner
c0cf457c85 s3-asn1: make all of s3 asn1 code do a proper asn1_init() first.
Guenther
2008-10-22 21:37:36 +02:00
Günther Deschner
527d797476 s3-asn1/spnego: use OIDs including dots.
Guenther
2008-10-22 21:37:36 +02:00
Günther Deschner
d9f1fff5b3 s3: use shared asn1 code.
Guenther
2008-10-22 21:37:36 +02:00
Günther Deschner
cef97c2459 s3-spnego: move spnego defines to spnego.h
Guenther
2008-10-22 21:37:36 +02:00
Volker Lendecke
6c019b8755 Slightly simplify reply_sesssetup_blob(): Remove an else branch 2008-10-22 17:53:22 +02:00
Volker Lendecke
84df0a6870 Don't push the data out to the client in reply_sesssetup_blob()
Sending the data at this level breaks the assumption at higher levels that
req->outbuf == NULL means this request is deferred. It also breaks potential
chaining (Kerberos session setup and tcon X in one request)
2008-10-22 17:53:22 +02:00
Jelmer Vernooij
ca2d23e048 Remove unused header file. 2008-10-22 17:00:49 +02:00
Volker Lendecke
b8b0274e03 Fix a debug message in send_nt_replies() 2008-10-22 16:15:04 +02:00
Volker Lendecke
f4e760faf9 Fix bug 5840: Segfault in "rpcclient lsaaddacctrights" 2008-10-22 14:31:40 +02:00
Jelmer Vernooij
e16e6e9cb0 Use standard types. 2008-10-22 03:41:24 +02:00
Jeremy Allison
4e9db0b100 Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.
Jeremy.
2008-10-21 18:05:48 -07:00
Jelmer Vernooij
f36e51617c Don't include a (relative path) srcdir in samba4-data.mk. 2008-10-21 18:49:43 +02:00
Jelmer Vernooij
8ac2da0d09 Allow running individual tests in the testsuite, normalize test names, fix some tests. 2008-10-21 18:26:46 +02:00
Jelmer Vernooij
e422f638bc Use socket wrapper for selftest.pl, find binaries correctly. 2008-10-21 17:48:05 +02:00
Jelmer Vernooij
fe02004865 Specify skip list to selftest.pl, make make target depend on test
binaries.
2008-10-21 17:32:07 +02:00
Jelmer Vernooij
ecd293325c Correctly report when merged-build is used in developer mode. 2008-10-21 17:23:48 +02:00
Jelmer Vernooij
59a6e534cd Merge branch 'selftest' of git://git.samba.org/jelmer/samba 2008-10-21 17:19:23 +02:00
Jelmer Vernooij
d53ff689a3 Silence undefined variable warnings. 2008-10-21 16:45:09 +02:00
Jelmer Vernooij
8fe59b9b00 Automatically enable merged build (for more complete 'make test') when possible during developer builds. 2008-10-21 16:04:54 +02:00
Jelmer Vernooij
3678a98dcd Remove duplicate searching of Samba 4 directory for tags. 2008-10-21 16:03:45 +02:00
Volker Lendecke
5cc4a84583 Fix two trivial typos 2008-10-21 15:29:40 +02:00
Andreas Schneider
24837959ed Create a function out of pam_sm_close_session to delete the credentials.
This is the way the creds should be deleted. Now we have back a
close_session function which can be used for other things.
2008-10-21 15:26:39 +02:00
Andreas Schneider
e858cc2083 Delete the krb5 ccname variable from the PAM environment if set.
If winbind sets the KRB5CCNAME variable it should unset it when
the cache gets destroyed.
2008-10-21 15:26:39 +02:00
Andreas Schneider
95b13b313b Set the right return value if wbc_status is set to an error. 2008-10-21 15:26:39 +02:00
Günther Deschner
9f46669871 s3-build: fix the build.
Guenther
2008-10-21 12:26:58 +02:00
Günther Deschner
b11f3a60fd s3-lsa-server: fix _lsa_GetUserName.
Guenther
2008-10-21 11:39:45 +02:00
Jeremy Allison
f0b1a1bc9b Remove the requirement for ldap call made as root. Add in security
checks for all SAMR calls.
Jeremy.
2008-10-20 16:51:37 -07:00
Jeremy Allison
29c9b88e2b Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba 2008-10-20 16:38:25 -07:00
Jeremy Allison
6aba351676 Fix warnings.
Jeremy.
2008-10-20 16:34:56 -07:00
Günther Deschner
cefe4c6697 s3-rpcclient: fix cmd_lsa build.
Guenther
2008-10-20 22:09:07 +02:00
Günther Deschner
66b06e5a7f s3-build: re-run make samba3-idl.
Guenther
2008-10-20 22:09:07 +02:00
Günther Deschner
bb36f3a342 idl: merge from s4 lsa.idl to s3.
Guenther
2008-10-20 22:09:07 +02:00
Jelmer Vernooij
d36edccc00 Merge branch 'master' of git://git.samba.org/samba
Conflicts:
	source3/include/proto.h
2008-10-20 21:35:10 +02:00
Jelmer Vernooij
2c1b1255c2 Add source4/ to include path because librpc/gen_ndr is still in source?/ 2008-10-20 21:33:41 +02:00
Volker Lendecke
bc9bbda8b3 Fix a valgrind error in idmap_ad_sids_to_unixids()
We need to initialize all mappings in case we don't find anything.

Simo, please check!

Volker
2008-10-20 21:08:20 +02:00
Günther Deschner
f3843e330f s3-samr-server: be consistent when reporting we do password complexity.
Guenther
2008-10-20 20:16:03 +02:00
Jelmer Vernooij
7498f9a9d8 Add missing prototypes for samba3-specific libndr/util.c 2008-10-20 19:51:07 +02:00
Günther Deschner
4b59ecb903 s3-build: no need to duplicate generated ndr_ prototypes.
Guenther
2008-10-20 19:47:00 +02:00
Günther Deschner
c3f3271b82 s3-build: no need to duplicate generated srv_ prototypes.
Guenther
2008-10-20 19:46:44 +02:00
Jelmer Vernooij
d59b2472f4 Include generated header files rather than using manually written
prototypes.
2008-10-20 19:35:55 +02:00