[pacman-dev] [PATCH] 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. --- lib/libalpm/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c index d232bcc..9af5e84 100644 --- a/lib/libalpm/log.c +++ b/lib/libalpm/log.c @@ -52,7 +52,7 @@ int SYMEXPORT alpm_logaction(alpm_handle_t *handle, const char *prefix, int fd; do { fd = open(handle->logfile, O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC, - 0000); + 0644); } while(fd == -1 && errno == EINTR); if(fd >= 0) { handle->logstream = fdopen(fd, "a"); -- 2.2.1
On 23/12/14 03:19, Evangelos Foutras wrote:
Following commit 086bbc5 (Use O_CLOEXEC as much as possible when opening files), the log file would be created by pacman with blank permissions. ---
Ack.
participants (2)
-
Allan McRae
-
Evangelos Foutras