gdm r6224 - in trunk: . daemon
- From: halfline svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r6224 - in trunk: . daemon
- Date: Thu, 8 May 2008 04:12:41 +0100 (BST)
Author: halfline
Date: Thu May 8 03:12:41 2008
New Revision: 6224
URL: http://svn.gnome.org/viewvc/gdm?rev=6224&view=rev
Log:
2008-05-07 Ray Strode <rstrode redhat com>
* daemon/gdm-session-worker.c
(_open_session_log): Apply patch from
Tom London <selinux gmail com> to save backup of
.xsession-errors (bug 531587)
Modified:
trunk/ChangeLog
trunk/daemon/gdm-session-worker.c
Modified: trunk/daemon/gdm-session-worker.c
==============================================================================
--- trunk/daemon/gdm-session-worker.c (original)
+++ trunk/daemon/gdm-session-worker.c Thu May 8 03:12:41 2008
@@ -1480,6 +1480,15 @@
char *filename;
filename = g_build_filename (dir, GDM_SESSION_LOG_FILENAME, NULL);
+
+ if (g_access (dir, R_OK | W_OK | X_OK) == 0 && g_access (filename, R_OK | W_OK) == 0) {
+ char *filename_old;
+
+ filename_old = g_strdup_printf ("%s.old", filename);
+ g_rename (filename, filename_old);
+ g_free (filename_old);
+ }
+
fd = g_open (filename, O_RDWR | O_APPEND | O_CREAT, 0600);
if (fd < 0 || !_fd_is_normal_file (fd)) {
@@ -2515,3 +2524,4 @@
return GDM_SESSION_WORKER (object);
}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]