diff options
author | Maciej Stachowiak <mstachow@src.gnome.org> | 2001-03-08 18:42:54 +0000 |
---|---|---|
committer | Maciej Stachowiak <mstachow@src.gnome.org> | 2001-03-08 18:42:54 +0000 |
commit | 422689f867c636303ae000056eec48160f61b81a (patch) | |
tree | 4feed34616074ab77e438ecb8e16e6ac7a258e83 | |
parent | 0446865a05e4be94b56b6ff8cf2c3037255dae05 (diff) | |
download | nautilus-422689f867c636303ae000056eec48160f61b81a.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).
-rw-r--r-- | nautilus-installer/src/installer.c | 4 |
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 { |