[PATCH 1/2] core: Report username in systemd uid_has_session



For nm_auth_uid_in_acl to be successfull its required that
nm_session_monitor_uid_has_session returns a user_name.
---
 src/nm-session-monitor-systemd.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/nm-session-monitor-systemd.c b/src/nm-session-monitor-systemd.c
index 8fe73ae..95e6c86 100644
--- a/src/nm-session-monitor-systemd.c
+++ b/src/nm-session-monitor-systemd.c
@@ -236,6 +236,9 @@ nm_session_monitor_uid_has_session (NMSessionMonitor *monitor,
                                     const char **out_user,
                                     GError **error)
 {
+	if (!nm_session_uid_to_user (uid, out_user, error))
+		return FALSE;
+
 	return sd_uid_get_sessions (uid, FALSE, NULL) > 0;
 }
 
-- 
1.7.3.4



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