summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-05-08 00:18:28 +0200
committerGünther Deschner <gd@samba.org>2009-05-08 00:46:54 +0200
commit6f4b5798c96ed69d965d6c3c005518f87afda8d6 (patch)
tree655291c8ea6ce8fc58a9bd039bc51c3147f095eb
parent227b61d7ea9895240e0e7f554fbb10d3e78feaae (diff)
downloadsamba-6f4b5798c96ed69d965d6c3c005518f87afda8d6.tar.gz
samba-6f4b5798c96ed69d965d6c3c005518f87afda8d6.tar.bz2
samba-6f4b5798c96ed69d965d6c3c005518f87afda8d6.zip
s3-selftest: need to enable lanman auth in order make RPC-SAMR-PASSWORDS pass.
Guenther
-rw-r--r--selftest/target/Samba3.pm1
-rw-r--r--source3/rpc_server/srv_samr_nt.c4
-rwxr-xr-xsource3/script/tests/selftest.sh1
3 files changed, 6 insertions, 0 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 288ba8c8b7..3a51e6f4b2 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -117,6 +117,7 @@ sub setup_dc($$)
my $dc_options = "
domain master = yes
domain logons = yes
+ lanman auth = yes
";
my $vars = $self->provision($path,
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 6bd5635f2d..862917b418 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -1812,6 +1812,10 @@ NTSTATUS _samr_ChangePasswordUser(pipes_struct *p,
lm_pass = pdb_get_lanman_passwd(pwd);
nt_pass = pdb_get_nt_passwd(pwd);
+ if (!lm_pass || !nt_pass) {
+ return NT_STATUS_WRONG_PASSWORD;
+ }
+
memcpy(&lm_pwd.hash, lm_pass, sizeof(lm_pwd.hash));
memcpy(&nt_pwd.hash, nt_pass, sizeof(nt_pwd.hash));
}
diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index 15a0c06c1e..d069568257 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -213,6 +213,7 @@ cat >$SERVERCONFFILE<<EOF
domain master = yes
domain logons = yes
+ lanman auth = yes
time server = yes
add user script = $PERL $SRCDIR/../lib/nss_wrapper/nss_wrapper.pl --path $NSS_WRAPPER_PASSWD --type passwd --action add --name %u