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)
source/utils/net_rpc.c

index 1a5e98b..27cc2a0 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;
 }