diff options
author | Karel Zak | 2007-02-15 11:46:23 +0100 |
---|---|---|
committer | Karel Zak | 2007-02-15 11:46:23 +0100 |
commit | 31ffd207d207818e3e7e7060fdd51971752a3007 (patch) | |
tree | 9705415f6b1b42359970eabcb88ad47a71378513 /login-utils | |
parent | partx: add man pages for addpart, delpart and partx (diff) | |
download | kernel-qcow2-util-linux-31ffd207d207818e3e7e7060fdd51971752a3007.tar.gz kernel-qcow2-util-linux-31ffd207d207818e3e7e7060fdd51971752a3007.tar.xz kernel-qcow2-util-linux-31ffd207d207818e3e7e7060fdd51971752a3007.zip |
vipw: fix permissions (600->400) for edited /etc/[g]shodow files
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils')
-rw-r--r-- | login-utils/vipw.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/login-utils/vipw.c b/login-utils/vipw.c index cc41b86b1..fea28ac2e 100644 --- a/login-utils/vipw.c +++ b/login-utils/vipw.c @@ -297,13 +297,11 @@ edit_file(int is_shadow) (void)fprintf(stderr, _("%s: no changes made\n"), progname); pw_error((char *)NULL, 0, 0); } + /* see pw_lock() where we create the file with mode 600 */ if (!is_shadow) chmod(tmp_file, 0644); -#if 0 - /* if shadow file, then mode is 0600 now */ else chmod(tmp_file, 0400); -#endif pw_unlock(); } |