[gdm/gnome-2-30] Fix two more compiler warnings
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/gnome-2-30] Fix two more compiler warnings
- Date: Mon, 21 Jun 2010 23:18:28 +0000 (UTC)
commit 6dbaf1c4517f1c5e8a05a2c6e36f4fdc5d91c1cb
Author: William Jon McCann <jmccann redhat com>
Date: Thu Jun 17 18:07:46 2010 -0400
Fix two more compiler warnings
daemon/main.c | 8 +++++++-
gui/user-switch-applet/applet.c | 1 +
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/daemon/main.c b/daemon/main.c
index 81dd9d3..89b5bef 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -344,6 +344,7 @@ gdm_daemon_check_permissions (uid_t uid,
{
struct stat statbuf;
const char *auth_path;
+ int res;
auth_path = LOGDIR;
@@ -353,7 +354,12 @@ gdm_daemon_check_permissions (uid_t uid,
set_effective_user_group (0, 0);
/* Now set things up for us as */
- chown (auth_path, 0, gid);
+ res = chown (auth_path, 0, gid);
+ if (res == -1) {
+ g_warning ("Unable to change owner for auth file: %s",
+ g_strerror (errno));
+ }
+
g_chmod (auth_path, (S_IRWXU|S_IRWXG|S_ISVTX));
set_effective_user_group (uid, gid);
diff --git a/gui/user-switch-applet/applet.c b/gui/user-switch-applet/applet.c
index d1c3a6d..b8b242f 100644
--- a/gui/user-switch-applet/applet.c
+++ b/gui/user-switch-applet/applet.c
@@ -20,6 +20,7 @@
#include "config.h"
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]