r5888: fix incorrect test - don't print anything if user is not in any groups
authorHerb Lewis <herb@samba.org>
Fri, 18 Mar 2005 22:31:44 +0000 (22:31 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:07 +0000 (10:56 -0500)
(This used to be commit 2461a8e482ab22dde4b7af8ea6d6ee043f302bf8)

source3/utils/net_rpc.c

index 1a5e98b34e930a5adf3749850ae62fdcaa3e88af..27cc2a091864d2b72b3561001b6c03d664fff8de 100644 (file)
@@ -1009,7 +1009,7 @@ rpc_user_info_internals(const DOM_SID *domain_sid, const char *domain_name,
 
        /* Look up rids */
 
-       if (rids) {
+       if (num_rids) {
                rids = TALLOC_ARRAY(mem_ctx, uint32, num_rids);
 
                for (i = 0; i < num_rids; i++)
@@ -1028,9 +1028,6 @@ rpc_user_info_internals(const DOM_SID *domain_sid, const char *domain_name,
                for (i = 0; i < num_names; i++)
                        printf("%s\n", names[i]);
        }
-       else {
-               printf("no groups\n");
-       }
  done:
        return result;
 }