Commit 3c93a08c authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

Fix #118404, we don't need TCP Wrappers if compiling without XDMCP

Mon Jul 28 09:19:38 2003  George Lebl <jirka@5z.com>

	* configure.in: Fix #118404, we don't need TCP Wrappers if compiling
	  without XDMCP

	* gui/gdmlogin.c, gui/greeter/greeter_item_timed.c: Apply patch from
	  Steve Chaplin to fix use of some deprecated functions #118361

	* config/Xsession.in: remove the 'no zenity' message and add an echo
	  when starting the failsafe session, even though in that case it's
	  unlikely there is a .xsession-errors unless something went wrong
parent 2e6913ad
Mon Jul 28 09:19:38 2003 George Lebl <jirka@5z.com>
* configure.in: Fix #118404, we don't need TCP Wrappers if compiling
without XDMCP
* gui/gdmlogin.c, gui/greeter/greeter_item_timed.c: Apply patch from
Steve Chaplin to fix use of some deprecated functions #118361
* config/Xsession.in: remove the 'no zenity' message and add an echo
when starting the failsafe session, even though in that case it's
unlikely there is a .xsession-errors unless something went wrong
Sat Jul 26 21:04:21 2003 Christophe Merlet <redfox@redfoxcenter.org> Sat Jul 26 21:04:21 2003 Christophe Merlet <redfox@redfoxcenter.org>
* gui/gdmphotosetup.desktop.in: Fixed a little typo. * gui/gdmphotosetup.desktop.in: Fixed a little typo.
......
...@@ -50,9 +50,6 @@ gettextfunc () { ...@@ -50,9 +50,6 @@ gettextfunc () {
} }
zenity=`which zenity 2>/dev/null` zenity=`which zenity 2>/dev/null`
if [ -z "$zenity" ] ; then
echo "$0: zenity not found!"
fi
command="$1" command="$1"
...@@ -63,6 +60,8 @@ fi ...@@ -63,6 +60,8 @@ fi
if [ x"$command" = xfailsafe ] ; then if [ x"$command" = xfailsafe ] ; then
if [ -n "$zenity" ] ; then if [ -n "$zenity" ] ; then
$zenity --info --text `gettextfunc "This is the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type 'exit' in the window in the upper left corner"` $zenity --info --text `gettextfunc "This is the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type 'exit' in the window in the upper left corner"`
else
echo "$0: Starting the failsafe xterm session."
fi fi
exec xterm -geometry 80x24+0+0 exec xterm -geometry 80x24+0+0
fi fi
......
...@@ -178,85 +178,6 @@ AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname, [ ...@@ -178,85 +178,6 @@ AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname, [
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lnsl" EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lnsl"
EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lnsl"])]) EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lnsl"])])
# TCP Wrappers for XDMCP access control
if test x$with_tcp_wrappers = xno ; then
echo "TCP wrappers disabled"
else
AC_MSG_CHECKING([whether to use TCP wrappers])
LIBWRAP_PATH=""
for I in $LDFLAGS $LIBS -L/usr/lib; do
case "$I" in
-L*)
THEFILE="`echo $I | sed -e 's,^-L,,'`"
echo "From $I, checking in dir $THEFILE for libwrap.a" 1>&5
if test -f $THEFILE/libwrap.a; then
LIBWRAP_PATH=$THEFILE/libwrap.a
echo "Found $LIBWRAP_PATH" 1>&5
break
fi
esac
done
if test -n "$LIBWRAP_PATH"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if test -n "$LIBWRAP_PATH"; then
nm $LIBWRAP_PATH | grep 'T setenv' && LIBWRAP_PATH=""
if test -z "$LIBWRAP_PATH"; then
echo "*********************************************************"
echo " You have a broken TCP wrappers library (setenv included)"
echo " Please get the latest TCP wrappers package from your OS"
echo " vendor, or recompile TCP wrappers to not include a"
echo " setenv() implementation."
echo
echo "Not using TCP wrappers after all."
echo "*********************************************************"
else
AC_DEFINE(HAVE_TCPWRAPPERS)
fi
fi
if test -n "$LIBWRAP_PATH"; then
AC_CHECK_LIB(wrap, hosts_ctl, [
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lwrap"], [
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS $LIBWRAP_PATH"])
fi
dnl find out if we need -lnsl or whatever
LIB_NSL=
if test -n "$LIBWRAP_PATH"; then
AC_MSG_CHECKING(whether -lwrap also requires -lnsl)
ORIG_LIBS="$LIBS"
LIBS="$EXTRA_DAEMON_LIBS $LIBS"
AC_TRY_LINK([
#include <tcpd.h>
int allow_severity, deny_severity;
], [return hosts_access;], ,[
dnl try with -lnsl
OLD_LIBS="$LIBS"
LIBS="$LIBS -lnsl"
AC_TRY_LINK([
#include <tcpd.h>
int allow_severity, deny_severity;
], [return hosts_access;], LIB_NSL="-lnsl",
LIBWRAP_PATH="")
LIBS="$OLD_LIBS"
])
LIBS="$ORIG_LIBS"
if test -n "$LIB_NSL"; then
AC_MSG_RESULT(yes)
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS $LIB_NSL"
else
AC_MSG_RESULT(no)
fi
fi
fi
AC_MSG_CHECKING([for corrupt government])
AC_MSG_RESULT(yes)
dnl ## gdmopen building dnl ## gdmopen building
dnl There are perhaps others where this works dnl There are perhaps others where this works
GDMOPEN= GDMOPEN=
...@@ -366,6 +287,11 @@ if test x$XDMCP_SUPPORT = xyes ; then ...@@ -366,6 +287,11 @@ if test x$XDMCP_SUPPORT = xyes ; then
GDMCHOOSER=gdmchooser GDMCHOOSER=gdmchooser
GDMXNESTCHOOSER=gdmXnestchooser GDMXNESTCHOOSER=gdmXnestchooser
else else
# No need for TCP Wrappers in case XDMCP is disabled
if test x$with_tcp_wrappers != xno ; then
echo "TCP wrappers not needed if XDMCP is not enabled"
fi
with_tcp_wrappers=no
AM_CONDITIONAL(XDMCP_SUPPORT, false) AM_CONDITIONAL(XDMCP_SUPPORT, false)
GDMCHOOSER= GDMCHOOSER=
GDMXNESTCHOOSER= GDMXNESTCHOOSER=
...@@ -373,6 +299,88 @@ fi ...@@ -373,6 +299,88 @@ fi
AC_SUBST(GDMCHOOSER) AC_SUBST(GDMCHOOSER)
AC_SUBST(GDMXNESTCHOOSER) AC_SUBST(GDMXNESTCHOOSER)
#
# TCP Wrappers for XDMCP access control
#
if test x$with_tcp_wrappers = xno ; then
echo "TCP wrappers disabled"
else
AC_MSG_CHECKING([whether to use TCP wrappers])
LIBWRAP_PATH=""
for I in $LDFLAGS $LIBS -L/usr/lib; do
case "$I" in
-L*)
THEFILE="`echo $I | sed -e 's,^-L,,'`"
echo "From $I, checking in dir $THEFILE for libwrap.a" 1>&5
if test -f $THEFILE/libwrap.a; then
LIBWRAP_PATH=$THEFILE/libwrap.a
echo "Found $LIBWRAP_PATH" 1>&5
break
fi
esac
done
if test -n "$LIBWRAP_PATH"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if test -n "$LIBWRAP_PATH"; then
nm $LIBWRAP_PATH | grep 'T setenv' && LIBWRAP_PATH=""
if test -z "$LIBWRAP_PATH"; then
echo "*********************************************************"
echo " You have a broken TCP wrappers library (setenv included)"
echo " Please get the latest TCP wrappers package from your OS"
echo " vendor, or recompile TCP wrappers to not include a"
echo " setenv() implementation."
echo
echo "Not using TCP wrappers after all."
echo "*********************************************************"
else
AC_DEFINE(HAVE_TCPWRAPPERS)
fi
fi
if test -n "$LIBWRAP_PATH"; then
AC_CHECK_LIB(wrap, hosts_ctl, [
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lwrap"], [
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS $LIBWRAP_PATH"])
fi
dnl find out if we need -lnsl or whatever
LIB_NSL=
if test -n "$LIBWRAP_PATH"; then
AC_MSG_CHECKING(whether -lwrap also requires -lnsl)
ORIG_LIBS="$LIBS"
LIBS="$EXTRA_DAEMON_LIBS $LIBS"
AC_TRY_LINK([
#include <tcpd.h>
int allow_severity, deny_severity;
], [return hosts_access;], ,[
dnl try with -lnsl
OLD_LIBS="$LIBS"
LIBS="$LIBS -lnsl"
AC_TRY_LINK([
#include <tcpd.h>
int allow_severity, deny_severity;
], [return hosts_access;], LIB_NSL="-lnsl",
LIBWRAP_PATH="")
LIBS="$OLD_LIBS"
])
LIBS="$ORIG_LIBS"
if test -n "$LIB_NSL"; then
AC_MSG_RESULT(yes)
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS $LIB_NSL"
else
AC_MSG_RESULT(no)
fi
fi
fi
AC_MSG_CHECKING([for corrupt government])
AC_MSG_RESULT(yes)
# #
# X11 Xinerama extension # X11 Xinerama extension
# #
...@@ -644,7 +652,7 @@ dnl <= Authentication scheme => ...@@ -644,7 +652,7 @@ dnl <= Authentication scheme =>
echo "Authentication scheme : $VRFY" echo "Authentication scheme : $VRFY"
dnl <= Utils built => dnl <= Utils built =>
echo "Utilities built : "`echo $GDMOPEN $GDMASKPASS` echo "Extra utilities built : "`echo $GDMOPEN $GDMASKPASS`
echo "" echo ""
dnl <= End of configuration summary => dnl <= End of configuration summary =>
......
...@@ -1045,7 +1045,7 @@ evil (const char *user) ...@@ -1045,7 +1045,7 @@ evil (const char *user)
/* do not translate */ /* do not translate */
strcmp (user, "Start Dancing") == 0) { strcmp (user, "Start Dancing") == 0) {
setup_cursor (GDK_UMBRELLA); setup_cursor (GDK_UMBRELLA);
dance_handler = gtk_timeout_add (50, dance, NULL); dance_handler = g_timeout_add (50, dance, NULL);
old_lock = GdmLockPosition; old_lock = GdmLockPosition;
GdmLockPosition = TRUE; GdmLockPosition = TRUE;
gtk_entry_set_text (GTK_ENTRY (entry), ""); gtk_entry_set_text (GTK_ENTRY (entry), "");
...@@ -1054,7 +1054,7 @@ evil (const char *user) ...@@ -1054,7 +1054,7 @@ evil (const char *user)
/* do not translate */ /* do not translate */
strcmp (user, "Stop Dancing") == 0) { strcmp (user, "Stop Dancing") == 0) {
setup_cursor (GDK_LEFT_PTR); setup_cursor (GDK_LEFT_PTR);
gtk_timeout_remove (dance_handler); g_source_remove (dance_handler);
dance_handler = 0; dance_handler = 0;
GdmLockPosition = old_lock; GdmLockPosition = old_lock;
gdm_wm_center_window (GTK_WINDOW (login)); gdm_wm_center_window (GTK_WINDOW (login));
...@@ -1126,7 +1126,7 @@ gdm_login_enter (GtkWidget *entry) ...@@ -1126,7 +1126,7 @@ gdm_login_enter (GtkWidget *entry)
/* clear the err_box */ /* clear the err_box */
if (err_box_clear_handler > 0) if (err_box_clear_handler > 0)
gtk_timeout_remove (err_box_clear_handler); g_source_remove (err_box_clear_handler);
err_box_clear_handler = 0; err_box_clear_handler = 0;
gtk_label_set_text (GTK_LABEL (err_box), ""); gtk_label_set_text (GTK_LABEL (err_box), "");
...@@ -1861,13 +1861,13 @@ gdm_login_ctrl_handler (GIOChannel *source, GIOCondition cond, gint fd) ...@@ -1861,13 +1861,13 @@ gdm_login_ctrl_handler (GIOChannel *source, GIOCondition cond, gint fd)
gtk_label_set_text (GTK_LABEL (err_box), tmp); gtk_label_set_text (GTK_LABEL (err_box), tmp);
g_free (tmp); g_free (tmp);
if (err_box_clear_handler > 0) if (err_box_clear_handler > 0)
gtk_timeout_remove (err_box_clear_handler); g_source_remove (err_box_clear_handler);
if (ve_string_empty (buf)) if (ve_string_empty (buf))
err_box_clear_handler = 0; err_box_clear_handler = 0;
else else
err_box_clear_handler = gtk_timeout_add (30000, err_box_clear_handler = g_timeout_add (30000,
err_box_clear, err_box_clear,
NULL); NULL);
printf ("%c\n", STX); printf ("%c\n", STX);
fflush (stdout); fflush (stdout);
...@@ -1995,7 +1995,7 @@ gdm_login_ctrl_handler (GIOChannel *source, GIOCondition cond, gint fd) ...@@ -1995,7 +1995,7 @@ gdm_login_ctrl_handler (GIOChannel *source, GIOCondition cond, gint fd)
g_io_channel_read_chars (source, buf, PIPE_SIZE-1, &len, NULL); /* Empty */ g_io_channel_read_chars (source, buf, PIPE_SIZE-1, &len, NULL); /* Empty */
if (timed_handler_id != 0) { if (timed_handler_id != 0) {
gtk_timeout_remove (timed_handler_id); g_source_remove (timed_handler_id);
timed_handler_id = 0; timed_handler_id = 0;
} }
...@@ -2070,8 +2070,8 @@ gdm_login_ctrl_handler (GIOChannel *source, GIOCondition cond, gint fd) ...@@ -2070,8 +2070,8 @@ gdm_login_ctrl_handler (GIOChannel *source, GIOCondition cond, gint fd)
! ve_string_empty (GdmTimedLogin) && ! ve_string_empty (GdmTimedLogin) &&
GdmTimedLoginDelay > 0) { GdmTimedLoginDelay > 0) {
curdelay = GdmTimedLoginDelay; curdelay = GdmTimedLoginDelay;
timed_handler_id = gtk_timeout_add (1000, timed_handler_id = g_timeout_add (1000,
gdm_timer, NULL); gdm_timer, NULL);
} }
printf ("%c\n", STX); printf ("%c\n", STX);
fflush (stdout); fflush (stdout);
...@@ -2085,7 +2085,7 @@ gdm_login_ctrl_handler (GIOChannel *source, GIOCondition cond, gint fd) ...@@ -2085,7 +2085,7 @@ gdm_login_ctrl_handler (GIOChannel *source, GIOCondition cond, gint fd)
*/ */
if (timed_handler_id != 0) { if (timed_handler_id != 0) {
gtk_timeout_remove (timed_handler_id); g_source_remove (timed_handler_id);
timed_handler_id = 0; timed_handler_id = 0;
} }
printf ("%c\n", STX); printf ("%c\n", STX);
...@@ -2392,7 +2392,7 @@ update_clock (gpointer data) ...@@ -2392,7 +2392,7 @@ update_clock (gpointer data)
time_til_next_min = 60 - the_tm->tm_sec; time_til_next_min = 60 - the_tm->tm_sec;
time_til_next_min = (time_til_next_min>=0?time_til_next_min:0); time_til_next_min = (time_til_next_min>=0?time_til_next_min:0);
gtk_timeout_add (time_til_next_min*1000, update_clock, NULL); g_timeout_add (time_til_next_min*1000, update_clock, NULL);
return FALSE; return FALSE;
} }
......
...@@ -112,8 +112,8 @@ greeter_item_timed_start (void) ...@@ -112,8 +112,8 @@ greeter_item_timed_start (void)
GdmTimedLoginDelay > 0) GdmTimedLoginDelay > 0)
{ {
greeter_current_delay = GdmTimedLoginDelay; greeter_current_delay = GdmTimedLoginDelay;
timed_handler_id = gtk_timeout_add (1000, timed_handler_id = g_timeout_add (1000,
gdm_timer, NULL); gdm_timer, NULL);
} }
} }
...@@ -122,7 +122,7 @@ greeter_item_timed_stop (void) ...@@ -122,7 +122,7 @@ greeter_item_timed_stop (void)
{ {
if (timed_handler_id != 0) if (timed_handler_id != 0)
{ {
gtk_timeout_remove (timed_handler_id); g_source_remove (timed_handler_id);
timed_handler_id = 0; timed_handler_id = 0;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment