* lib/tcbfuncs.c: Avoid implicit int to mode_t conversion.
This commit is contained in:
parent
fba0a83c03
commit
1d6673a166
@ -20,6 +20,7 @@
|
|||||||
* lib/tcbfuncs.c: Removed dead return.
|
* lib/tcbfuncs.c: Removed dead return.
|
||||||
* lib/tcbfuncs.c: move_dir() and shadowtcb_move() need a non NULL
|
* lib/tcbfuncs.c: move_dir() and shadowtcb_move() need a non NULL
|
||||||
stored_tcb_user.
|
stored_tcb_user.
|
||||||
|
* lib/tcbfuncs.c: Avoid implicit int to mode_t conversion.
|
||||||
|
|
||||||
2010-03-17 Nicolas François <nicolas.francois@centraliens.net>
|
2010-03-17 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
@ -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));
|
fprintf(stderr, _("%s: Cannot change owner of %s: %s\n"), Prog, shadow, strerror(errno));
|
||||||
goto out_free;
|
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));
|
fprintf(stderr, _("%s: Cannot change mode of %s: %s\n"), Prog, shadow, strerror(errno));
|
||||||
goto out_free;
|
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));
|
fprintf(stderr, _("%s: Cannot change owner of %s: %s\n"), Prog, dir, strerror(errno));
|
||||||
goto out_free;
|
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));
|
fprintf(stderr, _("%s: Cannot change mode of %s: %s\n"), Prog, dir, strerror(errno));
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user