summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-01-16 15:32:21 +0100
committerStefan Metzmacher <metze@samba.org>2012-01-16 17:10:07 +0100
commit13182e792a78c4b32eea95f14c3bc84ca340ef72 (patch)
tree85041954cd62859b696520f78deadbca3ae3f5a9
parent189ee922263a2acab65cd24483c75f2aaad26a36 (diff)
downloadsamba-13182e792a78c4b32eea95f14c3bc84ca340ef72.tar.gz
samba-13182e792a78c4b32eea95f14c3bc84ca340ef72.tar.bz2
samba-13182e792a78c4b32eea95f14c3bc84ca340ef72.zip
s4:dsdb/password_hash: require a "Primary:Kerberos" blob in supplementalCredentials
If this is missing a w2k8r2 server will reboot, when someone tries to change a password. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Jan 16 17:10:07 CET 2012 on sn-devel-104
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index bf94ba3dc3..553cd686a4 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -301,6 +301,22 @@ static int password_hash_bypass(struct ldb_module *module, struct ldb_request *r
data_blob_free(&subblob);
}
+ if (scpp == NULL) {
+ return ldb_error(ldb,
+ LDB_ERR_CONSTRAINT_VIOLATION,
+ "Primary:Packages missing");
+ }
+
+ if (scpk == NULL) {
+ /*
+ * If Primary:Kerberos is missing w2k8r2 reboots
+ * when a password is changed.
+ */
+ return ldb_error(ldb,
+ LDB_ERR_CONSTRAINT_VIOLATION,
+ "Primary:Kerberos missing");
+ }
+
if (scpp) {
struct package_PackagesBlob *p;
uint32_t n;