1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

48750 Commits

Author SHA1 Message Date
Jelmer Vernooij
e56dff3f7b Import WERROR defines from Samba 3. 2008-10-23 03:25:00 +02:00
Jelmer Vernooij
90bfd9d9e1 Import new DOS error codes from Samba 3. 2008-10-23 03:13:08 +02:00
Jelmer Vernooij
3be0f6ea56 Move libcli-util error code to top-level. 2008-10-23 03:11:19 +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
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
9994cbffa7 s3-build: temporarily add asn1_proto file.
Jelmer, how can we get this autogenerated from samba3 in the non merged-build
case ?

Guenther
2008-10-22 21:58:00 +02: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
Günther Deschner
5d805425b9 lib-util: merge from s3 asn1.
Guenther
2008-10-22 21:37:36 +02:00
Günther Deschner
d81a9a9837 lib-util: fix c++ compile warning.
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
Jelmer Vernooij
c94f994dda Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-10-22 16:57:46 +02:00
Jelmer Vernooij
12ad92165e masktest: Avoid creating new memory context, use dynamic allocation. 2008-10-22 16:56:06 +02:00
Jelmer Vernooij
02fac42690 Change some dynamic allocations back to static buffers to fix build. 2008-10-22 16:49:56 +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
1d9ea911e3 Change buffer size back to 256, just to be sure. 2008-10-22 05:24:00 +02:00
Jelmer Vernooij
c0e14d5021 Repel pstring to nsswitch/. 2008-10-22 05:14:14 +02:00
Jelmer Vernooij
1d5beb7294 Remove pstring usage. 2008-10-22 04:30:54 +02:00
Jelmer Vernooij
6d9b24de78 Remove pstring usages. 2008-10-22 04:25:00 +02:00
Jelmer Vernooij
7a683618e7 Require separate option for quicktest include list rather than making
assumptions about it.
2008-10-22 04:09:17 +02:00
Jelmer Vernooij
5018fef8cb Fix path for quicktest. 2008-10-22 04:05:22 +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
4ba0453c3c Fix AC_SEARCH_LIBS_EXT() usage. 2008-10-21 18:33:38 +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
d142444592 Merge branch 'master' of git://git.samba.org/samba 2008-10-21 16:58:35 +02:00
Jelmer Vernooij
d53ff689a3 Silence undefined variable warnings. 2008-10-21 16:45:09 +02:00
Jelmer Vernooij
ea4f764322 Remove unused global variables. 2008-10-21 16:33:25 +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
Jelmer Vernooij
febd55b1bf Merge branch 'master' of ssh://git.samba.org/data/git/samba into regsrv 2008-10-21 15:53:28 +02:00
Jelmer Vernooij
fdf0d9bbb8 Fix double free. 2008-10-21 15:51:04 +02:00
Jelmer Vernooij
19aec78aec Fix the build. 2008-10-21 15:47:34 +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