use the orig_umask when choosing perms for the log file.

This commit is contained in:
Andrew Tridgell
1998-10-30 23:50:12 +00:00
parent 6265551a5a
commit e803090538

3
log.c
View File

@@ -78,7 +78,8 @@ void log_open(void)
/* optionally use a log file instead of syslog */
logf = lp_log_file();
if (logf && *logf) {
int old_umask = umask(077);
extern int orig_umask;
int old_umask = umask(022 | orig_umask);
logfile = fopen(logf, "a");
umask(old_umask);
return;