Commit 6addcb90 authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

Add two new small sbin utils. gdmopen is like open (based on it) but

Wed Aug 22 23:01:59 2001  George Lebl <jirka@5z.com>

	* configure.in, Makefile.am, utils/gdmopen.c, utils/gdmaskpass.c:
	  Add two new small sbin utils.  gdmopen is like open (based on it)
	  but better suited for gdm.  Exitcode is returned so no temp files
	  are needed.  Process is cleaned up on a signal, the new vt is
	  deallocated after use.  And unlike openvt this thing actually waits
	  for the child.  Gdmaskpass just asks for the root password, for
	  use in the XKeepsCrashing script.  Both of these things will only
	  run as root as I'm too paranoid and it doesn't make sense for
	  them to run otherwise for gdm anyway.

	* configure.in: Fix sbin expansion.

	* daemon/gdm.c, daemon/misc.[ch], daemon/slave.c, daemon/server.c:
	  Use gdmopen to run dialog and add helper functions for doing this.

	* daemon/gdm.h, daemon/slave.c, daemon/server.[ch]:  When a server is
	  busy, ask the user if we want to run it on a new display number
	  or retry.

	* daemon/gdm.c, daemon/misc.c, daemon/slave.c: Make sure to whack
	  any extra helper processes we launch when we are killed so that
	  we don't leave things like 'dialog' processes around

	* daemon/gdm.c, config/XKeepsCrashing:  Use gdmaskpass, ask if
	  the user wants to view X logs if X is crashing.  And use gdmopen
	  in the script and correctly abort with exit 32.  Also make it
	  not use the ugly tempfile stuff (Though a tempfile is still given
	  to the script for now)

	* gdm.spec.in: raise epoch to 1, people abuse this field, and if they
	  do abuse it again and raise it beyond 1, I'll just max it out since
	  it makes package upgrading not work.

	* daemon/slave.c, daemon/verify-(pam|crypt|shadow).c: add
	  /sbin/nologin as a thing to test for for disabled logins in
	  addition to /bin/false and /bin/true (it worked, but this adds a
	  nicer message)

	* daemon/xdmcp.c: fix a warning.

	* gui/gdmflexiserver.desktop.in: kill TryExec here
