Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 2e45bafda19b5736966dff377b223410 > files > 2

udev-153-5.fc13.src.rpm

From 939cc18afc49ee8479572c14c7fa777646fd4add Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Tue, 3 Aug 2010 15:09:46 +0200
Subject: [PATCH 17/18] udev-acl: properly handle CK change events for root user

mschmidt@redhat.com writes:
> since root is treated specially, it does not do anything!
> udev-acl may want to prevent removing ACLs from root, but
> it must not stop the ACLs being granted to the user of the
> new session.

https://bugzilla.redhat.com/show_bug.cgi?id=608712
---
 extras/udev-acl/udev-acl.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c
index ff04ec6..f2b5005 100644
--- a/extras/udev-acl/udev-acl.c
+++ b/extras/udev-acl/udev-acl.c
@@ -224,14 +224,10 @@ static int consolekit_called(const char *ck_action, uid_t *uid, uid_t *uid2, con
 		if (s == NULL)
 			return -1;
 		u = strtoul(s, NULL, 10);
-		if (u == 0)
-			return 0;
 		s = getenv("CK_SEAT_SESSION_USER_UID");
 		if (s == NULL)
 			return -1;
 		u2 = strtoul(s, NULL, 10);
-		if (u2 == 0)
-			return 0;
 
 		s = getenv("CK_SEAT_OLD_SESSION_IS_LOCAL");
 		s2 = getenv("CK_SEAT_SESSION_IS_LOCAL");
@@ -263,12 +259,11 @@ static int consolekit_called(const char *ck_action, uid_t *uid, uid_t *uid2, con
 			a = ACTION_ADD;
 			u = u2;
 		}
-
 		break;
 	case ACTION_NONE:
 		break;
 	default:
-		g_assert_not_reached ();
+		g_assert_not_reached();
 		break;
 	}
 
-- 
1.7.2