summaryrefslogtreecommitdiff
path: root/daemon/auth.c
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2001-12-28 00:15:05 +0000
committerGeorge Lebl <jirka@src.gnome.org>2001-12-28 00:15:05 +0000
commita474faf10fcae4dd0183c992d5df8d00bd71588a (patch)
treea224b298de9013c86aec0b0cd71bb4b990583fe7 /daemon/auth.c
parentd875ba070c9cd26b35bec080f04675020d24ac95 (diff)
downloadgdm-a474faf10fcae4dd0183c992d5df8d00bd71588a.tar.gz
don't link libgnomeui and libglade to the daemon any more
Thu Dec 27 16:43:21 2001 George Lebl <jirka@5z.com> * configure.in: don't link libgnomeui and libglade to the daemon any more * daemon/errorgui.[ch], daemon/gdm.c, daemon/slave.c, daemon/verify-*.c: Whack the exec hack for failsafe dialogs, we now yet again do this all just by fork and gtk_init. This seems to work and is truly failsafe * daemon/gdm-net.c: fix hanging caused by some new crack in giochannel, we just do a libc 'read' and that works * daemon/server.c, daemon/gdm.[ch]: again some new crack in glib's mainloop was causing g_main_loop_quit to not work right if called from a signal handler (sometimes). So I just switched to using a simple select call and a dummy pipe. * daemon/Makefile.am, daemon/auth.c, daemon/errorgui.c, daemon/gdm-net.c, daemon/gdm.c, daemon/server.c, daemon/slave.c, daemon/verify-crypt.c, daemon/verify-pam.c, daemon/verify-shadow.c, daemon/xdmcp.c: Compile without any deprecated stuff from glib up
Diffstat (limited to 'daemon/auth.c')
-rw-r--r--daemon/auth.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/daemon/auth.c b/daemon/auth.c
index b6a92b7e..9e81779a 100644
--- a/daemon/auth.c
+++ b/daemon/auth.c
@@ -445,7 +445,7 @@ void
gdm_auth_user_remove (GdmDisplay *d, uid_t user)
{
FILE *af;
- const gchar *authfile;
+ gchar *authfile;
gchar *authdir;
if (!d || !d->userauth)
@@ -462,22 +462,24 @@ gdm_auth_user_remove (GdmDisplay *d, uid_t user)
return;
}
- authfile = g_basename (d->userauth);
- authdir = g_dirname (d->userauth);
+ authfile = g_path_get_basename (d->userauth);
+ authdir = g_path_get_dirname (d->userauth);
/* Now, the cookie file could be owned by a malicious user who
* decided to concatenate something like his entire MP3 collection
* to it. So we better play it safe... */
- if (! gdm_file_check ("gdm_auth_user_remove", user, authdir, authfile,
- TRUE, GdmUserMaxFile, GdmRelaxPerms)) {
+ if ( ! gdm_file_check ("gdm_auth_user_remove", user, authdir, authfile,
+ TRUE, GdmUserMaxFile, GdmRelaxPerms)) {
g_free (authdir);
+ g_free (authfile);
gdm_error (_("gdm_auth_user_remove: Ignoring suspiciously looking cookie file %s"), d->userauth);
return;
}
g_free (authdir);
+ g_free (authfile);
/* Lock user's cookie jar and open it for writing */
if (XauLockAuth (d->userauth, 3, 3, 0) != LOCK_SUCCESS)