From 3ed1e8ff3c351296adfa78a99c19cc7b0fd5d7e7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 6 Jul 2006 05:51:39 +0000 Subject: r16829: Fix a number of issues raised by the IBM checker, or gcc warnings. In particular, this removes one use of the LDB_DN_NULL_FAILED macro, which was being used on more than DNs, had an embedded goto, and confused the IBM checker. In the password_hash code, ensure that sambaAttr is not, before checking the number of values. In GENSEC, note that this switch value can't occour. This seems to be the only way to quiet both the IBM checker and gcc, as well as cope with possibly invalid inputs. Andrew Bartlet (This used to be commit 3e58350ec2ab883795b1dd03ac46a3520cac67d0) --- source4/dsdb/samdb/ldb_modules/password_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/dsdb/samdb') diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index 9d7c78487a..abb267d884 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -597,7 +597,7 @@ static int password_hash_add(struct ldb_module *module, struct ldb_request *req) /* check sambaPassword is single valued here */ /* TODO: remove this when sambaPassword will be single valued in schema */ - if (sambaAttr->num_values > 1) { + if (sambaAttr && sambaAttr->num_values > 1) { ldb_set_errstring(module->ldb, talloc_asprintf(req, "mupltiple values for sambaPassword not allowed!\n")); -- cgit