gdm r6245 - in trunk: . daemon
- From: bcameron svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r6245 - in trunk: . daemon
- Date: Sat, 24 May 2008 02:09:50 +0000 (UTC)
Author: bcameron
Date: Sat May 24 02:09:50 2008
New Revision: 6245
URL: http://svn.gnome.org/viewvc/gdm?rev=6245&view=rev
Log:
2008-05-23 Brian Cameron <brian cameron sun com>
* daemon/gdm-display-access-file.c: Create and set permissions
to 1777 and owner root:gdm on /var/run/gdm if it does not exist.
Modified:
trunk/ChangeLog
trunk/daemon/gdm-display-access-file.c
Modified: trunk/daemon/gdm-display-access-file.c
==============================================================================
--- trunk/daemon/gdm-display-access-file.c (original)
+++ trunk/daemon/gdm-display-access-file.c Sat May 24 02:09:50 2008
@@ -227,6 +227,23 @@
fp = NULL;
+ /* Create directory on startup if not exist */
+ if (g_file_test (GDM_XAUTH_DIR, G_FILE_TEST_IS_DIR) == FALSE) {
+ g_unlink (GDM_XAUTH_DIR);
+ if (g_mkdir (GDM_XAUTH_DIR, S_ISVTX|S_IRWXU|S_IRWXG) != 0) {
+ g_set_error (error,
+ G_FILE_ERROR,
+ g_file_error_from_errno (errno),
+ "%s", g_strerror (errno));
+ fp = -1;
+ goto out;
+ }
+
+ g_chmod (GDM_XAUTH_DIR, S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO);
+ _get_uid_and_gid_for_user ("gdm", &uid, &gid);
+ chown (GDM_XAUTH_DIR, 0, gid);
+ }
+
template = g_strdup_printf (GDM_XAUTH_DIR
"/auth-cookie-XXXXXXXX-for-%s",
username);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]