summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2006-06-27 01:25:40 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2006-06-27 01:25:40 +0000
commit6329bf48b0f775335e552967622bf53912131edb (patch)
treea9be1138f850ad1f4c33628aaec674e05f74091a
parent6bf94d0ed871db12e8e5aa48200ce3b548895b8f (diff)
Bugzilla #7318 <https://bugs.freedesktop.org/show_bug.cgi?id=7318> Patch
#6032 <https://bugs.freedesktop.org/attachment.cgi?id=6032> xdm crashes on Hurd because of incongruity in dlfuncs (J.P. Larocque)
-rw-r--r--ChangeLog8
-rw-r--r--greet.h24
-rw-r--r--greeter/greet.c10
3 files changed, 31 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 733a5a2..74de196 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2006-06-26 Alan Coopersmith <alan.coopersmith@sun.com>
+ * greet.h:
+ * greeter/greet.c:
+ Bugzilla #7318 <https://bugs.freedesktop.org/show_bug.cgi?id=7318>
+ Patch #6032 <https://bugs.freedesktop.org/attachment.cgi?id=6032>
+ xdm crashes on Hurd because of incongruity in dlfuncs (J.P. Larocque)
+
+2006-06-26 Alan Coopersmith <alan.coopersmith@sun.com>
+
* access.c:
* chooser.c:
* xdmcp.c:
diff --git a/greet.h b/greet.h
index ca0d882..3854328 100644
--- a/greet.h
+++ b/greet.h
@@ -78,10 +78,12 @@ struct dlfuncs {
void (*_endgrent)(void); /* no longer used */
#ifdef USESHADOW
struct spwd *(*_getspnam)(GETSPNAM_ARGS);
+# ifndef QNX4
void (*_endspent)(void);
+# endif /* QNX4 doesn't use endspent */
#endif
struct passwd *(*_getpwnam)(GETPWNAM_ARGS);
-#ifdef linux
+#if defined(linux) || defined(__GLIBC__)
void (*_endpwent)(void);
#endif
char *(*_crypt)(CRYPT_ARGS);
@@ -160,10 +162,12 @@ extern struct group *(*__xdm_getgrent)(void);
extern void (*__xdm_endgrent)(void);
#ifdef USESHADOW
extern struct spwd *(*__xdm_getspnam)(GETSPNAM_ARGS);
+# ifndef QNX4
extern void (*__xdm_endspent)(void);
+# endif /* QNX4 doesn't use endspent */
#endif
extern struct passwd *(*__xdm_getpwnam)(GETPWNAM_ARGS);
-#ifdef linux
+#if defined(linux) || defined(__GLIBC__)
extern void (*__xdm_endpwent)(void);
#endif
extern char *(*__xdm_crypt)(CRYPT_ARGS);
@@ -199,14 +203,18 @@ extern pam_handle_t **(*__xdm_thepamhp)(void);
#define getgrent (*__xdm_getgrent)
#define endgrent (*__xdm_endgrent)
#ifdef USESHADOW
-#define getspnam (*__xdm_getspnam)
-#define endspent (*__xdm_endspent)
-#endif
-#ifdef linux
-#define endpwent (*__xdm_endpwent)
+# define getspnam (*__xdm_getspnam)
+# ifndef QNX4
+# define endspent (*__xdm_endspent)
+# endif /* QNX4 doesn't use endspent */
#endif
#define getpwnam (*__xdm_getpwnam)
+#if defined(linux) || defined(__GLIBC__)
+# define endpwent (*__xdm_endpwent)
+#endif
#define crypt (*__xdm_crypt)
-#define thepamhp (*__xdm_thepamhp)
+#ifdef USE_PAM
+# define thepamhp (*__xdm_thepamhp)
+#endif
#endif /* GREET_LIB */
diff --git a/greeter/greet.c b/greeter/greet.c
index 7c12cfc..0c824bd 100644
--- a/greeter/greet.c
+++ b/greeter/greet.c
@@ -1,5 +1,5 @@
/* $Xorg: greet.c,v 1.4 2001/02/09 02:05:41 xorgcvs Exp $ */
-/* $XdotOrg: app/xdm/greeter/greet.c,v 1.4 2006/06/03 00:05:24 alanc Exp $ */
+/* $XdotOrg: app/xdm/greeter/greet.c,v 1.5 2006/06/03 01:13:44 alanc Exp $ */
/*
Copyright 1988, 1998 The Open Group
@@ -121,10 +121,12 @@ struct group *(*__xdm_getgrent)(void) = NULL;
void (*__xdm_endgrent)(void) = NULL;
#ifdef USESHADOW
struct spwd *(*__xdm_getspnam)(GETSPNAM_ARGS) = NULL;
+# ifndef QNX4
void (*__xdm_endspent)(void) = NULL;
+# endif /* QNX4 doesn't use endspent */
#endif
struct passwd *(*__xdm_getpwnam)(GETPWNAM_ARGS) = NULL;
-#ifdef linux
+#if defined(linux) || defined(__GLIBC__)
void (*__xdm_endpwent)(void) = NULL;
#endif
char *(*__xdm_crypt)(CRYPT_ARGS) = NULL;
@@ -458,10 +460,12 @@ greet_user_rtn GreetUser(
__xdm_endgrent = dlfuncs->_endgrent;
#ifdef USESHADOW
__xdm_getspnam = dlfuncs->_getspnam;
+# ifndef QNX4
__xdm_endspent = dlfuncs->_endspent;
+# endif /* QNX4 doesn't use endspent */
#endif
__xdm_getpwnam = dlfuncs->_getpwnam;
-#ifdef linux
+#if defined(linux) || defined(__GLIBC__)
__xdm_endpwent = dlfuncs->_endpwent;
#endif
__xdm_crypt = dlfuncs->_crypt;