winbind: Use talloc_strdup_upper where appropriate
authorVolker Lendecke <vl@samba.org>
Wed, 8 Mar 2017 09:17:16 +0000 (10:17 +0100)
committerUri Simchoni <uri@samba.org>
Thu, 9 Mar 2017 19:04:19 +0000 (20:04 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/winbindd/winbindd_cache.c

index 4bb01956e886d8c98c7f239015981e0c0cc39a07..314ce1d5d03380bf4db2da5eff490ff2a82c6165 100644 (file)
@@ -1115,14 +1115,10 @@ NTSTATUS resolve_username_to_alias( TALLOC_CTX *mem_ctx,
        if (!cache->tdb)
                goto do_query;
 
-       upper_name = talloc_strdup(mem_ctx, name);
+       upper_name = talloc_strdup_upper(mem_ctx, name);
        if (upper_name == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
-       if (!strupper_m(upper_name)) {
-               talloc_free(upper_name);
-               return NT_STATUS_INVALID_PARAMETER;
-       }
 
        centry = wcache_fetch(cache, domain, "NSS/NA/%s", upper_name);