Ray: Thanks for the comment. I was about to code this up, but I noticed the change was already made upstream. Also thanks to whoever fixed this up. Brian
+#ifdef ENABLE_RBAC_SHUTDOWN
+static char *
+get_user_name (uid_t uid)
+{
+ struct passwd *pwent;
+ char *name;
+
+ name = NULL;
+
+ pwent = getpwuid (uid);
+
+ if (pwent != NULL) {
+ name = g_strdup (pwent->pw_name);
+ }
+
+ return name;
+}
+#endif
+
You could drop this function and just use g_get_user_name().
(since you only ever call it with getuid() as the argument)
Note the semantics of g_get_user_name() are a little different, in
that you don't g_free() the result.
--Ray