From ebc9ff616fefbf10b31e4e097f28fa17a1abc2f8 Mon Sep 17 00:00:00 2001 From: Abhidnya Joshi Date: Fri, 25 Oct 2013 07:06:01 +0200 Subject: idmap_autorid: fix failure in reverse lookup if ID is from domain range index #0 Domain range index #0 is not included in the database record. So in this special case we only have the SID, not SID#IDX... Signed-off-by: Abhidnya Joshi Reviewed-by: Michael Adam Reviewed-by: Jeremy Allison --- source3/winbindd/idmap_autorid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index fa16c1383a..4669b8dba5 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -223,7 +223,7 @@ static NTSTATUS idmap_autorid_id_to_sid(struct autorid_global_config *cfg, map->status = ID_UNKNOWN; return NT_STATUS_OK; } - if (q != NULL) + if ((q != NULL) && (*q != '\0')) if (sscanf(q+1, "%"SCNu32, &domain_range_index) != 1) { DEBUG(10, ("Domain range index not found, " "ignoring mapping request\n")); -- cgit