s3:winbindd: fix query_user for users with NULL full name.
authorMichael Adam <obnox@samba.org>
Mon, 1 Nov 2010 11:33:43 +0000 (12:33 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 1 Nov 2010 13:03:33 +0000 (13:03 +0000)
Not sure whether query_user ever sends a NULL full name.
Query Display Info does, and it does not harm to add the
check here, too.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Nov  1 13:03:33 UTC 2010 on sn-devel-104

source3/winbindd/winbindd_rpc.c

index 0b101e474469d9efae534fe9e57b7b729fe90ed7..47d8f34e1bb75650fdbb92f21fcf5a5ea7843267 100644 (file)
@@ -502,7 +502,9 @@ NTSTATUS rpc_query_user(TALLOC_CTX *mem_ctx,
 
        user_info->full_name = talloc_strdup(user_info,
                                        info->info21.full_name.string);
-       if (user_info->acct_name == NULL) {
+       if ((info->info21.full_name.string != NULL) &&
+           (user_info->acct_name == NULL))
+       {
                return NT_STATUS_NO_MEMORY;
        }