xdm: Changes to 'upstream-unstable'
acinclude.m4 | 37 ++++++++++++++++
config/Xresources.cpp | 33 ++-------------
configure.ac | 30 ++++++++++---
greeter/Login.c | 84 +++++++++++++++-----------------------
greeter/Login.h | 40 +++++++++++-------
greeter/LoginP.h | 14 ++----
policy.c | 3 -
session.c | 4 +
xdm.man.cpp | 109 +++++++++++++++++++++++++++++++++++++++++---------
9 files changed, 226 insertions(+), 128 deletions(-)
New commits:
commit ef1be3254966018fede7c33dea2f41b9351ef699
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Aug 10 10:43:10 2007 -0700
Version bump: 1.1.5
diff --git a/configure.ac b/configure.ac
index 069a3a8..ec2debd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@ dnl Process this file with autoconf to create configure.
dnl $XdotOrg: app/xdm/configure.ac,v 1.42 2006/06/03 01:01:21 alanc Exp $
AC_PREREQ([2.57])
-AC_INIT(xdm,[1.1.4],[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xdm)
+AC_INIT(xdm,[1.1.5],[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xdm)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
commit 3ed70d13a6957c2434753f32d388888eae079d82
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Wed Jul 25 17:07:33 2007 -0700
Update AC_DEFINE_DIR to autoconf-2.60-compatible version
diff --git a/acinclude.m4 b/acinclude.m4
index 0654ed5..f3d8734 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,14 +1,47 @@
-dnl From http://autoconf-archive.cryp.to/ac_define_dir.html.
+##### http://autoconf-archive.cryp.to/ac_define_dir.html
+#
+# SYNOPSIS
+#
+# AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+#
+# DESCRIPTION
+#
+# This macro sets VARNAME to the expansion of the DIR variable,
+# taking care of fixing up ${prefix} and such.
+#
+# VARNAME is then offered as both an output variable and a C
+# preprocessor symbol.
+#
+# Example:
+#
+# AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
+#
+# LAST MODIFICATION
+#
+# 2006-10-13
+#
+# COPYLEFT
+#
+# Copyright (c) 2006 Stepan Kasal <kasal@ucw.cz>
+# Copyright (c) 2006 Andreas Schwab <schwab@suse.de>
+# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2006 Alexandre Oliva
+#
+# Copying and distribution of this file, with or without
+# modification, are permitted in any medium without royalty provided
+# the copyright notice and this notice are preserved.
AC_DEFUN([AC_DEFINE_DIR], [
prefix_NONE=
exec_prefix_NONE=
test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
+dnl refers to ${prefix}. Thus we have to use `eval' twice.
eval ac_define_dir="\"[$]$2\""
+ eval ac_define_dir="\"$ac_define_dir\""
AC_SUBST($1, "$ac_define_dir")
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
test "$prefix_NONE" && prefix=NONE
test "$exec_prefix_NONE" && exec_prefix=NONE
])
-
commit dd05076f290b1995f71627324cc74053c870ac21
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Wed Jul 25 17:03:56 2007 -0700
Add AM_PROG_CC_C_O to clear automake-1.10 warning
Makefile.am:149: compiling `chooser.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.ac'
diff --git a/configure.ac b/configure.ac
index 8f69423..069a3a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,7 @@ AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
+AM_PROG_CC_C_O
AC_C_INLINE
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
commit 29dc5825782adf929bce41a18e6a6881ef975d22
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Wed Jul 25 17:00:39 2007 -0700
Bug #10530: xdm's path to xrdb could be configurable at compile time
Add --with-xrdb=path & --with-default-session=command configure options
X.Org Bug #10530: <https://bugs.freedesktop.org/show_bug.cgi?id=10530>
diff --git a/configure.ac b/configure.ac
index 8a4911e..8f69423 100644
--- a/configure.ac
+++ b/configure.ac
@@ -422,11 +422,17 @@ AC_DEFINE_DIR(DEF_SERVER_LINE, DEF_SERVER_LINE,
[Define to default Xserver file entry for local X server])
# -DXRDB_PROGRAM="$(BINDIR)/xrdb"
-AC_DEFINE_DIR(XRDB_PROGRAM, bindir/xrdb,
+AC_ARG_WITH(xrdb, AC_HELP_STRING([--with-xrdb=path],
+ [Use path for xrdb (default: bindir/xrdb)]),
+ [XRDB=$withval], [XRDB=bindir/xrdb])
+AC_DEFINE_DIR(XRDB_PROGRAM, XRDB,
[Define to pathname for xrdb program])
# -DDEF_SESSION="$(BINDIR)/xterm -ls"
-AC_DEFINE_DIR(DEF_SESSION, bindir/xterm -ls,
+AC_ARG_WITH(default-session, AC_HELP_STRING([--with-default-session=command],
+ [Use command for default session (default: bindir/xterm -ls)]),
+ [DEF_SESSION=$withval], [DEF_SESSION="bindir/xterm -ls"])
+AC_DEFINE_DIR(DEF_SESSION, DEF_SESSION,
[Define to default command to start X session])
# -DDEF_USER_PATH="$(DEF_USER_PATH)"
commit 2719e18c3782c5b21f712711b4198a5bb55f5473
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Jun 15 20:14:21 2007 -0700
Set default cursor for entire root window, not just greeter
diff --git a/greeter/Login.c b/greeter/Login.c
index a0b387e..a156762 100644
--- a/greeter/Login.c
+++ b/greeter/Login.c
@@ -1902,7 +1902,7 @@ static void Realize (
#endif
cursor = XCreateFontCursor(XtDisplay(gw), XC_left_ptr);
- XDefineCursor(XtDisplay(gw), XtWindow(gw), cursor);
+ XDefineCursor(XtDisplay(gw), DefaultRootWindow(XtDisplay(gw)), cursor);
#ifdef XPM
/*
commit d0d4581be22aba9021c5a672bd9e5ba719961e29
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Jun 15 19:43:46 2007 -0700
Make #ifdef XPM only control whether XPM pixmap logo is shown
Make 3D look-and-feel independent of XPM
diff --git a/config/Xresources.cpp b/config/Xresources.cpp
index e904591..a98287b 100644
--- a/config/Xresources.cpp
+++ b/config/Xresources.cpp
@@ -22,15 +22,11 @@ xlogin*login.translations: #override BS
<Key>KP_Enter: set-session-argument() finish-field()NLBS
Ctrl<Key>Return: set-session-argument(failsafe) finish-field()NLBS
<Key>Return: set-session-argument() finish-field()
-#ifndef XPM
-xlogin*greeting: CLIENTHOST
-xlogin*namePrompt: login:\040
-#else
+
xlogin*greeting: Welcome to CLIENTHOST
xlogin*namePrompt: \040\040\040\040\040\040\040Login:
-#endif /* XPM */
xlogin*fail: Login incorrect
-#ifdef XPM
+
XHASHif WIDTH > 800
xlogin*greetFont: -adobe-helvetica-bold-o-normal--24-240-75-75-p-138-iso8859-1
xlogin*font: -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1
@@ -40,21 +36,8 @@ xlogin*greetFace: Serif-24:bold:italic
xlogin*face: Helvetica-18
xlogin*promptFace: Helvetica-18:bold
xlogin*failFace: Helvetica-18:bold
-XHASHelse
-xlogin*greetFont: -adobe-helvetica-bold-o-normal--17-120-100-100-p-92-iso8859-1
-xlogin*font: -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
-xlogin*promptFont: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1
-xlogin*failFont: -adobe-helvetica-bold-o-normal--14-140-75-75-p-82-iso8859-1
-xlogin*greetFace: Serif-18:bold:italic
-xlogin*face: Helvetica-12
-xlogin*promptFace: Helvetica-12:bold
-xlogin*failFace: Helvetica-14:bold
-XHASHendif
-#endif /* XPM */
+
XHASHifdef COLOR
-#ifndef XPM
-xlogin*greetColor: CadetBlue
-#else
xlogin*borderWidth: 1
xlogin*frameWidth: 5
xlogin*innerFramesWidth: 2
@@ -63,22 +46,15 @@ xlogin*hiColor: grey90
xlogin*background: grey
!xlogin*foreground: darkgreen
xlogin*greetColor: Blue3
-#endif /* XPM */
xlogin*failColor: red
*Foreground: black
*Background: #fffff0
XHASHelse
-#ifdef XPM
xlogin*borderWidth: 3
xlogin*frameWidth: 0
xlogin*innerFramesWidth: 1
xlogin*shdColor: black
xlogin*hiColor: black
-#else
-xlogin*borderWidth: 3
-xlogin*Foreground: black
-xlogin*Background: white
-#endif /* XPM */
XHASHendif
#ifdef XPM
XHASHif PLANES >= 8
diff --git a/greeter/Login.c b/greeter/Login.c
index 120da8b..a0b387e 100644
--- a/greeter/Login.c
+++ b/greeter/Login.c
@@ -85,9 +85,10 @@ from The Open Group.
#include <X11/Xlib.h>
#include <X11/xpm.h>
#include <X11/extensions/shape.h>
-#include <X11/cursorfont.h>
#endif /* XPM */
+#include <X11/cursorfont.h>
+
#ifdef USE_XINERAMA
#include <X11/extensions/Xinerama.h>
#endif
@@ -135,12 +136,14 @@ static XtResource resources[] = {
offset(failpixel), XtRString, XtDefaultForeground},
#endif
-#ifdef XPM
+#ifdef DANCING
/* added by Caolan McNamara */
{XtNlastEventTime, XtCLastEventTime, XtRInt , sizeof (int),
offset(lastEventTime), XtRImmediate, (XtPointer)0},
/* end (caolan) */
+#endif /* DANCING */
+#ifdef XPM
/* added by Ivan Griffin (ivan.griffin@ul.ie) */
{XtNlogoFileName, XtCLogoFileName, XtRString, sizeof(char*),
offset(logoFileName), XtRImmediate, (XtPointer)0},
@@ -149,7 +152,7 @@ static XtResource resources[] = {
{XtNlogoPadding, XtCLogoPadding, XtRInt, sizeof(int),
offset(logoPadding), XtRImmediate, (XtPointer) 5},
/* end (ivan) */
-
+#endif /* XPM */
/* added by Amit Margalit */
{XtNhiColor, XtCForeground, XtRPixel, sizeof (Pixel),
@@ -163,7 +166,6 @@ static XtResource resources[] = {
{XtNsepWidth, XtCFrameWidth, XtRInt, sizeof(int),
offset(sepwidth), XtRImmediate, (XtPointer) 1},
/* end (amit) */
-#endif /* XPM */
#ifndef USE_XFT
{XtNfont, XtCFont, XtRFontStruct, sizeof (XFontStruct *),
@@ -298,11 +300,8 @@ XmuXftTextWidth(Display *dpy, XftFont *font, FcChar8 *string, int len);
# define STRING_WIDTH(f, s) TEXT_WIDTH (f, s, strlen(s))
-#ifndef XPM
-# define TEXT_PROMPT_W(w, m) STRING_WIDTH(prompt, m)
-#else
+
# define TEXT_PROMPT_W(w, m) (STRING_WIDTH(prompt, m) + w->login.inframeswidth)
-#endif /* XPM */
# define DEF_PROMPT_W(w,n) TEXT_PROMPT_W(w, w->login.prompts[n].defaultPrompt)
# define CUR_PROMPT_W(w,n) (max(MAX_DEF_PROMPT_W(w), PROMPT_TEXT(w,n) ? \
@@ -330,11 +329,8 @@ XmuXftTextWidth(Display *dpy, XftFont *font, FcChar8 *string, int len);
# define PROMPT_W(w) (w->core.width - (2 * TEXT_X_INC(w)))
# define PROMPT_H(w) (3 * Y_INC(w) / 2)
# define VALUE_X(w,n) (PROMPT_X(w) + CUR_PROMPT_W(w,n))
-#ifndef XPM
-# define PROMPT_SPACE_Y(w) (8 * Y_INC(w) / 5)
-#else
# define PROMPT_SPACE_Y(w) (10 * Y_INC(w) / 5)
-#endif /* XPM */
+
# define ERROR_X(w,m) ((int)(w->core.width - STRING_WIDTH (fail, m)) / 2)
# define FAIL_X(w) ERROR_X(w, w->login.fail)
# define FAIL_Y(w) (PROMPT_Y(w,1) + 2 * FAIL_Y_INC (w) + F_ASCENT(fail))
@@ -373,10 +369,10 @@ realizeValue (LoginWidget w, int cursor, int promptNum, GC gc)
height = PROMPT_H(w);
width = PROMPT_W(w) - x - 3;
-#ifdef XPM
height -= (w->login.inframeswidth * 2);
- width -= (w->login.inframeswidth * 2) +
- (w->login.logoWidth + 2*(w->login.logoPadding));
+ width -= (w->login.inframeswidth * 2);
+#ifdef XPM
+ width -= (w->login.logoWidth + 2*(w->login.logoPadding));
#endif
if (cursor > VALUE_SHOW_START(w, promptNum))
curoff = TEXT_WIDTH (text, text, cursor);
@@ -435,11 +431,11 @@ static void
DrawValue (LoginWidget w, int cursor, int promptNum)
{
realizeValue(w, cursor, promptNum, w->login.textGC);
-#ifdef XPM
+#ifdef DANCING
/*as good a place as any Caolan begin*/
w->login.lastEventTime = time(NULL);
/*as good a place as any Caolan end*/
-#endif /* XPM */
+#endif /* DANCING */
}
static void
@@ -482,10 +478,6 @@ realizeCursor (LoginWidget w, GC gc)
break;
}
-#ifndef XPM
- XFillRectangle (XtDisplay (w), XtWindow (w), gc,
- x, y - F_ASCENT(text), width, height);
-#else
XFillRectangle (XtDisplay (w), XtWindow (w), gc,
x, y+1 - F_ASCENT(text), width, height-1);
XDrawPoint (XtDisplay (w), XtWindow (w), gc,
@@ -504,7 +496,6 @@ realizeCursor (LoginWidget w, GC gc)
x-2 , y - F_ASCENT(text)+height);
XDrawPoint (XtDisplay (w), XtWindow (w), gc,
x+2 , y - F_ASCENT(text)+height);
-#endif /* XPM */
#ifdef FORCE_CURSOR_FLASH
/* Force cursor to flash briefly to give user feedback */
@@ -708,14 +699,11 @@ static void
draw_it (LoginWidget w)
{
int p;
-#ifdef XPM
int i;
int gr_line_x, gr_line_y, gr_line_w;
-#endif /* XPM */
EraseCursor (w);
-#ifdef XPM
if( (w->login.outframewidth) < 1 )
w->login.outframewidth = 1;
for(i=1;i<=(w->login.outframewidth);i++)
@@ -731,11 +719,15 @@ draw_it (LoginWidget w)
}
/* make separator line */
- gr_line_x = w->login.outframewidth + w->login.logoPadding;
+ gr_line_x = w->login.outframewidth;
gr_line_y = GREET_Y(w) + GREET_Y_INC(w);
- gr_line_w = w->core.width - 2*(w->login.outframewidth) -
- (w->login.logoWidth + 3*(w->login.logoPadding));
-
+ gr_line_w = w->core.width - 2*(w->login.outframewidth);
+
+#ifdef XPM
+ gr_line_x += w->login.logoPadding;
+ gr_line_w -= w->login.logoWidth + (3 * (w->login.logoPadding));
+#endif /* XPM */
+
for(i=1;i<=(w->login.sepwidth);i++)
{
XDrawLine(XtDisplay (w), XtWindow (w), w->login.shdGC,
@@ -752,11 +744,14 @@ draw_it (LoginWidget w)
int in_frame_y
= PROMPT_Y(w,p) - w->login.inframeswidth - 1 - TEXT_Y_INC(w);
- int in_width = PROMPT_W(w) - VALUE_X(w,p) -
- (w->login.logoWidth + 2*(w->login.logoPadding));
+ int in_width = PROMPT_W(w) - VALUE_X(w,p);
int in_height = PROMPT_H(w) + w->login.inframeswidth + 2;
GC topLeftGC, botRightGC;
+
+#ifdef XPM
+ in_width -= (w->login.logoWidth + 2*(w->login.logoPadding));
+#endif /* XPM */
if ((PROMPT_STATE(w, p) == LOGIN_PROMPT_ECHO_ON) ||
(PROMPT_STATE(w, p) == LOGIN_PROMPT_ECHO_OFF)) {
@@ -787,15 +782,12 @@ draw_it (LoginWidget w)
in_frame_x + in_width-i, in_frame_y + in_height-i);
}
}
-#endif /* XPM */
if (GREETING(w)[0]) {
- int gx;
+ int gx = GREET_X(w);
#ifdef XPM
- gx = GREET_X(w) - ((w->login.logoWidth/2) + w->login.logoPadding);
-#else
- gx = GREET_X(w);
+ gx -= ((w->login.logoWidth/2) + w->login.logoPadding);
#endif
DRAW_STRING (greet, gx, GREET_Y(w), GREETING(w), strlen (GREETING(w)));
}
@@ -1696,8 +1688,6 @@ static void Initialize (
XineramaScreenInfo *screens;
int s_num;
#endif
-
-#ifdef XPM
int rv = 0;
myXGCV.foreground = w->login.hipixel;
@@ -1709,7 +1699,6 @@ static void Initialize (
myXGCV.background = w->core.background_pixel;
valuemask = GCForeground | GCBackground;
w->login.shdGC = XtGetGC(gnew, valuemask, &myXGCV);
-#endif /* XPM */
myXGCV.foreground = TEXT_COLOR(text);
myXGCV.background = w->core.background_pixel;
@@ -1898,10 +1887,9 @@ static void Realize (
XtValueMask *valueMask,
XSetWindowAttributes *attrs)
{
-#ifdef XPM
LoginWidget w = (LoginWidget) gw;
Cursor cursor;
-#endif /* XPM */
+
XtCreateWindow( gw, (unsigned)InputOutput, (Visual *)CopyFromParent,
*valueMask, attrs );
InitI18N(gw);
@@ -1913,10 +1901,10 @@ static void Realize (
#endif
-#ifdef XPM
cursor = XCreateFontCursor(XtDisplay(gw), XC_left_ptr);
XDefineCursor(XtDisplay(gw), XtWindow(gw), cursor);
+#ifdef XPM
/*
* Check if Pixmap was valid
*/
@@ -1990,10 +1978,10 @@ static void Destroy (Widget gw)
XtReleaseGC(gw, w->login.greetGC);
XtReleaseGC(gw, w->login.failGC);
#endif
-#ifdef XPM
XtReleaseGC(gw, w->login.hiGC);
XtReleaseGC(gw, w->login.shdGC);
+#ifdef XPM
if (True == w->login.logoValid)
{
if (w->login.logoPixmap != 0)
@@ -2101,11 +2089,7 @@ LoginClassRec loginClassRec = {
/* expose */ Redisplay,
/* set_values */ SetValues,
/* set_values_hook */ NULL,
-#ifndef XPM
- /* set_values_almost */ NULL,
-#else
/* set_values_almost */ XtInheritSetValuesAlmost,
-#endif /* XPM */
/* get_values_hook */ NULL,
/* accept_focus */ NULL,
/* version */ XtVersion,
diff --git a/greeter/Login.h b/greeter/Login.h
index 13484fe..68664bc 100644
--- a/greeter/Login.h
+++ b/greeter/Login.h
@@ -114,29 +114,30 @@ from The Open Group.
# define XtRXftFont "XftFont"
# define XtRXftColor "XftColor"
-#ifdef XPM
/* added by Amit Margalit Oct 1996 */
# define XtNhiColor "hiColor"
# define XtNshdColor "shdColor"
# define XtNframeWidth "frameWidth"
+# define XtCFrameWidth "FrameWidth"
# define XtNinnerFramesWidth "innerFramesWidth"
# define XtNsepWidth "sepWidth"
+#ifdef DANCING
/* caolan begin */
#define XtNlastEventTime "lastEventTime"
#define XtCLastEventTime "LastEventTime"
/* caolan end */
+#endif /* DANCING */
+#ifdef XPM
#define XtNuseShape "useShape"
#define XtCUseShape "UseShape"
#define XtNlogoFileName "logoFileName"
#define XtCLogoFileName "LogoFileName"
#define XtNlogoPadding "logoPadding"
#define XtCLogoPadding "LogoPadding"
-
-# define XtCFrameWidth "FrameWidth"
-
#endif /* XPM */
+
# define XtCGreeting "Greeting"
# define XtCNamePrompt "NamePrompt"
# define XtCPasswdPrompt "PasswdPrompt"
diff --git a/greeter/LoginP.h b/greeter/LoginP.h
index fda41d3..7fde809 100644
--- a/greeter/LoginP.h
+++ b/greeter/LoginP.h
@@ -67,9 +67,7 @@ from The Open Group.
#include "Login.h"
#include <X11/IntrinsicP.h>
#include <X11/CoreP.h>
-#ifdef XPM
#include <X11/Xlib.h>
-#endif /* XPM */
#ifdef USE_XFT
# include <X11/Xft/Xft.h>
#endif
@@ -103,10 +101,8 @@ typedef struct {
Pixel greetpixel; /* greeting pixel */
Pixel failpixel; /* failure pixel */
#endif
-#ifdef XPM
Pixel hipixel; /* frame hilite pixel */
Pixel shdpixel; /* shadow frame pixel */
-#endif /* XPM */
GC textGC; /* pointer to GraphicsContext */
GC bgGC; /* pointer to GraphicsContext */
GC xorGC; /* pointer to GraphicsContext */
@@ -115,10 +111,8 @@ typedef struct {
GC greetGC;
GC failGC;
#endif
-#ifdef XPM
GC hiGC; /* for hilight part of frame */
GC shdGC; /* for shaded part of frame */
-#endif /* XPM */
char *greeting; /* greeting */
char *unsecure_greet;/* message displayed when insecure */
char *namePrompt; /* name prompt */
@@ -147,14 +141,18 @@ typedef struct {
XIC xic; /* input method of input context */
loginPromptData prompts[NUM_PROMPTS];
time_t msgTimeout;
-#ifdef XPM
+
+#ifdef DANCING
/*caolan begin*/
- int lastEventTime;
+ int lastEventTime;
/*caolan end*/
+#endif /* DANCING */
+
int outframewidth; /* outer frame thickness */
int inframeswidth; /* inner frames thickness */
int sepwidth; /* width of separator line */
+#ifdef XPM
char *logoFileName;
unsigned int logoWidth, logoHeight, logoPadding, logoBorderWidth;
int logoX, logoY;
diff --git a/xdm.man.cpp b/xdm.man.cpp
index ff18a56..c95019a 100644
--- a/xdm.man.cpp
+++ b/xdm.man.cpp
@@ -1032,7 +1032,7 @@ If set to ``true'', when built with XPM support, attempt to use the
X Non-Rectangular Window Shape Extension to set the window shape.
The default is ``true''.
.IP "\fBxlogin.Login.hiColor\fP, \fBxlogin.Login.shdColor\fP"
-When built with XPM support, raised appearance bezels may be drawn around
+Raised appearance bezels may be drawn around
the greeter frame and text input boxes by setting these resources. hiColor
is the highlight color, used on the top and left sides of the frame, and the
bottom and right sides of text input areas. shdColor is the shadow color,
@@ -1040,13 +1040,13 @@ used on the bottom and right sides of the frame, and the top and left sides
of text input areas.
The default for both is the foreground color, providing a flat appearance.
.IP "\fBxlogin.Login.frameWidth\fP"
-When built with XPM support, frameWidth is the width in pixels of the area
+frameWidth is the width in pixels of the area
around the greeter frame drawn in hiColor and shdColor.
.IP "\fBxlogin.Login.innerFramesWidth\fP"
-When built with XPM support, innerFramesWidth is the width in pixels of the
+innerFramesWidth is the width in pixels of the
area around text input areas drawn in hiColor and shdColor.
.IP "\fBxlogin.Login.sepWidth\fP"
-When built with XPM support, sepWidth is the width in pixels of the
+sepWidth is the width in pixels of the
bezeled line between the greeting and input areas
drawn in hiColor and shdColor.
.IP "\fBxlogin.Login.allowRootLogin\fP"
commit 188415ebf07ff8a25ac663c37615269cd1a741a4
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Jun 15 19:23:05 2007 -0700
Set Xcursor theme to whiteglass in default login screen resources
diff --git a/config/Xresources.cpp b/config/Xresources.cpp
index 033491c..e904591 100644
--- a/config/Xresources.cpp
+++ b/config/Xresources.cpp
@@ -5,6 +5,9 @@
!
! $XFree86: xc/programs/xdm/config/Xres.cpp,v 1.6 2003/01/04 03:11:31 dawes Exp $
!
+
+Xcursor.theme: whiteglass
+
#define BS \ /* cpp can be trickier than m4 */
#define NLBS \n\ /* don't remove these comments */
xlogin*login.translations: #override BS
commit f8585c60831a8e5ddebce18bdd7e78d217a822c5
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Jun 15 18:36:15 2007 -0700
X.Org Bug #10992: xlogin crashes if window size is too small
X.Org Bugzilla #10992 <https://bugs.freedesktop.org/show_bug.cgi?id=10992>
diff --git a/greeter/Login.c b/greeter/Login.c
index cb114ed..120da8b 100644
--- a/greeter/Login.c
+++ b/greeter/Login.c
@@ -402,14 +402,14 @@ realizeValue (LoginWidget w, int cursor, int promptNum, GC gc)
offset = VALUE_SHOW_START(w, promptNum);
textlen = strlen (text + offset);
- do
+ while ((textlen > 0) && (textwidth > width))
{
if (offset < PROMPT_CURSOR(w, promptNum)) {
offset++;
}
textlen--;
textwidth = TEXT_WIDTH (text, text + offset, textlen);
- } while ((textlen > 0) && (textwidth > width));
+ }
VALUE_SHOW_START(w, promptNum) = offset;
VALUE_SHOW_END(w, promptNum) = offset + textlen;
commit 0ce4128e19f9fac9a565cce42a6a575486d371a5
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Jun 15 14:24:59 2007 -0700
Add --enable-xdm-auth/--disable-xdm-auth to configure options
diff --git a/configure.ac b/configure.ac
index 1a7bc1f..8a4911e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,7 +112,7 @@ if test "x$USE_PAM" != "xno" ; then
AC_CHECK_FUNC(pam_open_session,
[AC_DEFINE(USE_PAM,1,[Use PAM for authentication])],
[if test "x$USE_PAM" != "xtry" ; then
- AC_MSG_ERROR(["PAM support requested, but pam_open_session not found."])
+ AC_MSG_ERROR([PAM support requested, but pam_open_session not found.])
fi])
fi
@@ -155,7 +155,7 @@ if test x$RANDOM_DEVICE = xyes -o x$RANDOM_DEVICE = xtry ; then
AC_CHECK_FILE([/dev/urandom], [RANDOM_DEVICE=/dev/urandom],
AC_CHECK_FILE([/dev/random], [RANDOM_DEVICE=/dev/random]))
if test x$RANDOM_DEVICE = xyes ; then
- AC_MSG_ERROR(["random device support requested, but no random device was found."])
+ AC_MSG_ERROR([random device support requested, but no random device was found.])
else
if test x$RANDOM_DEVICE = xtry ; then
RANDOM_DEVICE="no"
@@ -370,9 +370,18 @@ XDM_CFLAGS="$XDM_CFLAGS $DMCP_CFLAGS $XLIB_CFLAGS $OS_CFLAGS $AUTH_CFLAGS"
XDM_LIBS="$XDM_LIBS $DMCP_LIBS"
AC_CHECK_LIB(Xdmcp, XdmcpWrap, [xdmauth="yes"], [xdmauth="no"], [$DMCP_LIBS])
-AC_SEARCH_LIBS(crypt, crypt)
-AM_CONDITIONAL(HAS_XDM_AUTH, test x$xdmauth = xyes)
+AC_ARG_ENABLE(xdm-auth,
+ AC_HELP_STRING([--enable-xdm-auth],
+ [Support XDM-AUTHENTICATION-1 and XDM-AUTHORIZATION-1 (default: auto)]),
+ [xdmauth_enable="$enableval"], [xdmauth_enable="auto"])
+if test "x$xdmauth_enable" = "xyes" -a "x$xdmauth" = "xno" ; then
+ AC_MSG_ERROR([XDM-AUTH support requested, but XdmcpWrap not found in libXdmcp.])
+fi
+
+AM_CONDITIONAL(HAS_XDM_AUTH, test x$xdmauth = xyes -a x$xdmauth_enable != xno)
+
+AC_SEARCH_LIBS(crypt, crypt)
AC_SUBST(XDM_CFLAGS)
AC_SUBST(XDM_LIBS)
commit 8e0b23e24556fb6c6b9943bf3747e70b245fc7aa
Author: Chip Coldwell <coldwell@physics.harvard.edu>
Date: Thu Jun 24 09:56:19 2004 -0700
X.Org Bug 10632 / Debian Bug 256299: race condition in policy.c:Willing()
X.Org Bugzilla #10632 <https://bugs.freedesktop.org/show_bug.cgi?id=10632>
Reported upstream from
Debian Bug #256299 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256299>
diff --git a/policy.c b/policy.c
index c18103d..a9d4bcf 100644
--- a/policy.c
+++ b/policy.c
@@ -140,8 +140,9 @@ Willing (
if ((fd = popen(willing, "r")))
{
char *s = NULL;
+ errno = 0;
while(!(s = fgets(statusBuf, 256, fd)) && errno == EINTR)
- ;
+ errno = 0;
if (s && strlen(statusBuf) > 0)
statusBuf[strlen(statusBuf)-1] = 0; /* chop newline */
else
commit a8927ee05efba3afe955731bab5d633879c39833
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Thu May 31 17:11:15 2007 -0700
Document more of the greeter resources in xdm man page
diff --git a/xdm.man.cpp b/xdm.man.cpp
index 93907c4..ff18a56 100644
--- a/xdm.man.cpp
+++ b/xdm.man.cpp
@@ -994,7 +994,7 @@ the end of the prompt (usually a nice thing), add spaces escaped with
backslashes. The default is ``Login: ''
.IP "\fBxlogin.Login.passwdPrompt\fP"
The string displayed to prompt for a password, when not using an authentication
-system such as PAM that provides its own prompts.
+system such as PAM that provides its own prompts.
The default is ``Password: ''
.IP "\fBxlogin.Login.promptFace\fP"
The face used to display prompts when built with Xft support.
@@ -1003,8 +1003,12 @@ The default is ``Serif-18:bold''.
The font used to display prompts when not built with Xft support.
.IP "\fBxlogin.Login.promptColor\fP"
The color used to display prompts.
+.IP "\fBxlogin.Login.changePasswdMessage\fP"
+A message which is displayed when the users password has expired.
+The default is ``Password Change Required''
.IP "\fBxlogin.Login.fail\fP"
-A message which is displayed when the authentication fails.
+A message which is displayed when the authentication fails, when not using an
+authentication system such as PAM that provides its own prompts.
The default is ``Login incorrect''
.IP "\fBxlogin.Login.failFace\fP"
The face used to display the failure message when built with Xft support.
@@ -1015,7 +1019,36 @@ The font used to display the failure message when not built with Xft support.
The color used to display the failure message.
.IP "\fBxlogin.Login.failTimeout\fP"
The number of seconds that the failure message is displayed.
-The default is 30.
+The default is 10.
+.IP "\fBxlogin.Login.logoFileName\fP"
+Name of an XPM format pixmap to display in the greeter window, if built with
+XPM support. The default is no pixmap.
+.IP "\fBxlogin.Login.logoPadding\fP"
+Number of pixels of space between the logo pixmap and other elements of the
+greeter window, if the pixmap is displayed.
+The default is 5.
+.IP "\fBxlogin.Login.useShape\fP"
+If set to ``true'', when built with XPM support, attempt to use the
+X Non-Rectangular Window Shape Extension to set the window shape.
+The default is ``true''.
+.IP "\fBxlogin.Login.hiColor\fP, \fBxlogin.Login.shdColor\fP"
+When built with XPM support, raised appearance bezels may be drawn around
+the greeter frame and text input boxes by setting these resources. hiColor
+is the highlight color, used on the top and left sides of the frame, and the
+bottom and right sides of text input areas. shdColor is the shadow color,
+used on the bottom and right sides of the frame, and the top and left sides
+of text input areas.
+The default for both is the foreground color, providing a flat appearance.
+.IP "\fBxlogin.Login.frameWidth\fP"
+When built with XPM support, frameWidth is the width in pixels of the area
+around the greeter frame drawn in hiColor and shdColor.
+.IP "\fBxlogin.Login.innerFramesWidth\fP"
+When built with XPM support, innerFramesWidth is the width in pixels of the
+area around text input areas drawn in hiColor and shdColor.
+.IP "\fBxlogin.Login.sepWidth\fP"
+When built with XPM support, sepWidth is the width in pixels of the
+bezeled line between the greeting and input areas
+drawn in hiColor and shdColor.
.IP "\fBxlogin.Login.allowRootLogin\fP"
If set to ``false'', don't allow root (and any other user with uid = 0) to
log in directly.
commit 35f563369470139665498640f4cda23d1227073b
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Tue May 29 19:57:29 2007 -0700
Bug #11096: xdm(1) manpage should document Xft-related properties
X.Org Bugzilla #11096 <https://bugs.freedesktop.org/show_bug.cgi?id=11096>
Added descriptions of the Xft *face resources and changed the core fonts
*font resource descriptions to match. Also cleaned up various other
descriptions to make it easier for users customizing the look of the login
screen.
diff --git a/xdm.man.cpp b/xdm.man.cpp
index 2e51cbf..93907c4 100644
--- a/xdm.man.cpp
+++ b/xdm.man.cpp
@@ -196,7 +196,7 @@ run during the progress of the session.
.IP "\fB\-resources\fP \fIresource_file\fP"
Specifies the value for the \fBDisplayManager*resources\fP resource. This file
is loaded using
-.I xrdb
+.IR xrdb (__appmansuffix__)
to specify configuration parameters for the
authentication widget.
.IP "\fB\-server\fP \fIserver_entry\fP"
@@ -931,19 +931,47 @@ Here is a sample \fIXsetup\fP script:
.fi
.SH "AUTHENTICATION WIDGET"
-The authentication widget reads a name/password pair
-from the keyboard. Nearly every imaginable
+The authentication widget prompts the user for the username, password, and/or
+other required authentication data from the keyboard. Nearly every imaginable
parameter can be controlled with a resource. Resources for this widget
should be put into the file named by
\fBDisplayManager.\fP\fIDISPLAY\fP\fB.resources\fP. All of these have reasonable
default values, so it is not necessary to specify any of them.
+.PP
+The resource file is loaded with
+.IR xrdb (__appmansuffix__)
+so it may use the substitutions defined by that program such as CLIENTHOST
+for the client hostname in the login message, or C pre-processor #ifdef
+statements to produce different displays depending on color depth or other
+variables.
+.PP
+.I Xdm
+can be compiled with support for the
+.IR Xft (__libmansuffix__)
+library for font rendering. If this support is present, font faces are
+specified using the resources with names ending in "face" in the
+fontconfig face format described in the
+.I Font Names
+section of
+.IR fonts.conf (__filemansuffix__).
+If not, then fonts are specified using the resources with names ending in
+"font" in the traditional
+.I X Logical Font Description
+format described in the
+.I Font Names
+section of
+.IR X (__miscmansuffix__).
.IP "\fBxlogin.Login.width, xlogin.Login.height, xlogin.Login.x, xlogin.Login.y\fP"
The geometry of the Login widget is normally computed automatically. If you
wish to position it elsewhere, specify each of these resources.
.IP "\fBxlogin.Login.foreground\fP"
-The color used to display the typed-in user name.
+The color used to display the input typed by the user.
+.IP "\fBxlogin.Login.face\fP"
+The face used to display the input typed by the user when built with Xft
+support. The default is ``Serif-18''.
.IP "\fBxlogin.Login.font\fP"
-The font used to display the typed-in user name.
+The font used to display the input typed by the user when not built with Xft
+support.
.IP "\fBxlogin.Login.greeting\fP"
A string which identifies this window.
The default is ``X Window System.''
@@ -951,8 +979,11 @@ The default is ``X Window System.''
When X authorization is requested in the configuration file for this
display and none is in use, this greeting replaces the standard
greeting. The default is ``This is an unsecure session''
+.IP "\fBxlogin.Login.greetFace\fP"
+The face used to display the greeting when built with Xft support.
+The default is ``Serif-24:italic''.
.IP "\fBxlogin.Login.greetFont\fP"
-The font used to display the greeting.
+The font used to display the greeting when not built with Xft support.
.IP "\fBxlogin.Login.greetColor\fP"
The color used to display the greeting.
.IP "\fBxlogin.Login.namePrompt\fP"
@@ -962,17 +993,24 @@ strips trailing white space from resource values, so to add spaces at
the end of the prompt (usually a nice thing), add spaces escaped with
backslashes. The default is ``Login: ''
.IP "\fBxlogin.Login.passwdPrompt\fP"
-The string displayed to prompt for a password.
+The string displayed to prompt for a password, when not using an authentication
+system such as PAM that provides its own prompts.
The default is ``Password: ''
+.IP "\fBxlogin.Login.promptFace\fP"
+The face used to display prompts when built with Xft support.
+The default is ``Serif-18:bold''.
.IP "\fBxlogin.Login.promptFont\fP"
-The font used to display both prompts.
+The font used to display prompts when not built with Xft support.
.IP "\fBxlogin.Login.promptColor\fP"
-The color used to display both prompts.
+The color used to display prompts.
.IP "\fBxlogin.Login.fail\fP"
A message which is displayed when the authentication fails.
The default is ``Login incorrect''
+.IP "\fBxlogin.Login.failFace\fP"
+The face used to display the failure message when built with Xft support.
+The default is ``Serif-18:bold''.
.IP "\fBxlogin.Login.failFont\fP"
-The font used to display the failure message.
+The font used to display the failure message when not built with Xft support.
.IP "\fBxlogin.Login.failColor\fP"
The color used to display the failure message.
.IP "\fBxlogin.Login.failTimeout\fP"
@@ -1368,13 +1406,15 @@ the default place for authorization files
Kerberos credentials cache
.SH "SEE ALSO"
.IR X (__miscmansuffix__),
-.IR xinit (1),
-.IR xauth (1),
+.IR xinit (__appmansuffix__),
+.IR xauth (__appmansuffix__),
+.IR xrdb (__appmansuffix__),
.IR Xsecurity (__miscmansuffix__),
-.IR sessreg (1),
-.IR Xserver (1),
-.\" .IR chooser (1), \" except that there isn't a manual for it yet
-.\" .IR xdmshell (1), \" except that there isn't a manual for it yet
+.IR sessreg (__appmansuffix__),
+.IR Xserver (__appmansuffix__),
+.\" .IR chooser (__appmansuffix__), \" except that there isn't a manual for it yet
+.\" .IR xdmshell (__appmansuffix__), \" except that there isn't a manual for it yet
+.IR fonts.conf (__filemansuffix__).
.br
.I "X Display Manager Control Protocol"
.SH AUTHOR
commit e7f1c433dc0bd8e864cec68dbc120f27696bbba6
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Thu May 24 10:32:32 2007 -0700
Bug #11020: xdm doesn't set SSH_AUTH_SOCK even though using with pam_ssh
Wasn't calling pam_setcred()/pam_getenvlist() if setusercontext() was present
X.Org Bugzilla #11020: <https://bugs.freedesktop.org/show_bug.cgi?id=11020>
diff --git a/session.c b/session.c
index 384fd78..195c26f 100644
--- a/session.c
+++ b/session.c
@@ -627,6 +627,8 @@ StartClient (
return (0);
}
#endif /* QNX4 doesn't support multi-groups, no initgroups() */
+#endif /* !HAS_SETUSERCONTEXT */
+
#ifdef USE_PAM
if (pamh) {
long i;
@@ -647,6 +649,8 @@ StartClient (
}
#endif
+
+#ifndef HAS_SETUSERCONTEXT
if (setuid(verify->uid) < 0) {
LogError ("setuid %d (user \"%s\") failed, errno=%d\n",
Reply to: