s3: fix build of pdbedit and net_sam. Guenther, please check. Signed-off-by: Bo Yang...
authorBo Yang <boyang@samba.org>
Wed, 15 Jul 2009 09:03:04 +0000 (17:03 +0800)
committerBo Yang <boyang@samba.org>
Wed, 15 Jul 2009 09:05:46 +0000 (17:05 +0800)
source3/utils/net_sam.c
source3/utils/pdbedit.c

index 62abef000dc5757a7fc781171d9a1573d298fc51..41daa4180db28b2f3279bf2c2bbd477bdea4002a 100644 (file)
@@ -452,7 +452,7 @@ static int net_sam_policy_set(struct net_context *c, int argc, const char **argv
        const char *account_policy = NULL;
        uint32 value = 0;
        uint32 old_value = 0;
-       int field;
+       enum pdb_policy_type field;
        char *endptr;
 
         if (argc != 2 || c->display_usage) {
@@ -462,7 +462,7 @@ static int net_sam_policy_set(struct net_context *c, int argc, const char **argv
         }
 
        account_policy = argv[0];
-       field = account_policy_name_to_fieldnum(account_policy);
+       field = account_policy_name_to_typenum(account_policy);
 
        if (strequal(argv[1], "forever") || strequal(argv[1], "never")
            || strequal(argv[1], "off")) {
@@ -519,7 +519,7 @@ static int net_sam_policy_show(struct net_context *c, int argc, const char **arg
 {
        const char *account_policy = NULL;
         uint32 old_value;
-        int field;
+        enum pdb_policy_type field;
 
         if (argc != 1 || c->display_usage) {
                 d_fprintf(stderr, "usage: net sam policy show"
@@ -528,7 +528,7 @@ static int net_sam_policy_show(struct net_context *c, int argc, const char **arg
         }
 
        account_policy = argv[0];
-        field = account_policy_name_to_fieldnum(account_policy);
+        field = account_policy_name_to_typenum(account_policy);
 
         if (field == 0) {
                const char **names;
index a4642994388d05dce50091928701f1d45ba9b205..dce2f05a834b51473cb0d56c7c4f7a3ce9eeae2f 100644 (file)
@@ -1109,7 +1109,7 @@ int main (int argc, char **argv)
        /* account policy operations */
        if ((checkparms & BIT_ACCPOLICY) && !(checkparms & ~(BIT_ACCPOLICY + BIT_ACCPOLVAL))) {
                uint32 value;
-               int field = account_policy_name_to_fieldnum(account_policy);
+               enum pdb_policy_type field = account_policy_name_to_typenum(account_policy);
                if (field == 0) {
                        const char **names;
                        int count;