We have (at least) two places where we create backup files.
In one of them, we use a hardcoded mask of 0664:
|
if (fchmod (fileno (fp), sb->st_mode & 0664) != 0) { |
which blames back to 45c6603 (2007-10-07; "[svn-upgrade] Integrating new upstream version, shadow (19990709)").
In the other, we have no mask at all:
|
|| (chmod (backup, sb->st_mode) != 0) |
which blames back to the same 45c6603 (2007-10-07; "[svn-upgrade] Integrating new upstream version, shadow (19990709)").
Cc: @stoeckmann , @hallyn
Should we change anything?
We have (at least) two places where we create backup files.
In one of them, we use a hardcoded mask of 0664:
shadow/lib/commonio.c
Line 257 in c745eea
which blames back to 45c6603 (2007-10-07; "[svn-upgrade] Integrating new upstream version, shadow (19990709)").
In the other, we have no mask at all:
shadow/src/vipw.c
Line 143 in c745eea
which blames back to the same 45c6603 (2007-10-07; "[svn-upgrade] Integrating new upstream version, shadow (19990709)").
Cc: @stoeckmann , @hallyn
Should we change anything?