summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2003-07-31 20:01:38 +0000
committerGeorge Lebl <jirka@src.gnome.org>2003-07-31 20:01:38 +0000
commita55b1326c1d40973589d287b544ecd6eade34455 (patch)
tree02e52b158997795a3425763629821de6b9012210
parenta1199bd41f07902677026380a49020ffe3d3f08d (diff)
downloadgdm-a55b1326c1d40973589d287b544ecd6eade34455.tar.gz
update comments
Thu Jul 31 12:58:26 2003 George Lebl <jirka@5z.com> * XKeepsCrashing, daemon/verify-pam.c: update comments * daemon/misc.c: fix leaks/crashes in the text message dialog stuff * daemon/slave.c: do a chdir as the user id again just for sanity sake * gui/gdmlogin.c, gui/greeter/greeter_item_ulist.c: don't load more then 50 users into the user listing. This should fix random crap happening on large systems using things like NIS (you shouldn't use face browser here anyway) * gui/greeter/greeter.c: remove the use of redundant _set_has_separator * NEWS: update
-rw-r--r--ChangeLog19
-rw-r--r--NEWS3
-rwxr-xr-xconfig/XKeepsCrashing4
-rw-r--r--daemon/misc.c13
-rw-r--r--daemon/slave.c3
-rw-r--r--daemon/verify-pam.c3
-rw-r--r--gui/gdmlogin.c16
-rw-r--r--gui/greeter/greeter.c1
-rw-r--r--gui/greeter/greeter_item_ulist.c23
9 files changed, 70 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 2988b694..03596280 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+Thu Jul 31 12:58:26 2003 George Lebl <jirka@5z.com>
+
+ * XKeepsCrashing, daemon/verify-pam.c: update comments
+
+ * daemon/misc.c: fix leaks/crashes in the text message dialog stuff
+
+ * daemon/slave.c: do a chdir as the user id again just for sanity
+ sake
+
+ * gui/gdmlogin.c, gui/greeter/greeter_item_ulist.c: don't load
+ more then 50 users into the user listing. This should fix
+ random crap happening on large systems using things like NIS
+ (you shouldn't use face browser here anyway)
+
+ * gui/greeter/greeter.c: remove the use of redundant
+ _set_has_separator
+
+ * NEWS: update
+
Wed Jul 30 15:21:08 2003 George Lebl <jirka@5z.com>
* gui/gdmlogin.c, gui/greeter/greeter.c: add gdk_beep to the Username
diff --git a/NEWS b/NEWS
index e4c767a7..3c5a1db3 100644
--- a/NEWS
+++ b/NEWS
@@ -50,6 +50,9 @@ Ahh news...
- In the face browsers the username is bold to separate it from
the user info
+- An X bell is sounded when the username prompt comes on. Useful
+ for the blind.
+
- On exit from an XDMCP display whack all the clients with windows
to support the more broken displays.
diff --git a/config/XKeepsCrashing b/config/XKeepsCrashing
index 2b81b62a..84ee0c0e 100755
--- a/config/XKeepsCrashing
+++ b/config/XKeepsCrashing
@@ -87,10 +87,6 @@ if grep '^\(Cannot open mouse\|No core pointer\)' "$XLOG" 2> /dev/null ; then
fi
-#
-# If we don't have an X configurator we abort right now
-#
-
# we require 'gdmopen', to open a console, because we really dont
# have one. Perhaps someone should try to figure out some shell
# black magic to get this to work on other then linux systems
diff --git a/daemon/misc.c b/daemon/misc.c
index 4a1b1aff..0ce8c2a6 100644
--- a/daemon/misc.c
+++ b/daemon/misc.c
@@ -443,10 +443,12 @@ gdm_text_message_dialog (const char *msg)
TRUE /* de_setuid */) < 0) {
g_free (dialog);
g_free (msg_quoted);
+ g_free (argv[4]);
return FALSE;
}
g_free (dialog);
+ g_free (argv[4]);
} else {
char *argv[6];
@@ -462,11 +464,11 @@ gdm_text_message_dialog (const char *msg)
if (gdm_exec_wait (argv, TRUE /* no display */,
TRUE /* de_setuid */) < 0) {
- g_free (argv[3]);
+ g_free (argv[4]);
g_free (msg_quoted);
return FALSE;
}
- g_free (argv[3]);
+ g_free (argv[4]);
}
g_free (msg_quoted);
return TRUE;
@@ -511,6 +513,7 @@ gdm_text_yesno_dialog (const char *msg, gboolean *ret)
retint = gdm_exec_wait (argv, TRUE /* no display */,
TRUE /* de_setuid */);
if (retint < 0) {
+ g_free (argv[4]);
g_free (dialog);
g_free (msg_quoted);
return FALSE;
@@ -521,6 +524,7 @@ gdm_text_yesno_dialog (const char *msg, gboolean *ret)
g_free (dialog);
g_free (msg_quoted);
+ g_free (argv[4]);
return TRUE;
} else {
@@ -554,11 +558,11 @@ gdm_text_yesno_dialog (const char *msg, gboolean *ret)
if (gdm_exec_wait (argv, TRUE /* no display */,
TRUE /* de_setuid */) < 0) {
- g_free (argv[3]);
+ g_free (argv[4]);
g_free (msg_quoted);
return FALSE;
}
- g_free (argv[3]);
+ g_free (argv[4]);
if (ret != NULL) {
fp = fopen (tempname, "r");
@@ -1624,7 +1628,6 @@ gdm_sleep_no_signal (int secs)
while (secs > 0) {
struct timeval tv;
- /* Wait 30 seconds. */
tv.tv_sec = secs;
tv.tv_usec = 0;
select (0, NULL, NULL, NULL, &tv);
diff --git a/daemon/slave.c b/daemon/slave.c
index 93e47483..4a3cd4db 100644
--- a/daemon/slave.c
+++ b/daemon/slave.c
@@ -2859,6 +2859,9 @@ session_child_run (struct passwd *pwent,
ve_setenv ("LANG", language, TRUE);
ve_setenv ("GDM_LANG", language, TRUE);
}
+
+ /* just in case there is some weirdness going on */
+ IGNORE_EINTR (chdir (home_dir));
if (usrcfgok && savesess && home_dir_ok) {
gchar *cfgstr = g_build_filename (home_dir, ".dmrc", NULL);
diff --git a/daemon/verify-pam.c b/daemon/verify-pam.c
index 2622db0d..c6e63c26 100644
--- a/daemon/verify-pam.c
+++ b/daemon/verify-pam.c
@@ -650,8 +650,9 @@ authenticate_again:
/* Register the session */
pamerr = pam_open_session (pamh, 0);
if (pamerr != PAM_SUCCESS) {
- did_setcred = FALSE;
opened_session = FALSE;
+ /* we handle this above */
+ did_setcred = FALSE;
if (gdm_slave_should_complain ())
gdm_error (_("Couldn't open session for %s"), login);
goto pamerr;
diff --git a/gui/gdmlogin.c b/gui/gdmlogin.c
index 03f2ffed..e32b88fa 100644
--- a/gui/gdmlogin.c
+++ b/gui/gdmlogin.c
@@ -3030,6 +3030,9 @@ gdm_login_user_alloc (const gchar *logname, uid_t uid, const gchar *homedir,
if (defface != NULL)
user->picture = (GdkPixbuf *)g_object_ref (G_OBJECT (defface));
+ if (ve_string_empty (logname))
+ return user;
+
/* don't read faces, since that requires the daemon */
if (DOING_GDM_DEVELOPMENT)
return user;
@@ -3219,6 +3222,19 @@ gdm_login_users_init (void)
pwent = getpwent();
while (pwent != NULL) {
+
+ /* FIXME: fix properly, see bug #111830 */
+ if (number_of_users > 50) {
+ user = gdm_login_user_alloc ("",
+ 9999 /*fake uid*/,
+ "/",
+ _("Too many users to list here..."));
+ users = g_list_insert_sorted (users, user,
+ (GCompareFunc) gdm_login_sort_func);
+ /* don't update the size numbers, it's ok if this "user" is
+ offscreen */
+ break;
+ }
if (pwent->pw_shell &&
gdm_login_check_shell (pwent->pw_shell) &&
diff --git a/gui/greeter/greeter.c b/gui/greeter/greeter.c
index bf06aa67..a508fee3 100644
--- a/gui/greeter/greeter.c
+++ b/gui/greeter/greeter.c
@@ -319,7 +319,6 @@ greeter_ctrl_handler (GIOChannel *source,
tmp,
/* avoid warning */ "%s", "");
g_free (tmp);
- gtk_dialog_set_has_separator (GTK_DIALOG (dlg), FALSE);
gdm_wm_center_window (GTK_WINDOW (dlg));
diff --git a/gui/greeter/greeter_item_ulist.c b/gui/greeter/greeter_item_ulist.c
index 1267cdd1..20526ae1 100644
--- a/gui/greeter/greeter_item_ulist.c
+++ b/gui/greeter/greeter_item_ulist.c
@@ -67,6 +67,9 @@ gdm_greeter_user_alloc (const gchar *logname, uid_t uid, const gchar *homedir,
if (defface != NULL)
user->picture = (GdkPixbuf *)g_object_ref (G_OBJECT (defface));
+ if (ve_string_empty (logname))
+ return user;
+
/* don't read faces, since that requires the daemon */
if (DOING_GDM_DEVELOPMENT)
return user;
@@ -265,15 +268,27 @@ gdm_greeter_users_init (void)
pwent = getpwent();
while (pwent != NULL) {
+
+ /* FIXME: fix properly, see bug #111830 */
+ if (number_of_users > 50) {
+ user = gdm_greeter_user_alloc ("",
+ 9999 /*fake uid*/,
+ "/",
+ _("Too many users to list here..."));
+ users = g_list_insert_sorted (users, user,
+ (GCompareFunc) gdm_greeter_sort_func);
+ /* don't update the size numbers */
+ break;
+ }
if (pwent->pw_shell &&
gdm_greeter_check_shell (pwent->pw_shell) &&
!gdm_greeter_check_exclude(pwent)) {
- user = gdm_greeter_user_alloc(pwent->pw_name,
- pwent->pw_uid,
- pwent->pw_dir,
- pwent->pw_gecos);
+ user = gdm_greeter_user_alloc (pwent->pw_name,
+ pwent->pw_uid,
+ pwent->pw_dir,
+ pwent->pw_gecos);
if ((user) && (! g_list_find_custom (users, user,
(GCompareFunc) gdm_greeter_sort_func))) {