summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobey Pointer <robey@src.gnome.org>2001-03-09 01:24:59 +0000
committerRobey Pointer <robey@src.gnome.org>2001-03-09 01:24:59 +0000
commit8a631f5b601e2152c2bd2f8f47e5edad4c948dd8 (patch)
tree4097efbd0cea1940c3c10c6036beabed006814d5
parent812d5fc58bcc25d4405f6e2d20f5403a5cfd69f3 (diff)
downloadnautilus-8a631f5b601e2152c2bd2f8f47e5edad4c948dd8.tar.gz
reviewed by: Eskil Heyn Olsen <eskil@eazel.com>
* nautilus-installer/src/installer.c: (start_logging): Revert earlier logfile breakage by changing the perms check to match the perms mjs is using later on.
-rw-r--r--ChangeLog9
-rw-r--r--nautilus-installer/src/installer.c6
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f626d20f2..0f53ec464 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-03-08 Robey Pointer <robey@eazel.com>
+
+ reviewed by: Eskil Heyn Olsen <eskil@eazel.com>
+
+ * nautilus-installer/src/installer.c: (start_logging):
+
+ Revert earlier logfile breakage by changing the perms check to
+ match the perms mjs is using later on.
+
2001-03-08 John Harper <jsh@eazel.com>
Merge from HEAD:
diff --git a/nautilus-installer/src/installer.c b/nautilus-installer/src/installer.c
index 5f464aad7..4b7c8904c 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, S_IRUSR | S_IWUSR);
+ fd = open (filename, flags, S_IRUSR | S_IWUSR); /* 0600 */
/* make sure that:
* - owned by root (uid = 0)
* - the mode is X00 (group/other can't read/write/execute)
@@ -1857,7 +1857,7 @@ start_logging (EazelInstaller *installer)
if ((fd >= 0) && (fstat (fd, &statbuf) == 0) &&
(lstat (filename, &lstatbuf) == 0) &&
((lstatbuf.st_mode & S_IFLNK) != S_IFLNK) &&
- ((statbuf.st_mode & 0077) == 0) &&
+ ((statbuf.st_mode & 0033) == 0) &&
(statbuf.st_mode & S_IFREG) &&
(statbuf.st_nlink == 1) &&
(statbuf.st_uid == 0)) {
@@ -1865,7 +1865,7 @@ start_logging (EazelInstaller *installer)
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);
+ fchmod (fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); /* 644 */
fp = fdopen (fd, "wt");
eazel_install_set_log (installer->service, fp);
} else {