parent 2ea344ca
Wed Aug 22 23:01:59 2001 George Lebl <jirka@5z.com>
* configure.in, Makefile.am, utils/gdmopen.c, utils/gdmaskpass.c:
Add two new small sbin utils. gdmopen is like open (based on it)
but better suited for gdm. Exitcode is returned so no temp files
are needed. Process is cleaned up on a signal, the new vt is
deallocated after use. And unlike openvt this thing actually waits
for the child. Gdmaskpass just asks for the root password, for
use in the XKeepsCrashing script. Both of these things will only
run as root as I'm too paranoid and it doesn't make sense for
them to run otherwise for gdm anyway.
* configure.in: Fix sbin expansion.
* daemon/gdm.c, daemon/misc.[ch], daemon/slave.c, daemon/server.c:
Use gdmopen to run dialog and add helper functions for doing this.
* daemon/gdm.h, daemon/slave.c, daemon/server.[ch]: When a server is
busy, ask the user if we want to run it on a new display number
or retry.
* daemon/gdm.c, daemon/misc.c, daemon/slave.c: Make sure to whack
any extra helper processes we launch when we are killed so that
we don't leave things like 'dialog' processes around
* daemon/gdm.c, config/XKeepsCrashing: Use gdmaskpass, ask if
the user wants to view X logs if X is crashing. And use gdmopen
in the script and correctly abort with exit 32. Also make it
not use the ugly tempfile stuff (Though a tempfile is still given
to the script for now)
* gdm.spec.in: raise epoch to 1, people abuse this field, and if they
do abuse it again and raise it beyond 1, I'll just max it out since
it makes package upgrading not work.
* daemon/slave.c, daemon/verify-(pam|crypt|shadow).c: add
/sbin/nologin as a thing to test for for disabled logins in
addition to /bin/false and /bin/true (it worked, but this adds a
nicer message)
* daemon/xdmcp.c: fix a warning.
* gui/gdmflexiserver.desktop.in: kill TryExec here
Tue Aug 21 04:42:05 2001 George Lebl <jirka@5z.com>
* gui/gdmconfig.[ch]: Finish the editting of the server definitions.
......
SUBDIRS = config macros pixmaps intl vicious-extensions \
daemon gui docs omf-install po
daemon gui utils docs omf-install po
EXTRA_DIST = \
ChangeLog \
......
......@@ -17,15 +17,11 @@ xsri like logo functionality
the photosetup proggie should be put into some sort of crapplet and there
should be other settings in the crapplet as well.
Added configs, do docs and gdmconfig stuff:
Added configs, do docs:
daemon/StandardXServer
daemon/FlexibleXServers
daemon/Xnest
On busy server start up local server on a free display optionaly
investigate doc building stuff
handle all the XFree86 Xserver error thingies, such as
No "Display" subsection for
etc...
......@@ -12,68 +12,89 @@
# The second argument is a temporary file we can use
#
# $3 = 'Your X server is b0rk I will disable this server'
# $4 = 'Your X server is b0rk would you like to try to reconfigure it?"
# $4 = 'Would you like to try to reconfigure your server?"
# $5 = 'Please type in the root password'
# $6 = 'I will now restart the X server again'
# $7 = 'I will disable this X server'
# $8 = 'Your X server is b0rk, do ya wanna view X logs?'
# there are some env vars defined:
# XLOG = the log file for the X server
# BINDIR = location of gdm binaries
# SBINDIR = location of gdm system binaries
# return values are
# 0 = try again, runs this server again
# 1 = abort this display, removes this server from the list
# 32 = something went very wrong, things will just get logged.
# this means this script didn't work so do alternative things
# to tell the user if possible
# we require "gdmopen", to open a console, because we really don't
# have one. Perhaps someone should try to figure out some shell
# black magic to get this to work on other then linux systems
if test ! -x $SBINDIR/gdmopen ; then
exit 32
fi
# when we run ourselves from the open we will pass a -noopen argument
if test x$1 = x-noopen ; then
shift
shift
else
TEMPFILE="$2"
# we require "open", to open a console, because we really don't
# have one. Perhaps someone should try to figure out some shell
# black magic to get this to work on other then linux systems
if test -x /usr/bin/open ; then
/usr/bin/open -s -w -- $0 -noopen "$@"
if grep TRYAGAIN "$TEMPFILE" >/dev/null ; then
exit 0
else
exit 1
fi
else
exit 1
fi
$SBINDIR/gdmopen $0 -noopen "$@"
exit $?
fi
SETUP=`which $1`
TEMPFILE="$2"
DIALOG=`which dialog`
if test x$DIALOG = x ; then
DIALOG=`which gdialog`
DIALOG=`which gdialog`
fi
if test -x $SBINDIR/gdmaskpass ; then
ASKPASS=$SBINDIR/gdmaskpass
else
ASKPASS=
fi
clear
# Note, dialog required, though this script could be fixed to not require it
# I suppose
if test x = x$SETUP -o x = x$DIALOG -o x = x$TEMPFILE ; then
if test x = x$SETUP -o x = x$DIALOG ; then
echo =======================================================================
echo
cat $XLOG
echo
echo =======================================================================
echo
echo "$3"
echo
echo =======================================================================
read
if test x != x$TEMPFILE ; then
echo ABORT > $TEMPFILE
fi
exit 1
fi
if $DIALOG --yesno "$8" 10 50 ; then
$DIALOG --textbox $XLOG 22 76
fi
if $DIALOG --yesno "$4" 10 50 ; then
clear
echo
echo "$5"
# dirty trick to fool su into asking the root password even if we're
# root
su nobody -c "su -c $SETUP"
if test x$ASKPASS = x ; then
# dirty trick to fool su into asking the root password even if we're
# root
su nobody -c "su -c $SETUP"
else
if $ASKPASS ; then
$SETUP
fi
fi
clear
$DIALOG --msgbox "$6" 8 50
echo TRYAGAIN > $TEMPFILE
exit 0
else
$DIALOG --msgbox "$7" 8 50
echo ABORT > $TEMPFILE
exit 1
fi
......@@ -193,6 +193,13 @@ fi
AC_MSG_CHECKING("for corrupt government")
AC_MSG_RESULT(yes)
dnl ## gdmopen building
dnl There are perhaps others where this works
GDMOPEN=
AC_CHECK_HEADERS(linux/vt.h, [
GDMOPEN=gdmopen])
AC_SUBST(GDMOPEN)
dnl ## Autentication scheme
have_pam=no
VRFY="verify-crypt"
......@@ -205,6 +212,13 @@ if test x$enable_authentication_scheme != xcrypt -a \
AC_DEFINE(HAVE_PAM)])
fi
GDMASKPASS=
if test x$have_pam = xyes ; then
AC_CHECK_HEADERS(security/pam_misc.h, [
GDMASKPASS=gdmaskpass])
fi
AC_SUBST(GDMASKPASS)
if test x$enable_authentication_scheme = xpam -a x$have_pam = xno ; then
AC_MSG_ERROR(PAM support requested but not available)
fi
......@@ -327,7 +341,7 @@ EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
AC_SUBST(EXPANDED_BINDIR)
AC_DEFINE_UNQUOTED(EXPANDED_BINDIR,"$EXPANDED_BINDIR")
SBINDIR_TMP="$bindir"
SBINDIR_TMP="$sbindir"
EXPANDED_SBINDIR=`eval echo $SBINDIR_TMP`
AC_SUBST(EXPANDED_SBINDIR)
AC_DEFINE_UNQUOTED(EXPANDED_SBINDIR,"$EXPANDED_SBINDIR")
......@@ -382,6 +396,7 @@ AC_OUTPUT([
Makefile
daemon/Makefile
gui/Makefile
utils/Makefile
pixmaps/Makefile
macros/Makefile
config/Makefile
......
......@@ -70,6 +70,8 @@ gint flexi_servers = 0; /* Number of flexi servers */
sigset_t sysmask; /* Inherited system signal mask */
uid_t GdmUserId; /* Userid under which gdm should run */
gid_t GdmGroupId; /* Groupid under which gdm should run */
pid_t extra_process = -1; /* An extra process. Used for quickie
processes, so that they also get whacked */
static GdmConnection *fifoconn = NULL; /* Fifo connection */
static GdmConnection *unixconn = NULL; /* UNIX Socket connection */
......@@ -602,6 +604,13 @@ final_cleanup (void)
sigaddset (&mask, SIGCHLD);
sigprocmask (SIG_BLOCK, &mask, NULL);
if (extra_process > 1) {
/* we sigterm extra processes, and we
* don't wait */
kill (extra_process, SIGTERM);
extra_process = -1;
}
list = g_slist_copy (displays);
g_slist_foreach (list, (GFunc) gdm_display_unmanage, NULL);
g_slist_free (list);
......@@ -658,19 +667,25 @@ deal_with_x_crashes (GdmDisplay *d)
if (configurators[i] != NULL) {
strcpy (tempname, "/tmp/gdm-X-failed-XXXXXX");
tempfd = mkstemp (tempname);
close (tempfd);
if (tempfd >= 0) {
close (tempfd);
gdm_info (_("deal_with_x_crashes: Running the "
"XKeepsCrashing script"));
gdm_info (_("deal_with_x_crashes: Running the "
"XKeepsCrashing script"));
pid = fork ();
extra_process = pid = fork ();
} else {
/* no forking, we're screwing this */
pid = -1;
}
} else {
tempfd = -1;
/* no forking, we're screwing this */
pid = -1;
}
if (pid == 0) {
char *argv[9];
char *argv[10];
char *xlog = g_strconcat (GdmLogDir, "/", d->name, ".log", NULL);
argv[0] = GdmXKeepsCrashing;
argv[1] = configurators[i];
......@@ -680,9 +695,7 @@ deal_with_x_crashes (GdmDisplay *d)
"up correctly. You will need to log in on a "
"console and rerun the X configuration "
"program. Then restart GDM.");
argv[4] = _("I cannot start the X server (your graphical "
"interface). It is likely that it is not set "
"up correctly. Would you like me to try to "
argv[4] = _("Would you like me to try to "
"run the X configuration program? Note that "
"you will need the root password for this.");
argv[5] = _("Please type in the root (privilaged user) "
......@@ -691,7 +704,15 @@ deal_with_x_crashes (GdmDisplay *d)
"again.");
argv[7] = _("I will disable this X server for now. "
"Restart GDM when it is configured correctly.");
argv[8] = NULL;
argv[8] = _("I cannot start the X server (your graphical "
"interface). It is likely that it is not set "
"up correctly. Would you like to view the "
"X server output to diagnose the problem?");
argv[9] = NULL;
ve_setenv ("XLOG", xlog, TRUE);
ve_setenv ("BINDIR", EXPANDED_BINDIR, TRUE);
ve_setenv ("SBINDIR", EXPANDED_SBINDIR, TRUE);
execv (argv[0], argv);
......@@ -700,13 +721,16 @@ deal_with_x_crashes (GdmDisplay *d)
} else if (pid > 0) {
int status;
waitpid (pid, &status, 0);
extra_process = -1;
if (WIFEXITED (status) &&
WEXITSTATUS (status) == 0) {
/* Yay, the user wants to try again, so
* here we go */
return TRUE;
} else if (WIFEXITED (status) &&
WEXITSTATUS (status) == 32) {
WEXITSTATUS (status) == 32) {
/* We couldn't run the script, just drop through */
;
} else {
......@@ -726,9 +750,7 @@ deal_with_x_crashes (GdmDisplay *d)
/* if we have "open" we can talk to the user, not as user
* friendly as the above script, but getting there */
if ( ! just_abort &&
access ("/usr/bin/open", X_OK) == 0) {
char *dialog; /* do we have dialog?*/
access (EXPANDED_SBINDIR "/gdmopen", X_OK) == 0) {
/* Shit if we knew what the program was to tell the user,
* the above script would have been defined and we'd run
* it for them */
......@@ -737,29 +759,7 @@ deal_with_x_crashes (GdmDisplay *d)
"up correctly. You will need to log in on a "
"console and rerun the X configuration "
"program. Then restart GDM.");
dialog = gnome_is_program_in_path ("dialog");
if (dialog == NULL)
dialog = gnome_is_program_in_path ("gdialog");
if (dialog != NULL) {
char *command =
g_strdup_printf
("/usr/bin/open -s -w -- /bin/sh -c 'clear ; "
"%s --msgbox \"%s\" 10 70 ; clear'",
dialog,
error);
system (command);
g_free (command);
g_free (dialog);
} else {
char *command =
g_strdup_printf
("/usr/bin/open -s -w -- /bin/sh -c 'clear ; "
"echo \"%s\" 10 70 ; read ; clear'",
error);
system (command);
g_free (command);
}
gdm_text_message_dialog (error);
} /* else {
* At this point .... screw the user, we don't know how to
* talk to him. He's on some 'l33t system anyway, so syslog
......
......@@ -268,6 +268,8 @@ struct _GdmDisplay {
int vt;
#endif
gboolean busy_display;
gboolean console;
time_t last_start_time;
......
......@@ -16,12 +16,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <config.h>
#include "config.h"
#include <gnome.h>
#include <syslog.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
......@@ -41,6 +43,8 @@ extern GSList *displays;
extern char **environ;
extern pid_t extra_process;
/**
* gdm_fail:
......@@ -216,7 +220,8 @@ gdm_get_free_display (int start, int server_uid)
serv_addr.sin_port = htons (6000 + i);
errno = 0;
if (connect (sock, &serv_addr, sizeof (serv_addr)) >= 0 ||
if (connect (sock, (struct sockaddr *)&serv_addr,
sizeof (serv_addr)) >= 0 ||
errno != ECONNREFUSED) {
close (sock);
continue;
......@@ -241,4 +246,187 @@ gdm_get_free_display (int start, int server_uid)
return -1;
}
gboolean
gdm_text_message_dialog (const char *msg)
{
char *dialog; /* do we have dialog?*/
if (access (EXPANDED_SBINDIR "/gdmopen", X_OK) != 0)
return FALSE;
dialog = gnome_is_program_in_path ("dialog");
if (dialog == NULL)
dialog = gnome_is_program_in_path ("gdialog");
if (dialog != NULL) {
char *argv[7];
argv[0] = EXPANDED_SBINDIR "/gdmopen";
argv[1] = dialog;
argv[2] = "--msgbox";
argv[3] = (char *)msg;
argv[4] = "11";
argv[5] = "70";
argv[6] = NULL;
if (gdm_exec_wait (argv) < 0) {
g_free (dialog);
return FALSE;
}
g_free (dialog);
} else {
char *argv[5];
argv[0] = EXPANDED_SBINDIR "/gdmopen";
argv[1] = "/bin/sh";
argv[2] = "-c";
argv[3] = g_strdup_printf
("clear ; "
"echo \"%s\" ; read ; clear",
msg);
argv[4] = NULL;
if (gdm_exec_wait (argv) < 0) {
g_free (argv[3]);
return FALSE;
}
g_free (argv[3]);
}
return TRUE;
}
gboolean
gdm_text_yesno_dialog (const char *msg, gboolean *ret)
{
char *dialog; /* do we have dialog?*/
if (access (EXPANDED_SBINDIR "/gdmopen", X_OK) != 0)
return FALSE;
if (ret != NULL)
*ret = FALSE;
dialog = gnome_is_program_in_path ("dialog");
if (dialog == NULL)
dialog = gnome_is_program_in_path ("gdialog");
if (dialog != NULL) {
char *argv[7];
int retint;
argv[0] = EXPANDED_SBINDIR "/gdmopen";
argv[1] = dialog;
argv[2] = "--yesno";
argv[3] = (char *)msg;
argv[4] = "11";
argv[5] = "70";
argv[6] = NULL;
retint = gdm_exec_wait (argv);
if (retint < 0) {
g_free (dialog);
return FALSE;
}
if (ret != NULL)
*ret = (retint == 0) ? TRUE : FALSE;
g_free (dialog);
return TRUE;
} else {
char tempname[] = "/tmp/gdm-yesno-XXXXXX";
int tempfd;
FILE *fp;
char buf[256];
char *argv[5];
tempfd = mkstemp (tempname);
if (tempfd < 0)
return FALSE;
close (tempfd);
argv[0] = EXPANDED_SBINDIR "/gdmopen";
argv[1] = "/bin/sh";
argv[2] = "-c";
argv[3] = g_strdup_printf
("clear ; "
"echo \"%s\" ; echo ; echo \"%s\" ; "
"read RETURN ; echo $RETURN > %s ; clear'",
msg,
/* Translators, don't translate the 'y' and 'n' */
_("y = Yes or n = No? >"),
tempname);
argv[4] = NULL;
if (gdm_exec_wait (argv) < 0) {
g_free (argv[3]);
return FALSE;
}
g_free (argv[3]);
if (ret != NULL) {
fp = fopen (tempname, "r");
if (fp != NULL) {
if (fgets (buf, sizeof (buf), fp) != NULL &&
(buf[0] == 'y' || buf[0] == 'Y'))
*ret = TRUE;
fclose (fp);
} else {
return FALSE;
}
}
unlink (tempname);
return TRUE;
}
}
int
gdm_exec_wait (char * const *argv)
{
int status;
pid_t pid;
if (argv == NULL ||
argv[0] == NULL ||
access (argv[0], X_OK) != 0)
return -1;
/* Note a fun and unavoidable (also almost
* impossible to happen race. If the parent gets
* whacked before it executes any code, it will
* not whack the child. Oh well. */
extra_process = pid = fork ();
if (pid == 0) {
int i;
for (i = 0; i < sysconf (_SC_OPEN_MAX); i++)
close (i);
/* No error checking here - if it's messed the best response
* is to ignore & try to continue */
open ("/dev/null", O_RDONLY); /* open stdin - fd 0 */
open ("/dev/null", O_RDWR); /* open stdout - fd 1 */
open ("/dev/null", O_RDWR); /* open stderr - fd 2 */
execv (argv[0], argv);
_exit (-1);
}
if (pid < 0)
return -1;
waitpid (pid, &status, 0);
extra_process = -1;
if (WIFEXITED (status))
return WEXITSTATUS (status);
else
return -1;
}
/* EOF */
......@@ -33,6 +33,10 @@ void gdm_clearenv_no_lang (void);
int gdm_get_free_display (int start, int server_uid);
gboolean gdm_text_message_dialog (const char *msg);
gboolean gdm_text_yesno_dialog (const char *msg, gboolean *ret);
int gdm_exec_wait (char * const *argv);
#endif /* GDM_MISC_H */
/* EOF */
......@@ -127,55 +127,37 @@ gdm_server_stop (GdmDisplay *disp)
unlink (disp->authfile);
}
static void
busy_inform_user (GdmDisplay *disp)
static gboolean
busy_ask_user (GdmDisplay *disp)
{
/* if we have "open" we can talk to the user */
if (access ("/usr/bin/open", X_OK) == 0) {
char *dialog; /* do we have dialog?*/
if (access (EXPANDED_SBINDIR "/gdmopen", X_OK) == 0) {
char *error = g_strdup_printf
(_("There already appears to be an X server "
"running on display %s. Please quit this "
"server and then press Enter.%s"),
"running on display %s. Should I try another "
"display number? If you answer no, I will "
"attempt to start the server on %s again.%s"),
disp->name,
disp->name,
#ifdef __linux__
_(" You can change consoles by pressing Ctrl-Alt "
_(" (You can change consoles by pressing Ctrl-Alt "
"plus a function key, such as Ctrl-Alt-F7 to go "
"to console 7. X servers usually run on consoles "
"7 and higher.")
"7 and higher.)")
#else /* ! __linux__ */
/* no info for non linux users */
""
#endif /* __linux__ */
);
dialog = gnome_is_program_in_path ("dialog");
if (dialog == NULL)
dialog = gnome_is_program_in_path ("gdialog");
if (dialog != NULL) {
char *command =
g_strdup_printf
("/usr/bin/open -s -w -- /bin/sh -c 'clear ; "
"%s --msgbox \"%s\" 10 70 ; clear'",
dialog,
error);
system (command);
g_free (command);
g_free (dialog);
} else {
char *command =
g_strdup_printf
("/usr/bin/open -s -w -- /bin/sh -c 'clear ; "
"echo \"%s\" 10 70 ; read ; clear'",
error);
system (command);
g_free (command);
}
gboolean ret = TRUE;
/* default ret to TRUE */
if ( ! gdm_text_yesno_dialog (error, &ret))
ret = TRUE;
g_free (error);
return ret;
} else {
/* If we can't ask, sleep 30 seconds and try again */
gdm_info (_("Sleeping 30 seconds before retrying display %s"),
disp->name);
sleep (30);
/* Well we'll just try another display number */
return TRUE;
}
}
......@@ -276,7 +258,8 @@ display_vt (GdmDisplay *disp)
*/
gboolean
gdm_server_start (GdmDisplay *disp, int min_flexi_disp, int flexi_retries)
gdm_server_start (GdmDisplay *disp, gboolean treat_as_flexi,
int min_flexi_disp, int flexi_retries)
{
struct sigaction usr1, chld, alrm;
struct sigaction old_usr1, old_chld, old_alrm;
......@@ -291,7 +274,8 @@ gdm_server_start (GdmDisplay *disp, int min_flexi_disp, int flexi_retries)
/* if an X server exists, wipe it */
gdm_server_stop (d);
if (SERVER_IS_FLEXI (d)) {
if (SERVER_IS_FLEXI (d) ||
treat_as_flexi) {
flexi_disp = gdm_get_free_display
(MAX (high_display_num + 1, min_flexi_disp) /* start */,
0 /* server uid */);
......@@ -432,25 +416,37 @@ gdm_server_start (GdmDisplay *disp, int min_flexi_disp, int flexi_retries)
* this we'll exit with DISPLAY_REMANAGE to try again if the
* user wants to, or abort this display */
if (display_busy (disp)) {
if (SERVER_IS_FLEXI (disp)) {
if (SERVER_IS_FLEXI (disp) ||
treat_as_flexi) {
/* for flexi displays, try again a few times with different
* display numbers */
if (flexi_retries <= 0) {
/* Send X too busy */
gdm_slave_send_num (GDM_SOP_FLEXI_ERR,
4 /* X too busy */);
gdm_error (_("%s: Cannot find a free "
"display number"),
"gdm_server_start");
if (SERVER_IS_FLEXI (disp)) {
gdm_slave_send_num (GDM_SOP_FLEXI_ERR,
4 /* X too busy */);
}
/* eki eki */
_exit (DISPLAY_REMANAGE);
}
return gdm_server_start (d, flexi_disp + 1,
return gdm_server_start (d, treat_as_flexi,
flexi_disp + 1,
flexi_retries - 1);
} else {
/* FIXME: find first free display here above
* high_display_num optionally, and if the user
* has no dialog/gdialog, then just do that
* immediately. Must give an error as well on
* the X server once greeter is up. */
busy_inform_user (disp);
if (busy_ask_user (disp)) {
gdm_error (_("%s: Display %s busy. Trying "
"another display number."),
"gdm_server_start",
d->name);
d->busy_display = TRUE;
return gdm_server_start (d,
TRUE /* treat as flexi */,
high_display_num + 1,
flexi_retries - 1);
}
_exit (DISPLAY_REMANAGE);
}
}
......
......@@ -22,6 +22,7 @@
#include "gdm.h"
gboolean gdm_server_start (GdmDisplay *d,
gboolean treat_as_flexi,