Commit d826466c authored by William Jon McCann's avatar William Jon McCann Committed by William Jon McCann

Some Solaris build fixes. Patch from Brian Cameron <brian.cameron@sun.com>

2007-08-21  William Jon McCann  <mccann@jhu.edu>

	* acconfig.h:
	* acinclude.m4:
	* common/gdm-address.c:
	* configure.ac:
	* daemon/Makefile.am:
	* daemon/factory-slave-main.c:
	* daemon/gdm-server.c: (server_child_setup):
	* daemon/main.c: (main):
	* daemon/product-slave-main.c:
	* daemon/session-worker-main.c:
	* daemon/simple-slave-main.c:
	* daemon/test-session.c: (on_secret_info_query):
	Some Solaris build fixes.
	Patch from Brian Cameron <brian.cameron@sun.com>


svn path=/branches/mccann-gobject/; revision=5174
parent 9d0888fe
2007-08-21 William Jon McCann <mccann@jhu.edu>
* acconfig.h:
* acinclude.m4:
* common/gdm-address.c:
* configure.ac:
* daemon/Makefile.am:
* daemon/factory-slave-main.c:
* daemon/gdm-server.c: (server_child_setup):
* daemon/main.c: (main):
* daemon/product-slave-main.c:
* daemon/session-worker-main.c:
* daemon/simple-slave-main.c:
* daemon/test-session.c: (on_secret_info_query):
Some Solaris build fixes.
Patch from Brian Cameron <brian.cameron@sun.com>
2007-08-03 William Jon McCann <mccann@jhu.edu>
* daemon/gdm-display-factory.c: (gdm_display_factory_start),
......
......@@ -37,6 +37,7 @@
#undef HAVE_SYS_SOCKIO_H
#undef HAVE_TCPWRAPPERS
#undef HAVE_UNSETENV
#undef HAVE_UT_SYSLEN
#undef HAVE_XINERAMA
#undef HAVE_XFREE_XINERAMA
#undef HAVE_XINPUT
......
......@@ -41,3 +41,248 @@ AC_DEFUN([AS_AC_EXPAND],
prefix=$prefix_save
exec_prefix=$exec_prefix_save
])
dnl Checks for availability of various utmp fields
dnl
dnl Original code by Bernhard Rosenkraenzer (bero@linux.net.eu.org), 1998.
dnl Modifications by Timur Bakeyev (timur@gnu.org), 1999.
dnl Patched from http://bugzilla.gnome.org/show_bug.cgi?id=937
dnl
dnl GDM_CHECK_UTMP()
dnl Test for presence of the field and define HAVE_UT_UT_field macro
dnl Taken from vte/gnome-pty-helper's GPH_CHECK_UTMP
AC_DEFUN([GDM_CHECK_UTMP],[
AC_CHECK_HEADERS(sys/time.h utmp.h utmpx.h)
AC_HEADER_TIME
if test "$ac_cv_header_utmpx_h" = "yes"; then
AC_DEFINE(UTMP,[struct utmpx],[Define to the name of a structure which holds utmp data.])
else
AC_DEFINE(UTMP,[struct utmp],[Define to the name of a structure which holds utmp data.])
fi
dnl some systems (BSD4.4-like) require time.h to be included before utmp.h :/
AC_MSG_CHECKING(for ut_host field in the utmp structure)
AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif],[UTMP ut; char *p; p=ut.ut_host;],result=yes,result=no)
if test "$result" = "yes"; then
AC_DEFINE(HAVE_UT_UT_HOST,1,[Define if your utmp struct contains a ut_host field.])
fi
AC_MSG_RESULT($result)
AC_MSG_CHECKING(for ut_pid field in the utmp structure)
AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif],[UTMP ut; int i; i=ut.ut_pid;],result=yes,result=no)
if test "$result" = "yes"; then
AC_DEFINE(HAVE_UT_UT_PID,1,[Define if your utmp struct contains a ut_pid field.])
fi
AC_MSG_RESULT($result)
AC_MSG_CHECKING(for ut_id field in the utmp structure)
AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif],[UTMP ut; char *p; p=ut.ut_id;],result=yes,result=no)
if test "$result" = "yes"; then
AC_DEFINE(HAVE_UT_UT_ID,1,[Define if your utmp struct contains a ut_id field.])
fi
AC_MSG_RESULT($result)
AC_MSG_CHECKING(for ut_name field in the utmp structure)
AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif],[UTMP ut; char *p; p=ut.ut_name;],result=yes,result=no)
if test "$result" = "yes"; then
AC_DEFINE(HAVE_UT_UT_NAME,1,[Define if your utmp struct contains a ut_name field.])
fi
AC_MSG_RESULT($result)
AC_MSG_CHECKING(for ut_type field in the utmp structure)
AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif],[UTMP ut; int i; i=(int) ut.ut_type;],result=yes,result=no)
if test "$result" = "yes"; then
AC_DEFINE(HAVE_UT_UT_TYPE,1,[Define if your utmp struct contains a ut_type field.])
fi
AC_MSG_RESULT($result)
AC_MSG_CHECKING(for ut_exit.e_termination field in the utmp structure)
AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif],[UTMP ut; ut.ut_exit.e_termination=0;],result=yes,result=no)
if test "$result" = "yes"; then
AC_DEFINE(HAVE_UT_UT_EXIT_E_TERMINATION,1,[Define if your utmp struct contains a ut_exit.e_termination field.])
fi
AC_MSG_RESULT($result)
AC_MSG_CHECKING(for ut_user field in the utmp structure)
AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif],[UTMP ut; char *p; p=ut.ut_user;],result=yes,result=no)
if test "$result" = "yes"; then
AC_DEFINE(HAVE_UT_UT_USER,1,[Define if your utmp struct contains a ut_user field.])
fi
AC_MSG_RESULT($result)
AC_MSG_CHECKING(for ut_time field in the utmp structure)
AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif],[UTMP ut; ut.ut_time=0;],result=yes,result=no)
if test "$result" = "yes"; then
AC_DEFINE(HAVE_UT_UT_TIME,1,[Define if your utmp struct contains a ut_time field.])
fi
AC_MSG_RESULT($result)
AC_MSG_CHECKING(for ut_tv field in the utmp structure)
AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif],[UTMP ut; ut.ut_tv.tv_sec=0; ut.ut_tv.tv_usec=0; ],result=yes,result=no)
if test "$result" = "yes"; then
AC_DEFINE(HAVE_UT_UT_TV,1,[Define if your utmp struct contains a ut_tv field.])
fi
AC_MSG_RESULT($result)
AC_MSG_CHECKING(for ut_syslen field in the utmp structure)
AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif],[UTMP ut; ut.ut_syslen=0;],result=yes,result=no)
if test "$result" = "yes"; then
AC_DEFINE(HAVE_UT_UT_SYSLEN,1,[Define if your utmp struct contains a ut_syslen field.])
fi
AC_MSG_RESULT($result)
])
......@@ -26,6 +26,10 @@
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#ifdef HAS_SYS_SOCKET
#include <sys/socket.h>
#endif
#include <netdb.h>
#ifndef G_OS_WIN32
#include <sys/socket.h>
......
......@@ -245,6 +245,7 @@ dnl ## internationalization support
AM_GLIB_GNU_GETTEXT
EXTRA_DAEMON_LIBS=""
EXTRA_SLAVE_LIBS=""
EXTRA_CHOOSER_LIBS=""
EXTRA_XNEST_LIBS=""
EXTRA_FLEXI_LIBS=""
......@@ -255,6 +256,7 @@ EXTRA_GREETER_LIBS=""
AC_CHECK_FUNC(socket,,[
AC_CHECK_LIB(socket,socket, [
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lsocket"
EXTRA_SLAVE_LIBS="$EXTRA_SLAVE_LIBS -lsocket"
EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lsocket"
EXTRA_XNEST_LIBS="$EXTRA_XNEST_LIBS -lsocket"
EXTRA_FLEXI_LIBS="$EXTRA_FLEXI_LIBS -lsocket"
......@@ -263,6 +265,7 @@ AC_CHECK_FUNC(socket,,[
AC_CHECK_FUNC(gethostbyname,,[
AC_CHECK_LIB(nsl,gethostbyname, [
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lnsl"
EXTRA_SLAVE_LIBS="$EXTRA_SLAVE_LIBS -lnsl"
EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lnsl"])])
AC_CHECK_FUNC(sched_yield,[
AC_DEFINE(HAVE_SCHED_YIELD)],[
......@@ -274,6 +277,20 @@ AC_CHECK_FUNC(inet_aton,,[
AC_CHECK_LIB(resolv,inet_aton, [
EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lresolv"])])
AC_MSG_CHECKING(if utmpx structure has ut_syslen field)
AC_TRY_COMPILE([
#include <utmpx.h>],[
struct utmpx record;
record.ut_syslen = sizeof (record.ut_host);
],
have_ut_syslen=yes,
have_ut_syslen=no
)
if test x$have_ut_syslen = xyes; then
AC_DEFINE(HAVE_UT_SYSLEN)
fi
AC_MSG_RESULT($have_ut_syslen)
COMMON_GNOME_LIBS="libgdmcommon-ui.a"
AC_SUBST(COMMON_GNOME_LIBS)
......@@ -441,6 +458,14 @@ AC_CHECK_HEADERS(sys/sockio.h, [
AC_CHECK_HEADERS(libgen.h, [
AC_DEFINE(HAVE_LIBGEN_H)])
#
# Check for utmp stuff
#
AC_CHECK_HEADERS(utmp.h utmpx.h libutil.h sys/param.h)
AC_CHECK_FUNC(getutmpx updwtmpx)
AC_CHECK_LIB(util,login)
AC_CHECK_LIB(util,logout)
GDM_CHECK_UTMP
#
# Xdmcp checking
......@@ -940,6 +965,7 @@ AC_CHECK_LIB(secdb, chkauthattr, [
# Subst the extra libs
#
AC_SUBST(EXTRA_DAEMON_LIBS)
AC_SUBST(EXTRA_SLAVE_LIBS)
AC_SUBST(EXTRA_CHOOSER_LIBS)
AC_SUBST(EXTRA_XNEST_LIBS)
AC_SUBST(EXTRA_FLEXI_LIBS)
......
......@@ -113,6 +113,7 @@ gdm_simple_slave_SOURCES = \
$(NULL)
gdm_simple_slave_LDFLAGS = \
$(EXTRA_SLAVE_LIBS) \
$(PAM_LIBS) \
$(NULL)
......@@ -191,6 +192,7 @@ gdm_product_slave_SOURCES = \
$(NULL)
gdm_product_slave_LDFLAGS = \
$(EXTRA_SLAVE_LIBS) \
$(PAM_LIBS) \
$(NULL)
......
......@@ -29,6 +29,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <signal.h>
#include <locale.h>
#include <glib.h>
#include <glib/gi18n.h>
......
......@@ -31,6 +31,7 @@
#include <ctype.h>
#include <pwd.h>
#include <grp.h>
#include <signal.h>
#include <glib.h>
#include <glib/gi18n.h>
......@@ -461,16 +462,6 @@ server_child_setup (GdmServer *server)
setpgid (0, 0);
change_user (server);
#if sun
{
/* Remove old communication pipe, if present */
char old_pipe[MAXPATHLEN];
sprintf (old_pipe, "%s/%d", SDTLOGIN_DIR, server->priv->display_name);
g_unlink (old_pipe);
}
#endif
}
static void
......
......@@ -639,11 +639,6 @@ main (int argc,
g_chdir (AUTHDIR);
#ifdef __sun
g_unlink (SDTLOGIN_DIR);
g_mkdir (SDTLOGIN_DIR, 0700);
#endif
manager = gdm_manager_new ();
if (manager == NULL) {
......
......@@ -29,6 +29,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <signal.h>
#include <locale.h>
#include <glib.h>
#include <glib/gi18n.h>
......
......@@ -29,6 +29,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <signal.h>
#include <locale.h>
#include <glib.h>
#include <glib/gi18n.h>
......
......@@ -29,6 +29,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <signal.h>
#include <locale.h>
#include <glib.h>
#include <glib/gi18n.h>
......
......@@ -145,7 +145,11 @@ on_secret_info_query (GdmSession *session,
const char *query_text)
{
char answer[1024];
#ifdef __sun
struct termios io_info;
#else
struct termio io_info;
#endif
g_print ("%s", query_text);
......
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