diff options
author | George Lebl <jirka@5z.com> | 2003-07-21 19:24:39 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2003-07-21 19:24:39 +0000 |
commit | 14b750efefe58984254104682e2cff589935695b (patch) | |
tree | 2f61d36c03e998b79c2e1f188042dafc3a3cd7ca /daemon/misc.c | |
parent | 5da9da84d6087593a797f7765d9c7d192e6862ac (diff) | |
download | gdm-14b750efefe58984254104682e2cff589935695b.tar.gz |
eek, it's /dev/null, not dev/null
Mon Jul 21 12:24:01 2003 George Lebl <jirka@5z.com>
* config/Xsession.in: eek, it's /dev/null, not dev/null
* daemon/misc.[ch], daemon/gdm.c, daemon/slave.c:
Fix #117527, get the root user name from the passwd info
rather then assuming it's "root".
* configure.in: fix #117895, when --with-xinerama=no, don't
do the xinerama checks and just don't use xinerama
* daemon/slave.c: Fix counting bugs in gdm_in_signal to
fix hangs
* daemon/slave.c: Fix the waiting for notify when
inside the usr2 signal handler.
* daemon/gdm.c, daemon/slave.c: Redo the waitpid mess and
just use a pipe and select kind of stuff. Also remove
the greeter restarts from within signal handlers as we
can just do it now by popping out of the select and doing
it there. This fixes a bunch of races and hangs related
to doing too many things from signal handlers. Also
don't do waitpid from the main daemon for slaves children
as it won't work anyway and kill the entire process groups.
* daemon/slave.c: fix the waiting code in focus_first_x_window
* gui/gdmlogin.c: fix the clock sensitivity issues by twiddling
the sensitive flags on the clock menuitem directly. Should
fix theme ugliness issues with the clock.
* config/Xsession.in: Apply patch from Steve Chaplin
<stevech1097@yahoo.com.au> to fix #117898 to add $0
to all the echo messages in this file to make debugging
easier.
Diffstat (limited to 'daemon/misc.c')
-rw-r--r-- | daemon/misc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/daemon/misc.c b/daemon/misc.c index 1adb7c3a..6db52bf0 100644 --- a/daemon/misc.c +++ b/daemon/misc.c @@ -35,6 +35,7 @@ #include <netdb.h> #include <errno.h> #include <grp.h> +#include <pwd.h> #include <sys/types.h> #ifdef HAVE_SYS_SOCKIO_H #include <sys/sockio.h> @@ -1411,4 +1412,21 @@ gdm_reset_limits (void) #endif } +const char * +gdm_root_user (void) +{ + static char *root_user = NULL; + struct passwd *pwent; + + if (root_user != NULL) + return root_user; + + pwent = getpwuid (0); + if (pwent == NULL) /* huh? */ + root_user = g_strdup ("root"); + else + root_user = g_strdup (pwent->pw_name); + return root_user; +} + /* EOF */ |