]> granicus.if.org Git - shadow/commitdiff
* lib/tcbfuncs.c: Avoid implicit int to mode_t conversion.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 18 Mar 2010 00:05:57 +0000 (00:05 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 18 Mar 2010 00:05:57 +0000 (00:05 +0000)
ChangeLog
lib/tcbfuncs.c

index 674701410a4c2734ba6cdcffb72a701e8f002dad..03d374b190b44b39d8f61dd10252eea875ec2718 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
        * lib/tcbfuncs.c: Removed dead return.
        * lib/tcbfuncs.c: move_dir() and shadowtcb_move() need a non NULL
        stored_tcb_user.
+       * lib/tcbfuncs.c: Avoid implicit int to mode_t conversion.
 
 2010-03-17  Nicolas François  <nicolas.francois@centraliens.net>
 
index 5d1082de610d4d3f466258ca36932a652fc68476..852845aa7b78f32afea8da3ef0edc4548a8e0e21 100644 (file)
@@ -502,7 +502,7 @@ shadowtcb_status shadowtcb_create(const char *name, uid_t uid)
                fprintf(stderr, _("%s: Cannot change owner of %s: %s\n"), Prog, shadow, strerror(errno));
                goto out_free;
        }
-       if (chmod(shadow, authgid == shadowgid ? 0600 : 0640) != 0) {
+       if (chmod(shadow, (mode_t) ((authgid == shadowgid) ? 0600 : 0640)) != 0) {
                fprintf(stderr, _("%s: Cannot change mode of %s: %s\n"), Prog, shadow, strerror(errno));
                goto out_free;
        }
@@ -510,7 +510,7 @@ shadowtcb_status shadowtcb_create(const char *name, uid_t uid)
                fprintf(stderr, _("%s: Cannot change owner of %s: %s\n"), Prog, dir, strerror(errno));
                goto out_free;
        }
-       if (chmod(dir, authgid == shadowgid ? 02700 : 02710) != 0) {
+       if (chmod(dir, (mode_t) ((authgid == shadowgid) ? 02700 : 02710)) != 0) {
                fprintf(stderr, _("%s: Cannot change mode of %s: %s\n"), Prog, dir, strerror(errno));
                goto out_free;
        }