[gdm] Use g_remove to remove the XAUTH_DIR instead of g_unlink, which is safer.



commit 339074b5f872a90c4d7e543a359e1092a9303aab
Author: Brian Cameron <Brian Cameron sun com>
Date:   Wed May 19 19:12:19 2010 -0500

    Use g_remove to remove the XAUTH_DIR instead of g_unlink, which is safer.

 daemon/gdm-display-access-file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-display-access-file.c b/daemon/gdm-display-access-file.c
index 1b52f15..ee42a21 100644
--- a/daemon/gdm-display-access-file.c
+++ b/daemon/gdm-display-access-file.c
@@ -270,7 +270,7 @@ _create_xauth_file_for_user (const char  *username,
 
         /* Create directory if not exist, then set permission 0711 and ownership root:gdm */
         if (g_file_test (GDM_XAUTH_DIR, G_FILE_TEST_IS_DIR) == FALSE) {
-                g_unlink (GDM_XAUTH_DIR);
+                g_remove (GDM_XAUTH_DIR);
                 if (g_mkdir (GDM_XAUTH_DIR, 0711) != 0) {
                         g_set_error (error,
                                      G_FILE_ERROR,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]