]> granicus.if.org Git - sudo/commitdiff
Fix printing of type T_MODE in dump_defaults()
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 5 Nov 1999 22:11:55 +0000 (22:11 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 5 Nov 1999 22:11:55 +0000 (22:11 +0000)
defaults.c

index 09bb8fa4df6723a11e296232a4828d81eab7cf0b..76d2dadf3cf30e2a3645400808444cde73163f2d 100644 (file)
@@ -260,10 +260,13 @@ dump_defaults()
                    }
                    break;
                case T_INT:
-               case T_MODE:
                    (void) printf(cur->desc, cur->sd_un.ival);
                    putchar('\n');
                    break;
+               case T_MODE:
+                   (void) printf(cur->desc, cur->sd_un.mode);
+                   putchar('\n');
+                   break;
            }
        }
     }
@@ -665,7 +668,7 @@ store_mode(val, def, op)
     long l;
 
     if (op == FALSE) {
-       def->sd_un.mode = 0777;
+       def->sd_un.mode = (mode_t)0777;
     } else {
        l = strtol(val, &endp, 8);
        if (*endp != '\0' || l < 0 || l >= 0777)