Module Name:    xsrc
Committed By:   mrg
Date:           Fri May 21 04:59:52 UTC 2010

Modified Files:
        xsrc/external/mit/xdm/dist/config: Xstartup.cpp
        xsrc/external/mit/xdm/dist/greeter: greet.c
Removed Files:
        xsrc/external/mit/xdm/dist: NEWS acinclude.m4

Log Message:
merge xdm 1.1.10


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/xdm/dist/NEWS
cvs rdiff -u -r1.1.1.2 -r0 xsrc/external/mit/xdm/dist/acinclude.m4
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xdm/dist/config/Xstartup.cpp
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xdm/dist/greeter/greet.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xdm/dist/config/Xstartup.cpp
diff -u xsrc/external/mit/xdm/dist/config/Xstartup.cpp:1.2 xsrc/external/mit/xdm/dist/config/Xstartup.cpp:1.3
--- xsrc/external/mit/xdm/dist/config/Xstartup.cpp:1.2	Fri Mar 13 08:34:19 2009
+++ xsrc/external/mit/xdm/dist/config/Xstartup.cpp	Fri May 21 04:59:52 2010
@@ -1,5 +1,5 @@
 XCOMM!/bin/sh
 XCOMM Register a login (derived from GiveConsole as follows:)
 XCOMM
-BINDIR/sessreg  -a -w "/var/log/wtmp" -u "/var/run/utmp" \
+exec BINDIR/sessreg  -a -w WTMP_FILE -u UTMP_FILE \
 	-x XDMCONFIGDIR/Xservers -l $DISPLAY -h "" $USER

Index: xsrc/external/mit/xdm/dist/greeter/greet.c
diff -u xsrc/external/mit/xdm/dist/greeter/greet.c:1.3 xsrc/external/mit/xdm/dist/greeter/greet.c:1.4
--- xsrc/external/mit/xdm/dist/greeter/greet.c:1.3	Mon Nov  9 07:12:59 2009
+++ xsrc/external/mit/xdm/dist/greeter/greet.c	Fri May 21 04:59:52 2010
@@ -25,32 +25,27 @@
 from The Open Group.
 
 */
-/* Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+/*
+ * Copyright © 2006 Sun Microsystems, Inc.  All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, and/or sell copies of the Software, and to permit persons
- * to whom the Software is furnished to do so, provided that the above
- * copyright notice(s) and this permission notice appear in all copies of
- * the Software and that both the above copyright notice(s) and this
- * permission notice appear in supporting documentation.
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
  *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
- * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
- * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
- * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
  *
- * Except as contained in this notice, the name of a copyright holder
- * shall not be used in advertising or otherwise to promote the sale, use
- * or other dealings in this Software without prior written authorization
- * of the copyright holder.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
  */
 
 
@@ -78,7 +73,7 @@
 #include "dm.h"
 #include "dm_error.h"
 #include "greet.h"
-#include "Login.h"
+#include "LoginP.h"
 
 #if defined(HAVE_OPENLOG) && defined(HAVE_SYSLOG_H)
 # define USE_SYSLOG
@@ -347,6 +342,8 @@
 	XSetAccessControl (dpy, DisableAccess);
     }
     XtDestroyWidget (toplevel);
+    toplevel = NULL;
+    login = NULL; /* child of toplevel, which we just destroyed */
     ClearCloseOnFork (XConnectionNumber (dpy));
     XCloseDisplay (dpy);
     Debug ("Greet connection closed\n");
@@ -415,9 +412,14 @@
 FailedLogin (struct display *d, struct greet_info *greet)
 {
 #ifdef USE_SYSLOG
+    const char *username = greet->name;
+
+    if (username == NULL)
+	username = "username unavailable";
+
     syslog(LOG_AUTHPRIV|LOG_NOTICE,
 	   "LOGIN FAILURE ON %s, %s",
-	   d->name, greet->name);
+	   d->name, username);
 #endif
     DrawFail (login);
 #ifndef USE_PAM
@@ -489,9 +491,6 @@
 	LogError ("Cannot reopen display %s for greet window\n", d->name);
 	exit (RESERVER_DISPLAY);
     }
-#ifdef USE_SYSLOG
-    openlog("xdm", LOG_ODELAY|LOG_PID, LOG_AUTHPRIV);
-#endif
 
     for (;;) {
 #ifdef USE_PAM
@@ -503,13 +502,13 @@
 	struct myconv_data pcd		= { d, greet, NULL };
 	struct pam_conv   pc 		= { pamconv, &pcd };
 	const char *	  pam_fname;
-	char *		  username;
+	char *		  username	= NULL;
 	const char *	  login_prompt;
 
 
-	SetPrompt(login, 0, NULL, LOGIN_PROMPT_NOT_SHOWN, False);
+	SetPrompt(login, LOGIN_PROMPT_USERNAME, NULL, LOGIN_PROMPT_NOT_SHOWN, False);
 	login_prompt  = GetPrompt(login, LOGIN_PROMPT_USERNAME);
-	SetPrompt(login, 1, NULL, LOGIN_PROMPT_NOT_SHOWN, False);
+	SetPrompt(login, LOGIN_PROMPT_PASSWORD, NULL, LOGIN_PROMPT_NOT_SHOWN, False);
 
 # define RUN_AND_CHECK_PAM_ERROR(function, args)			\
 	    do { 						\
@@ -710,6 +709,11 @@
     m = (struct pam_message *)*msg;
     r = *response;
 
+    if (login == NULL) {
+	status = PAM_CONV_ERR;
+	goto pam_error;
+    }
+
     for (i = 0; i < num_msg; i++ , m++ , r++) {
 	char *username;
 	int promptId = 0;

Reply via email to