diff options
author | Matthieu Patou <mat@matws.net> | 2013-06-29 16:02:32 -0700 |
---|---|---|
committer | Matthieu Patou <mat@matws.net> | 2013-08-06 21:22:02 -0700 |
commit | aa17a2c01dbab2e522a8ccccaed7943963bab5b9 (patch) | |
tree | 0bf12020c9eb66fc7170844bbbd2458e0900ef9a /source4 | |
parent | beead4d431b4d0cdd5e9f58fef481848d9daeaff (diff) | |
download | samba-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>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/cracknames.c | 5 |
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; } } |