r19840: Fix an uninitialized variable
authorVolker Lendecke <vlendec@samba.org>
Wed, 22 Nov 2006 16:39:07 +0000 (16:39 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:16:01 +0000 (12:16 -0500)
(This used to be commit c4b5e8c7a0b936a3d95f221718a048d5374e836a)

source3/utils/net_sam.c

index b041bd7a6587b93b5062d4873193794454411cf2..d92bf1521cd38ab14264c73be1fe739232568a4c 100644 (file)
@@ -378,6 +378,13 @@ static int net_sam_policy_set(int argc, const char **argv)
 
        printf("Account policy \"%s\" description: %s\n", account_policy,
                account_policy_get_desc(field));
+
+       if (!pdb_get_account_policy(field, &old_value)) {
+                fprintf(stderr, "Valid account policy, but unable to "
+                        "fetch value!\n");
+                return -1;
+        }
+       
         printf("Account policy \"%s\" value was: %d\n", account_policy,
                old_value);