summaryrefslogtreecommitdiff
path: root/nautilus-installer/src/installer.c
diff options
context:
space:
mode:
authorMaciej Stachowiak <mstachow@src.gnome.org>2001-03-08 19:41:51 +0000
committerMaciej Stachowiak <mstachow@src.gnome.org>2001-03-08 19:41:51 +0000
commit85b8adc30922f83a35889ea4094f363a332e7309 (patch)
treef1fba3b5705405e912fd0a222996c0a4026f3fe4 /nautilus-installer/src/installer.c
parentd3209bab8620d53379ff103724592bee46fcddb0 (diff)
downloadnautilus-85b8adc30922f83a35889ea4094f363a332e7309.tar.gz
reviewed by: Darin Adler <darin@eazel.com>
* nautilus-installer/src/installer.c (start_logging): After creating log file and verifying safety (to avoid /tmp races), make it world-readable to fix bug 7544 (eazel-install.log created with read-only perms for root).
Diffstat (limited to 'nautilus-installer/src/installer.c')
-rw-r--r--nautilus-installer/src/installer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nautilus-installer/src/installer.c b/nautilus-installer/src/installer.c
index efc22b0f3..5f464aad7 100644
--- a/nautilus-installer/src/installer.c
+++ b/nautilus-installer/src/installer.c
@@ -1846,7 +1846,7 @@ start_logging (EazelInstaller *installer)
flags |= O_NOFOLLOW;
#endif
filename = g_strdup_printf ("%s/%s", installer_tmpdir, LOGFILE);
- fd = open (filename, flags, 0600);
+ fd = open (filename, flags, S_IRUSR | S_IWUSR);
/* make sure that:
* - owned by root (uid = 0)
* - the mode is X00 (group/other can't read/write/execute)
@@ -1864,6 +1864,8 @@ start_logging (EazelInstaller *installer)
/* this is our file -- truncate and start over */
fprintf (stderr, "Writing logfile to %s ...\n", filename);
ftruncate (fd, 0);
+ /* Now make it world-readable */
+ fchmod (fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
fp = fdopen (fd, "wt");
eazel_install_set_log (installer->service, fp);
} else {