Use correct mode bits for the log file (0000 -> 0644)
Following commit 086bbc5
(Use O_CLOEXEC as much as possible when opening
files), the log file would be created by pacman with blank permissions.
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
a1c50a08c9
commit
c07593c64c
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ int SYMEXPORT alpm_logaction(alpm_handle_t *handle, const char *prefix,
|
||||||
int fd;
|
int fd;
|
||||||
do {
|
do {
|
||||||
fd = open(handle->logfile, O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC,
|
fd = open(handle->logfile, O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC,
|
||||||
0000);
|
0644);
|
||||||
} while(fd == -1 && errno == EINTR);
|
} while(fd == -1 && errno == EINTR);
|
||||||
if(fd >= 0) {
|
if(fd >= 0) {
|
||||||
handle->logstream = fdopen(fd, "a");
|
handle->logstream = fdopen(fd, "a");
|
||||||
|
|
Loading…
Add table
Reference in a new issue