From 31ffd207d207818e3e7e7060fdd51971752a3007 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 15 Feb 2007 11:46:23 +0100 Subject: [PATCH] vipw: fix permissions (600->400) for edited /etc/[g]shodow files Signed-off-by: Karel Zak --- login-utils/vipw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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(); } -- 2.39.5