diff options
author | Brian Cameron <Brian.Cameron@sun.com> | 2009-10-19 16:55:02 -0500 |
---|---|---|
committer | Brian Cameron <Brian.Cameron@sun.com> | 2009-10-19 16:55:02 -0500 |
commit | 6a8cfcec813a5eab4c495074696cf3c65690c025 (patch) | |
tree | 82b75c196f679146f482744adbee5db0d97f1924 /daemon | |
parent | 1920a9b938322aa4dcb3228ad99f6af0bf521540 (diff) | |
download | gdm-6a8cfcec813a5eab4c495074696cf3c65690c025.tar.gz |
Make /var/log/gdm if it doesn't exist. Fixes bug #589862.
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/daemon/main.c b/daemon/main.c index 0fb39150..8577ba74 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -267,7 +267,11 @@ check_logdir (void) r = g_stat (log_path, &statbuf); if (r < 0 || ! S_ISDIR (statbuf.st_mode)) { - gdm_fail (_("Logdir %s does not exist or isn't a directory."), log_path); + if (g_mkdir (log_path, 0755) < 0) { + gdm_fail (_("Logdir %s does not exist or isn't a directory."), + log_path); + } + g_chmod (log_path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); } } |