From: Karel Zak Date: Thu, 15 Feb 2007 10:46:23 +0000 (+0100) Subject: vipw: fix permissions (600->400) for edited /etc/[g]shodow files X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31ffd207d207818e3e7e7060fdd51971752a3007;p=util-linux vipw: fix permissions (600->400) for edited /etc/[g]shodow files Signed-off-by: Karel Zak --- diff --git a/login-utils/vipw.c b/login-utils/vipw.c index cc41b86b..fea28ac2 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(); }