Author: branden Date: 2003-09-15 16:28:39 -0500 (Mon, 15 Sep 2003) New Revision: 531
Added: branches/4.3.0/sid/debian/patches/066_xdm_do_not_read_from_dev_mem.diff Modified: branches/4.3.0/sid/debian/patches/002_xdm_fixes.diff branches/4.3.0/sid/debian/patches/905_debian_xdm.diff Log: Really resync all patches to xdm with the trunk. Move one snippet of the "do not read from /dev/mem" patch from 002 to 066. Modified: branches/4.3.0/sid/debian/patches/002_xdm_fixes.diff =================================================================== --- branches/4.3.0/sid/debian/patches/002_xdm_fixes.diff 2003-09-15 20:06:51 UTC (rev 530) +++ branches/4.3.0/sid/debian/patches/002_xdm_fixes.diff 2003-09-15 21:28:39 UTC (rev 531) @@ -6,9 +6,6 @@ Not submitted upstream yet. -* Imakefile: - Use /dev/random as the default random number generator on - Linux, Hurd, and GNU/FreeBSD. * auth.c: - Add a couple of comments to assuage some of the fears of security auditors, and people who follow up on the GNU linker's ritual @@ -124,19 +121,6 @@ _SysErrorMsg because it is a standalone program that doesn't include server.c.) ---- xc/programs/xdm/Imakefile~ 2003-09-15 14:31:57.000000000 -0500 -+++ xc/programs/xdm/Imakefile 2003-09-15 14:34:28.000000000 -0500 -@@ -137,6 +137,10 @@ - RANDOM_DEFINES = -DDEV_RANDOM=\"/dev/urandom\" - #endif - -+#if defined(LinuxArchitecture) || defined(GNUMachArchitecture) || defined(GNUFreeBSDArchitecture) -+ RANDOM_DEFINES = -DDEV_RANDOM -DDEF_RANDOM_FILE="\"/dev/random\"" -+#endif -+ - #ifdef OpenBSDArchitecture - RANDOM_DEFINES = -DARC4_RANDOM - #endif diff -urN xc/programs/xdm~/auth.c xc/programs/xdm/auth.c --- xc/programs/xdm~/auth.c 2003-08-19 01:01:30.000000000 -0500 +++ xc/programs/xdm/auth.c 2003-08-19 01:04:55.000000000 -0500 Copied: branches/4.3.0/sid/debian/patches/066_xdm_do_not_read_from_dev_mem.diff (from rev 530, trunk/debian/patches/091_xdm_do_not_read_from_dev_mem.diff) =================================================================== --- trunk/debian/patches/091_xdm_do_not_read_from_dev_mem.diff 2003-09-15 20:06:51 UTC (rev 530) +++ branches/4.3.0/sid/debian/patches/066_xdm_do_not_read_from_dev_mem.diff 2003-09-15 21:28:39 UTC (rev 531) @@ -0,0 +1,512 @@ +$Id$ + +This patch by Branden Robinson. + +Historically, if HASXDMAUTH was defined but neither ARC4_RANDOM nor +DEV_RANDOM were defined, xdm provided a function called sumFile() that +would read straight from /dev/mem and use that as an entropy source. +However, that's a bad idea because A) it's not very entropic and B) some +OSes have hardware registers mapped into /dev/mem, and even just reading +from them can cause machine checks. It's a Bad Thing to do. + +* Remove no longer needed "FRAGILE_DEV_MEM" define. +* Revert meaning of DEV_RANDOM define to a simple on/off. DEF_RANDOM_FILE + is already used in resource.c for the same purpose that the old + (NetBSD-based?) code was using it. +* Have NetBSD use /dev/urandom as its DEF_RANDOM_FILE. +* Define DEV_RANDOM for Linux and the Hurd, and have both use /dev/random + for their DEF_RANDOM_FILE. +* Rewrite genauth.c to drop the sumFile() function and throw a preprocessor + error if HASXDMAUTH is defined but neither ARC4_RANDOM nor DEV_RANDOM are. +* Have genauth.c log an error, using _SysErrorMsg(), if it cannot open the + specified randomFile. +* Change semantics of randomFile resource to refer to the device to be + opened for platforms that use DEV_RANDOM, instead of the device to be + checksummed with the now-nonexistent sumFile() function. +* Update manpage to reflect above change in meaning of randomFile resource, + and document when it's not used. +* Whitespace and stylistic cleanups to genauth.c. +* Cleaned up whitespace and indented pre-processor conditionals in + resource.c. + +Not submitted upstream yet. + +diff -u xc/programs/xdm~/Imakefile xc/programs/xdm/Imakefile +--- xc/programs/xdm~/Imakefile 2003-02-23 18:13:56.000000000 -0500 ++++ xc/programs/xdm/Imakefile 2003-02-23 18:16:45.000000000 -0500 +@@ -127,14 +127,14 @@ + SOCK_DEFINES = -DBSD44SOCKETS + #endif + +-#if defined(i386Architecture) || defined(AmigaArchitecture) +-FRAGILE_DEFINES = -DFRAGILE_DEV_MEM +-#endif +- + #if defined(NetBSDArchitecture) && \ + ((OSMajorVersion > 1) || \ + (OSMajorVersion == 1 && OSMinorVersion > 3)) +-RANDOM_DEFINES = -DDEV_RANDOM=\"/dev/urandom\" ++RANDOM_DEFINES = -DDEV_RANDOM -DDEF_RANDOM_FILE="\"/dev/urandom\"" ++#endif ++ ++#if defined(LinuxArchitecture) || defined(GNUMachArchitecture) || defined(GNUFreeBSDArchitecture) ++RANDOM_DEFINES = -DDEV_RANDOM -DDEF_RANDOM_FILE="\"/dev/random\"" + #endif + + #ifdef OpenBSDArchitecture +@@ -230,7 +230,7 @@ + $(SIGNAL_DEFINES) $(CRYPT_DEFINES) $(BSDAUTH_DEFINES) \ + $(XDMAUTH_DEFINES) $(RPC_DEFINES) $(KRB5_DEFINES) \ + $(PWD_DEFINES) $(PAM_DEFINES) $(CONN_DEFINES) \ +- $(GREET_DEFINES) $(FRAGILE_DEFINES) $(RANDOM_DEFINES) \ ++ $(GREET_DEFINES) $(RANDOM_DEFINES) \ + -DOSMAJORVERSION=$(OSMAJORVERSION) \ + -DOSMINORVERSION=$(OSMINORVERSION) \ + $(XKB_CLIENT_DEFINES) $(USER_CONTEXT_DEFINES) \ +Common subdirectories: xc/programs/xdm~/config and xc/programs/xdm/config +diff -u xc/programs/xdm~/genauth.c xc/programs/xdm/genauth.c +--- xc/programs/xdm~/genauth.c 2003-02-23 18:13:57.000000000 -0500 ++++ xc/programs/xdm/genauth.c 2003-02-23 18:16:45.000000000 -0500 +@@ -33,15 +33,16 @@ + * Author: Keith Packard, MIT X Consortium + */ + +-# include <X11/Xauth.h> +-# include <X11/Xos.h> ++#include <X11/Xauth.h> ++#include <X11/Xos.h> + +-# include "dm.h" +-# include "dm_auth.h" +-# include "dm_error.h" ++#include "dm.h" ++#include "dm_auth.h" ++#include "dm_error.h" + + #include <errno.h> + #include <fcntl.h> ++#include <string.h> + + #include <time.h> + #define Time_t time_t +@@ -61,52 +62,27 @@ + + #endif + +-# define FILE_LIMIT 1024 /* no more than this many buffers */ ++#define FILE_LIMIT 1024 /* no more than this many buffers */ + +-#if !defined(ARC4_RANDOM) && !defined(DEV_RANDOM) +-static int +-sumFile (char *name, long sum[2]) +-{ +- long buf[1024*2]; +- int cnt; +- int fd; +- int loops; +- int reads; +- int i; +- int ret_status = 0; +- +- fd = open (name, O_RDONLY); +- if (fd < 0) { +- LogError("Cannot open randomFile \"%s\", errno = %d\n", name, errno); +- return 0; +- } +-#ifdef FRAGILE_DEV_MEM +- if (strcmp(name, "/dev/mem") == 0) lseek (fd, (off_t) 0x100000, SEEK_SET); +-#endif +- reads = FILE_LIMIT; +- sum[0] = 0; +- sum[1] = 0; +- while ((cnt = read (fd, (char *) buf, sizeof (buf))) > 0 && --reads > 0) { +- loops = cnt / (2 * sizeof (long)); +- for (i = 0; i < loops; i+= 2) { +- sum[0] += buf[i]; +- sum[1] += buf[i+1]; +- ret_status = 1; +- } +- } +- if (cnt < 0) +- LogError("Cannot read randomFile \"%s\", errno = %d\n", name, errno); +- close (fd); +- return ret_status; +-} ++/* ++ * Historically, if HASXDMAUTH was defined but neither ARC4_RANDOM nor ++ * DEV_RANDOM were defined, xdm provided a function called sumFile() that ++ * would read straight from /dev/mem and use that as an entropy source. ++ * However, that's a bad idea because A) it's not very entropic and B) some ++ * OSes have hardware registers mapped into /dev/mem, and even just reading ++ * from them can cause machine checks. It's a Bad Thing to do. ++ */ ++#ifdef HASXDMAUTH ++# if !defined(ARC4_RANDOM) && !defined(DEV_RANDOM) ++# error neither ARC4_RANDOM nor DEV_RANDOM defined; no entropy collection mechanism available ++# endif + #endif + + #ifdef HASXDMAUTH + static void + InitXdmcpWrapper (void) + { +- +-#ifdef ARC4_RANDOM ++# ifdef ARC4_RANDOM + u_int32_t sum[2]; + + sum[0] = arc4random(); +@@ -114,42 +90,30 @@ + *(u_char *)sum = 0; + + _XdmcpWrapperToOddParity(sum, key); +- +-#elif defined(DEV_RANDOM) ++# elif defined(DEV_RANDOM) + int fd; + unsigned char tmpkey[8]; +- +- if ((fd = open(DEV_RANDOM, O_RDONLY)) >= 0) { ++ ++ if ((fd = open(randomFile, O_RDONLY)) >= 0) { + if (read(fd, tmpkey, 8) == 8) { + tmpkey[0] = 0; + _XdmcpWrapperToOddParity(tmpkey, key); + close(fd); +- return; ++ return; + } else { + close(fd); + } ++ } else { ++ LogError("cannot open random device \"%s\": %s\n", randomFile, ++ _SysErrorMsg (errno)); + } +-#else +- long sum[2]; +- unsigned char tmpkey[8]; +- +- if (!sumFile (randomFile, sum)) { +- sum[0] = time ((Time_t *) 0); +- sum[1] = time ((Time_t *) 0); +- } +- longtochars (sum[0], tmpkey+0); +- longtochars (sum[1], tmpkey+4); +- tmpkey[0] = 0; +- _XdmcpWrapperToOddParity (tmpkey, key); +-#endif ++# endif /* ARC4_RANDOM, DEV_RANDOM */ + } +- +-#endif +- +-#ifndef HASXDMAUTH +-/* A random number generator that is more unpredictable +- than that shipped with some systems. +- This code is taken from the C standard. */ ++#else ++/* ++ * This is a random number generator that is more unpredictable than that ++ * shipped with some systems. This code is taken from the C standard. ++ */ + + static unsigned long int next = 1; + +@@ -165,12 +129,12 @@ + { + next = seed; + } +-#endif /* no HASXDMAUTH */ ++#endif /* HASXDMAUTH */ + + void + GenerateAuthData (char *auth, int len) + { +- long ldata[2]; ++ long ldata[2]; + + #ifdef ITIMER_REAL + { +@@ -182,53 +146,53 @@ + } + #else + { +-#ifndef __UNIXOS2__ +- long time (); +-#endif ++# ifndef __UNIXOS2__ ++ long time (); ++# endif + + ldata[0] = time ((long *) 0); + ldata[1] = getpid (); + } +-#endif ++#endif /* ITIMER_REAL */ ++ + #ifdef HASXDMAUTH + { +- int bit; +- int i; +- auth_wrapper_schedule schedule; +- unsigned char data[8]; +- static int xdmcpAuthInited; +- ++ int bit; ++ int i; ++ auth_wrapper_schedule schedule; ++ unsigned char data[8]; ++ static int xdmcpAuthInited; ++ + longtochars (ldata[0], data+0); + longtochars (ldata[1], data+4); +- if (!xdmcpAuthInited) +- { ++ if (!xdmcpAuthInited) { + InitXdmcpWrapper (); + xdmcpAuthInited = 1; + } + _XdmcpAuthSetup (key, schedule); +- for (i = 0; i < len; i++) { ++ for (i = 0; i < len; i++) { + auth[i] = 0; + for (bit = 1; bit < 256; bit <<= 1) { + _XdmcpAuthDoIt (data, data, schedule, 1); + if ((data[0] + data[1]) & 0x4) + auth[i] |= bit; + } +- } ++ } + } + #else + { +- int seed; +- int value; +- int i; ++ int seed; ++ int value; ++ int i; + static long localkey[2] = {0,0}; +- ++ + if ( (localkey[0] == 0) && (localkey[1] == 0) ) { +-#ifdef ARC4_RANDOM ++# ifdef ARC4_RANDOM + localkey[0] = arc4random(); + localkey[1] = arc4random(); +-#elif defined(DEV_RANDOM) ++# elif defined(DEV_RANDOM) + int fd; +- ++ + if ((fd = open(DEV_RANDOM, O_RDONLY)) >= 0) { + if (read(fd, (char *)localkey, 8) != 8) { + localkey[0] = 1; +@@ -237,24 +201,19 @@ + } else { + localkey[0] = 1; + } +-#else +- if (!sumFile (randomFile, localkey)) { +- localkey[0] = 1; /* To keep from continually calling sumFile() */ +- } +-#endif ++# endif /* ARC4_RANDOM, DEV_RANDOM */ + } + +- seed = (ldata[0]+localkey[0]) + ((ldata[1]+localkey[1]) << 16); +- xdm_srand (seed); +- for (i = 0; i < len; i++) +- { ++ seed = (ldata[0]+localkey[0]) + ((ldata[1]+localkey[1]) << 16); ++ xdm_srand (seed); ++ for (i = 0; i < len; i++) { + value = xdm_rand (); + auth[i] = (value & 0xff00) >> 8; +- } ++ } + value = len; + if (value > sizeof (key)) + value = sizeof (key); +- memmove( (char *) key, auth, value); ++ memmove( (char *) key, auth, value); + } +-#endif ++#endif /* HASXDMAUTH */ + } +Common subdirectories: xc/programs/xdm~/greeter and xc/programs/xdm/greeter +diff -u xc/programs/xdm~/resource.c xc/programs/xdm/resource.c +--- xc/programs/xdm~/resource.c 2003-02-23 18:13:56.000000000 -0500 ++++ xc/programs/xdm/resource.c 2003-02-23 18:21:43.000000000 -0500 +@@ -35,11 +35,11 @@ + * resource.c + */ + +-# include "dm.h" +-# include "dm_error.h" ++#include "dm.h" ++#include "dm_error.h" + +-# include <X11/Intrinsic.h> +-# include <X11/Xmu/CharSet.h> ++#include <X11/Intrinsic.h> ++#include <X11/Xmu/CharSet.h> + + char *config; + +@@ -62,74 +62,74 @@ + char *willing; + int choiceTimeout; /* chooser choice timeout */ + +-# define DM_STRING 0 +-# define DM_INT 1 +-# define DM_BOOL 2 +-# define DM_ARGV 3 ++#define DM_STRING 0 ++#define DM_INT 1 ++#define DM_BOOL 2 ++#define DM_ARGV 3 + + /* + * the following constants are supposed to be set in the makefile from + * parameters set util/imake.includes/site.def (or *.macros in that directory + * if it is server-specific). DO NOT CHANGE THESE DEFINITIONS! + */ +-#ifndef DEF_SERVER_LINE +-#define DEF_SERVER_LINE ":0 local /usr/bin/X11/X :0" ++#ifndef DEF_SERVER_LINE ++# define DEF_SERVER_LINE ":0 local /usr/bin/X11/X :0" + #endif + #ifndef XRDB_PROGRAM +-#define XRDB_PROGRAM "/usr/bin/X11/xrdb" ++# define XRDB_PROGRAM "/usr/bin/X11/xrdb" + #endif + #ifndef DEF_SESSION +-#define DEF_SESSION "/usr/bin/X11/xterm -ls" ++# define DEF_SESSION "/usr/bin/X11/xterm -ls" + #endif + #ifndef DEF_USER_PATH +-#define DEF_USER_PATH ":/bin:/usr/bin:/usr/bin/X11:/usr/ucb" ++# define DEF_USER_PATH ":/bin:/usr/bin:/usr/bin/X11:/usr/ucb" + #endif + #ifndef DEF_SYSTEM_PATH +-#define DEF_SYSTEM_PATH "/etc:/bin:/usr/bin:/usr/bin/X11:/usr/ucb" ++# define DEF_SYSTEM_PATH "/etc:/bin:/usr/bin:/usr/bin/X11:/usr/ucb" + #endif + #ifndef DEF_SYSTEM_SHELL +-#define DEF_SYSTEM_SHELL "/bin/sh" ++# define DEF_SYSTEM_SHELL "/bin/sh" + #endif + #ifndef DEF_FAILSAFE_CLIENT +-#define DEF_FAILSAFE_CLIENT "/usr/bin/X11/xterm" ++# define DEF_FAILSAFE_CLIENT "/usr/bin/X11/xterm" + #endif + #ifndef DEF_XDM_CONFIG +-#define DEF_XDM_CONFIG "/usr/lib/X11/xdm/xdm-config" ++# define DEF_XDM_CONFIG "/usr/lib/X11/xdm/xdm-config" + #endif + #ifndef DEF_CHOOSER +-#define DEF_CHOOSER "/usr/lib/X11/xdm/chooser" ++# define DEF_CHOOSER "/usr/lib/X11/xdm/chooser" + #endif + #ifndef DEF_AUTH_NAME + #ifdef HASXDMAUTH +-#define DEF_AUTH_NAME "XDM-AUTHORIZATION-1 MIT-MAGIC-COOKIE-1" ++# define DEF_AUTH_NAME "XDM-AUTHORIZATION-1 MIT-MAGIC-COOKIE-1" + #else +-#define DEF_AUTH_NAME "MIT-MAGIC-COOKIE-1" ++# define DEF_AUTH_NAME "MIT-MAGIC-COOKIE-1" + #endif + #endif + #ifndef DEF_AUTH_DIR +-#define DEF_AUTH_DIR "/usr/lib/X11/xdm" ++# define DEF_AUTH_DIR "/usr/lib/X11/xdm" + #endif + #ifndef DEF_USER_AUTH_DIR +-#define DEF_USER_AUTH_DIR "/tmp" ++# define DEF_USER_AUTH_DIR "/tmp" + #endif + #ifndef DEF_KEY_FILE +-#define DEF_KEY_FILE "" ++# define DEF_KEY_FILE "" + #endif + #ifndef DEF_ACCESS_FILE +-#define DEF_ACCESS_FILE "" ++# define DEF_ACCESS_FILE "" + #endif + #ifndef DEF_RANDOM_FILE + # ifdef linux +-# define DEF_RANDOM_FILE "/dev/urandom" ++# define DEF_RANDOM_FILE "/dev/urandom" + # else +-# define DEF_RANDOM_FILE "/dev/mem" ++# define DEF_RANDOM_FILE "/dev/mem" + # endif + #endif + #ifndef DEF_GREETER_LIB +-#define DEF_GREETER_LIB "/usr/lib/X11/xdm/libXdmGreet.so" ++# define DEF_GREETER_LIB "/usr/lib/X11/xdm/libXdmGreet.so" + #endif + +-#define DEF_UDP_PORT "177" /* registered XDMCP port, dont change */ ++#define DEF_UDP_PORT "177" /* registered XDMCP port, do not change */ + + struct dmResources { + char *name, *class; +@@ -175,9 +175,9 @@ + ""} , + }; + +-# define NUM_DM_RESOURCES (sizeof DmResources / sizeof DmResources[0]) ++#define NUM_DM_RESOURCES (sizeof DmResources / sizeof DmResources[0]) + +-# define boffset(f) XtOffsetOf(struct display, f) ++#define boffset(f) XtOffsetOf(struct display, f) + + struct displayResource { + char *name, *class; +@@ -225,7 +225,7 @@ + "" }, + }; + +-# define NUM_SERVER_RESOURCES (sizeof serverResources/\ ++#define NUM_SERVER_RESOURCES (sizeof serverResources/\ + sizeof serverResources[0]) + + /* resources which control the session behaviour */ +@@ -257,7 +257,7 @@ + DEF_CHOOSER }, + }; + +-# define NUM_SESSION_RESOURCES (sizeof sessionResources/\ ++#define NUM_SESSION_RESOURCES (sizeof sessionResources / \ + sizeof sessionResources[0]) + + XrmDatabase DmResourceDB; +@@ -463,7 +463,7 @@ + CleanUpName (d->name, dpyName, sizeof (dpyName)); + CleanUpName (d->class ? d->class : d->name, dpyClass, sizeof (dpyClass)); + for (i = 0; i < numResources; i++) { +- snprintf (name, sizeof(name), "DisplayManager.%s.%s", ++ snprintf (name, sizeof(name), "DisplayManager.%s.%s", + dpyName, resources[i].name); + snprintf (class, sizeof(class), "DisplayManager.%s.%s", + dpyClass, resources[i].class); +diff -u xc/programs/xdm~/xdm.man xc/programs/xdm/xdm.man +--- xc/programs/xdm~/xdm.man 2003-02-23 18:13:57.000000000 -0500 ++++ xc/programs/xdm/xdm.man 2003-02-23 18:16:45.000000000 -0500 +@@ -348,9 +348,11 @@ + to pass on to the \fIXsetup\fP, + \fIXstartup\fP, \fIXsession\fP, and \fIXreset\fP programs. + .IP \fBDisplayManager.randomFile\fP +-A file to checksum to generate the seed of authorization keys. +-This should be a file that changes frequently. +-The default is \fI/dev/mem\fP. ++A file from which to gather entropy for the generation of authorization ++keys. This resource is only used if ++.B xdm ++was compiled with support for the XDM-AUTHORIZATION-1 protocol and the ++\(oqrandom\(cq device. The default is \fI/dev/random\fP. + .IP \fBDisplayManager.greeterLib\fP + On systems that support a dynamically-loadable greeter library, the + name of the library. The default is Property changes on: branches/4.3.0/sid/debian/patches/066_xdm_do_not_read_from_dev_mem.diff ___________________________________________________________________ Name: svn:keywords + Id Modified: branches/4.3.0/sid/debian/patches/905_debian_xdm.diff =================================================================== --- branches/4.3.0/sid/debian/patches/905_debian_xdm.diff 2003-09-15 20:06:51 UTC (rev 530) +++ branches/4.3.0/sid/debian/patches/905_debian_xdm.diff 2003-09-15 21:28:39 UTC (rev 531) @@ -1,8 +1,82 @@ -Change xdm to announce that we're on Debian, to have a sane local setup, -and to invoke the global Xsession. This patch by Branden Robinson. +$Id: 905_debian_xdm.diff 491 2003-09-10 08:31:58Z branden $ ---- xc/programs/xdm/config/Xres.cpp.deb Mon Aug 21 12:57:35 2000 -+++ xc/programs/xdm/config/Xres.cpp Mon Aug 21 12:57:58 2000 +* Imakefile: + Use different paths for the chooser, auth directory, and greeter + library. This is just an effort to move in the direction of the + FHS. I think I've submitted this before and it's been rejected. + Maybe we need a UseFHS imake directive? :) +* config/Imakefile: + - Set the default VT to vt7 if we're on a Debian system. + - Use the Debian logo as the xdm greeter pixmap if we're on a Debian + system. +* config/Xres.cpp: report OS name in greeter widget +* config/Xserv.ws.cpp: + - add comments to help local admins + - run local server on default VT, with DPI setting forced to 100, and + TCP listening turned off for security +* config/Xsession: replace guts with simple call to Debian's Xsession + script +* config/xdm-conf.cpp: + - Changes to correspond with the xdm/Imakefile changes, above. + - Supply a simpler default configuration, so that no matter what X + server number is used, people get the same results. + - Define a default userPath and systemPath. Again, this smacks of + the FHS. + +diff -urN xc/programs/xdm~/Imakefile xc/programs/xdm/Imakefile +--- xc/programs/xdm~/Imakefile 2003-02-23 18:28:23.000000000 -0500 ++++ xc/programs/xdm/Imakefile 2003-02-23 18:33:59.000000000 -0500 +@@ -256,9 +256,9 @@ + '-DDEF_SYSTEM_SHELL="$(BOURNE_SHELL)"' \ + '-DDEF_FAILSAFE_CLIENT="$(BINDIR)/xterm"' \ + '-DDEF_XDM_CONFIG="$(XDMDIR)/xdm-config"' \ +- '-DDEF_CHOOSER="$(XDMDIR)/chooser"' \ +- '-DDEF_AUTH_DIR="$(XDMDIR)"' \ +- '-DDEF_GREETER_LIB="$(XDMDIR)/libXdmGreet.so"' ++ '-DDEF_CHOOSER="$(BINDIR)/chooser"' \ ++ '-DDEF_AUTH_DIR="$(XDMVARDIR)"' \ ++ '-DDEF_GREETER_LIB="$(USRLIBDIR)/libXdmGreet.so"' + + ComplexProgramTarget_1(xdm,$(LOCAL_LIBRARIES),NullParameter) + LinkConfDirectory(xdm,.,xdm,.) +@@ -277,7 +277,7 @@ + #if BuildChooser + SpecialCObjectRule(chooser, $(ICONFIGFILES), $(SOCK_DEFINES)) + NormalProgramTarget(chooser,$(OBJS3),$(DEPLIBS3),$(LIBS3),NullParameter) +-InstallProgram(chooser,$(XDMDIR)) ++InstallProgram(chooser,$(BINDIR)) + InstallAppDefaults(Chooser) + #endif + #if BuildBoth +diff -urN xc/programs/xdm~/config/Imakefile xc/programs/xdm/config/Imakefile +--- xc/programs/xdm~/config/Imakefile 2003-02-23 18:28:15.000000000 -0500 ++++ xc/programs/xdm/config/Imakefile 2003-02-23 18:29:33.000000000 -0500 +@@ -17,13 +17,22 @@ + DEFAULTVT=vt7 + #endif + ++#if LinuxDistribution && (LinuxDistribution == LinuxDebian) ++DEFAULTVT=vt7 ++#endif ++ + #ifndef XdmPixmap + # define XdmPixmap XFree86.xpm + # define XdmbwPixmap XFree86bw.xpm + #endif + ++#if LinuxDistribution && (LinuxDistribution == LinuxDebian) ++XPM_DEFINES=-DXPM -DBITMAPDIR=$(XDMDIR)/pixmaps -DXDM_PIXMAP=debian.xpm\ @@\ ++ -DXDM_BWPIXMAP=debianbw.xpm ++#else + XPM_DEFINES=-DXPM -DBITMAPDIR=$(XDMDIR)/pixmaps -DXDM_PIXMAP=XdmPixmap\ @@\ + -DXDM_BWPIXMAP=XdmbwPixmap ++#endif + + XDMLOGDIR = $(LOGDIRECTORY) + #ifdef VarRunDirectory +diff -urN xc/programs/xdm~/config/Xres.cpp xc/programs/xdm/config/Xres.cpp +--- xc/programs/xdm~/config/Xres.cpp 2003-02-23 18:28:15.000000000 -0500 ++++ xc/programs/xdm/config/Xres.cpp 2003-02-23 18:29:33.000000000 -0500 @@ -20,10 +20,10 @@ Ctrl<Key>Return: set-session-argument(failsafe) finish-field()NLBS <Key>Return: set-session-argument() finish-field() @@ -16,8 +90,9 @@ xlogin*namePrompt: \040\040\040\040\040\040\040Login: #endif /* XPM */ xlogin*fail: Login incorrect ---- xc/programs/xdm/config/Xserv.ws.cpp.orig Wed Aug 23 18:22:01 2000 -+++ xc/programs/xdm/config/Xserv.ws.cpp Wed Aug 23 18:24:15 2000 +diff -urN xc/programs/xdm~/config/Xserv.ws.cpp xc/programs/xdm/config/Xserv.ws.cpp +--- xc/programs/xdm~/config/Xserv.ws.cpp 2001-01-17 18:45:24.000000000 -0500 ++++ xc/programs/xdm/config/Xserv.ws.cpp 2003-02-23 18:29:33.000000000 -0500 @@ -10,4 +10,16 @@ XCOMM look like: XCOMM XTerminalName:0 foreign @@ -36,8 +111,9 @@ +XCOMM :0 local BINDIR/X :0 vt9 -bpp 16 +XCOMM :1 local BINDIR/X :1 vt10 -bpp 8 +:0 local BINDIR/X DEFAULTVT -dpi 100 -nolisten tcp ---- xc/programs/xdm/config/Xsession.orig 2001-01-17 18:45:24.000000000 -0500 -+++ xc/programs/xdm/config/Xsession 2002-09-07 03:43:35.000000000 -0500 +diff -urN xc/programs/xdm~/config/Xsession xc/programs/xdm/config/Xsession +--- xc/programs/xdm~/config/Xsession 2001-01-17 18:45:24.000000000 -0500 ++++ xc/programs/xdm/config/Xsession 2003-02-23 18:29:33.000000000 -0500 @@ -7,40 +7,5 @@ # # $XFree86: xc/programs/xdm/config/Xsession,v 1.3 2001/01/17 23:45:24 dawes Exp $ @@ -81,3 +157,35 @@ -fi +# invoke global X session script +. /etc/X11/Xsession +diff -urN xc/programs/xdm~/config/xdm-conf.cpp xc/programs/xdm/config/xdm-conf.cpp +--- xc/programs/xdm~/config/xdm-conf.cpp 2003-02-23 18:28:15.000000000 -0500 ++++ xc/programs/xdm/config/xdm-conf.cpp 2003-02-23 18:36:41.000000000 -0500 +@@ -10,19 +10,21 @@ + DisplayManager.keyFile: XDMDIR/xdm-keys + DisplayManager.servers: XDMDIR/Xservers + DisplayManager.accessFile: XDMDIR/Xaccess ++DisplayManager.authDir: XDMVARDIR + DisplayManager.willing: SU nobody -c XDMDIR/Xwilling +-! All displays should use authorization, but we cannot be sure +-! X terminals may not be configured that way, so they will require ++! All displays should use authorization, but we cannot be sure X terminals ++! will be configured to support it, so those that do not will require + ! individual resource settings. + DisplayManager*authorize: true +-! The following three resources set up display :0 as the console. +-DisplayManager._0.setup: XDMDIR/Xsetup_0 +-DisplayManager._0.startup: XDMDIR/GiveConsole +-DisplayManager._0.reset: XDMDIR/TakeConsole +-! ++! Scripts to start the server, start the user session, and reset the server ++DisplayManager*setup: XDMDIR/Xsetup ++DisplayManager*startup: XDMDIR/Xstartup ++DisplayManager*reset: XDMDIR/Xreset + DisplayManager*resources: XDMDIR/Xresources + DisplayManager*session: XDMDIR/Xsession + DisplayManager*authComplain: true ++DisplayManager*userPath: /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games ++DisplayManager*systemPath: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 + #ifdef XPM + DisplayManager*loginmoveInterval: 10 + #endif /* XPM */