summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2013-06-29 16:02:32 -0700
committerMatthieu Patou <mat@matws.net>2013-08-06 21:22:02 -0700
commitaa17a2c01dbab2e522a8ccccaed7943963bab5b9 (patch)
tree0bf12020c9eb66fc7170844bbbd2458e0900ef9a
parentbeead4d431b4d0cdd5e9f58fef481848d9daeaff (diff)
downloadsamba-aa17a2c01dbab2e522a8ccccaed7943963bab5b9.tar.gz
samba-aa17a2c01dbab2e522a8ccccaed7943963bab5b9.tar.bz2
samba-aa17a2c01dbab2e522a8ccccaed7943963bab5b9.zip
drs-crackname: Fix cracknames for the format UNKNOWN when the data is actually a GUID
The cannonical crackname expect a "/" or it returns DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR, when doing UNKNOWN format it's not an error to not have a "/" in the name to crack it's just a sign the name is not a cannonical one. Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abarlett@samba.org>
-rw-r--r--source4/dsdb/samdb/cracknames.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c
index 0c4cdfc2d3..388b6c7cec 100644
--- a/source4/dsdb/samdb/cracknames.c
+++ b/source4/dsdb/samdb/cracknames.c
@@ -488,7 +488,10 @@ WERROR DsCrackNameOneName(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
if (!W_ERROR_IS_OK(werr)) {
return werr;
}
- if (info1->status != DRSUAPI_DS_NAME_STATUS_NOT_FOUND) {
+ if (info1->status != DRSUAPI_DS_NAME_STATUS_NOT_FOUND &&
+ (formats[i] != DRSUAPI_DS_NAME_FORMAT_CANONICAL ||
+ info1->status != DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR))
+ {
return werr;
}
}