[Xorg-commit] xc/programs/xdm Imakefile,1.1.4.4,1.1.4.5 auth.c,1.1.4.4,1.1.4.5 daemon.c,1.1.4.1,1.1.4.2 dm.c,1.1.4.2,1.1.4.3 genauth.c,1.1.4.5,1.1.4.6 policy.c,1.1.4.1,1.1.4.2 session.c,1.1.4.4,1.1.4.5 xdm.man,1.1.4.3,1.1.4.4 xdmcp.c,1.1.4.4,1.1.4.5
Kaleb Keithley
xorg-commit at pdx.freedesktop.org
Wed May 9 17:30:30 EEST 2007
- Previous message: [Xorg-commit] xc/programs/luit charset.c,1.1,1.1.4.1 other.c,1.1,1.1.4.1 other.h,1.1,1.1.4.1
- Next message: [Xorg-commit] xc/programs/xdm/config Imakefile,1.1.4.2,1.1.4.3 xdm-conf.cpp,1.1.4.1,1.1.4.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: kaleb
Update of /cvs/xorg/xc/programs/xdm
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/programs/xdm
Modified Files:
Tag: XORG-CURRENT
Imakefile auth.c daemon.c dm.c genauth.c policy.c session.c
xdm.man xdmcp.c
Log Message:
merge most of XFree86 RC3 (4.3.99.903) from vendor branch.
bug #214
Index: Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/xdm/Imakefile,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.5
diff -u -d -r1.1.4.4 -r1.1.4.5
--- a/Imakefile 20 Dec 2003 00:28:31 -0000 1.1.4.4
+++ b/Imakefile 23 Feb 2004 21:37:40 -0000 1.1.4.5
@@ -4,7 +4,7 @@
-XCOMM $XFree86: xc/programs/xdm/Imakefile,v 3.64 2003/12/12 03:20:45 dawes Exp $
+XCOMM $XFree86: xc/programs/xdm/Imakefile,v 3.67 2004/01/25 01:12:24 dawes Exp $
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
@@ -149,6 +149,10 @@
VFORK_DEFINES = -DHAS_VFORK
#endif
+#if HasMkstemp
+MKSTEMP_DEFINES = -DHAS_MKSTEMP
+#endif
+
#if UseXKBInClients
XKB_CLIENT_DEFINES = XkbClientDefines
#endif
@@ -161,6 +165,10 @@
#if HasSetProcTitle
PROCTITLE_DEFINES = -DHAS_SETPROCTITLE
+#if defined(BSDOSArchitecture)
+# XXX - only BSD/OS has this in libutil
+SYS_LIBRARIES1 = -lutil
+#endif
#endif
#if !HasSnprintf
@@ -242,6 +250,7 @@
#endif
PROGRAMS = ProgramTargetName(xdm) ProgramTargetName(xdmshell) ProgramTargetName(sessreg) $(CHOOSER) $(XDM_SHADOW)
+ CHOOSERPATH = $(XDMDIR)/chooser
OSMAJORVERSION = OSMajorVersion
OSMINORVERSION = OSMinorVersion
CONN_DEFINES = $(CONNECTION_FLAGS)
@@ -254,8 +263,8 @@
-DOSMINORVERSION=$(OSMINORVERSION) \
$(XKB_CLIENT_DEFINES) $(USER_CONTEXT_DEFINES) \
$(XPM_DEFINES) $(XINERAMA_DEFINES) $(PROCTITLE_DEFINES) \
- $(IFADDRS_DEFINES) $(IPV6_DEFINES)
- EXTRAMANDEFS = $(RANDOM_DEFINES)
+ $(IFADDRS_DEFINES) $(IPV6_DEFINES) $(MKSTEMP_DEFINES)
+ EXTRAMANDEFS = $(RANDOM_DEFINES) -DCHOOSERPATH=$(CHOOSERPATH)
XCOMM
XCOMM Special definitions for compiling default resources; these parameters
@@ -277,7 +286,7 @@
'-DDEF_SYSTEM_SHELL="$(BOURNE_SHELL)"' \
'-DDEF_FAILSAFE_CLIENT="$(BINDIR)/xterm"' \
'-DDEF_XDM_CONFIG="$(XDMDIR)/xdm-config"' \
- '-DDEF_CHOOSER="$(XDMDIR)/chooser"' \
+ '-DDEF_CHOOSER="$(CHOOSERPATH)"' \
'-DDEF_AUTH_DIR="$(XDMDIR)"' \
'-DDEF_GREETER_LIB="$(XDMDIR)/libXdmGreet.so"'
Index: auth.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xdm/auth.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.5
diff -u -d -r1.1.4.4 -r1.1.4.5
--- a/auth.c 6 Dec 2003 13:24:29 -0000 1.1.4.4
+++ b/auth.c 23 Feb 2004 21:37:40 -0000 1.1.4.5
@@ -27,7 +27,7 @@
from The Open Group.
*/
-/* $XFree86: xc/programs/xdm/auth.c,v 3.31 2003/12/02 22:55:05 herrb Exp $ */
+/* $XFree86: xc/programs/xdm/auth.c,v 3.33 2004/01/16 00:03:54 herrb Exp $ */
/*
* xdm - display manager daemon
@@ -282,7 +282,7 @@
static char authdir2[] = "authfiles";
static int
-MakeServerAuthFile (struct display *d)
+MakeServerAuthFile (struct display *d, FILE ** file)
{
int len;
#if defined(SYSV) && !defined(SVR4)
@@ -292,52 +292,74 @@
#endif
char cleanname[NAMELEN];
int r;
+#ifdef HAS_MKSTEMP
+ int fd;
+#endif
struct stat statb;
- if (d->clientAuthFile && *d->clientAuthFile)
- len = strlen (d->clientAuthFile) + 1;
- else
- {
- CleanUpFileName (d->name, cleanname, NAMELEN - 8);
- len = strlen (authDir) + strlen (authdir1) + strlen (authdir2)
- + strlen (cleanname) + 14;
- }
- if (d->authFile)
- free (d->authFile);
- d->authFile = malloc ((unsigned) len);
- if (!d->authFile)
- return FALSE;
- if (d->clientAuthFile && *d->clientAuthFile)
- strcpy (d->authFile, d->clientAuthFile);
- else
- {
- sprintf (d->authFile, "%s/%s", authDir, authdir1);
- r = stat(d->authFile, &statb);
- if (r == 0) {
- if (statb.st_uid != 0)
- (void) chown(d->authFile, 0, statb.st_gid);
- if ((statb.st_mode & 0077) != 0)
- (void) chmod(d->authFile, statb.st_mode & 0700);
- } else {
- if (errno == ENOENT)
- r = mkdir(d->authFile, 0700);
- if (r < 0) {
+ *file = NULL;
+
+ if (!d->authFile) {
+ if (d->clientAuthFile && *d->clientAuthFile)
+ len = strlen (d->clientAuthFile) + 1;
+ else
+ {
+ CleanUpFileName (d->name, cleanname, NAMELEN - 8);
+ len = strlen (authDir) + strlen (authdir1) + strlen (authdir2)
+ + strlen (cleanname) + 14;
+ }
+ d->authFile = malloc (len);
+ if (!d->authFile)
+ return FALSE;
+ if (d->clientAuthFile && *d->clientAuthFile)
+ strcpy (d->authFile, d->clientAuthFile);
+ else
+ {
+ sprintf (d->authFile, "%s/%s", authDir, authdir1);
+ r = stat(d->authFile, &statb);
+ if (r == 0) {
+ if (statb.st_uid != 0)
+ (void) chown(d->authFile, 0, statb.st_gid);
+ if ((statb.st_mode & 0077) != 0)
+ (void) chmod(d->authFile, statb.st_mode & 0700);
+ } else {
+ if (errno == ENOENT)
+ r = mkdir(d->authFile, 0700);
+ if (r < 0) {
+ free (d->authFile);
+ d->authFile = NULL;
+ return FALSE;
+ }
+ }
+ sprintf (d->authFile, "%s/%s/%s", authDir, authdir1, authdir2);
+ r = mkdir(d->authFile, 0700);
+ if (r < 0 && errno != EEXIST) {
free (d->authFile);
d->authFile = NULL;
return FALSE;
}
+ sprintf (d->authFile, "%s/%s/%s/A%s-XXXXXX",
+ authDir, authdir1, authdir2, cleanname);
+#ifdef HAS_MKSTEMP
+ fd = mkstemp (d->authFile);
+ if (fd < 0) {
+ free (d->authFile);
+ d->authFile = NULL;
+ return FALSE;
+ }
+
+ *file = fdopen(fd, "w");
+ if (!*file)
+ (void) close (fd);
+ return TRUE;
+#else
+ (void) mktemp (d->authFile);
+#endif
}
- sprintf (d->authFile, "%s/%s/%s", authDir, authdir1, authdir2);
- r = mkdir(d->authFile, 0700);
- if (r < 0 && errno != EEXIST) {
- free (d->authFile);
- d->authFile = NULL;
- return FALSE;
- }
- sprintf (d->authFile, "%s/%s/%s/A%s-XXXXXX",
- authDir, authdir1, authdir2, cleanname);
- (void) mktemp (d->authFile);
}
+
+ (void) unlink (d->authFile);
+ *file = fopen (d->authFile, "w");
return TRUE;
}
@@ -353,11 +375,10 @@
int i;
mask = umask (0077);
- if (!d->authFile && !MakeServerAuthFile (d))
- return FALSE;
- (void) unlink (d->authFile);
- auth_file = fopen (d->authFile, "w");
+ ret = MakeServerAuthFile(d, &auth_file);
umask (mask);
+ if (!ret)
+ return FALSE;
if (!auth_file) {
Debug ("Can't creat auth file %s\n", d->authFile);
LogError ("Cannot open server authorization file %s\n", d->authFile);
@@ -484,7 +505,8 @@
Debug ("can't open new file %s\n", new_name);
return 0;
}
- *oldp = fopen (name, "r");
+ if (!*oldp)
+ *oldp = fopen (name, "r");
Debug ("opens succeeded %s %s\n", name, new_name);
return 1;
}
@@ -1206,7 +1228,7 @@
void
SetUserAuthorization (struct display *d, struct verify_info *verify)
{
- FILE *old, *new;
+ FILE *old = NULL, *new;
char home_name[1024], backup_name[1024], new_name[1024];
char *name = 0;
char *home;
@@ -1218,6 +1240,9 @@
int i;
int magicCookie;
int data_len;
+#ifdef HAS_MKSTEMP
+ int fd;
+#endif
Debug ("SetUserAuthorization\n");
auths = d->authorizations;
@@ -1230,29 +1255,61 @@
lockStatus = XauLockAuth (home_name, 1, 2, 10);
Debug ("Lock is %d\n", lockStatus);
if (lockStatus == LOCK_SUCCESS) {
- if (openFiles (home_name, new_name, &old, &new)) {
+ if (openFiles (home_name, new_name, &old, &new)
+ && (old != NULL) && (new != NULL)) {
name = home_name;
setenv = 0;
} else {
Debug ("openFiles failed\n");
XauUnlockAuth (home_name);
lockStatus = LOCK_ERROR;
+ if (old != NULL) {
+ (void) fclose (old);
+ old = NULL;
+ }
+ if (new != NULL)
+ (void) fclose (new);
}
}
}
if (lockStatus != LOCK_SUCCESS) {
- snprintf (backup_name, sizeof(backup_name), "%s/.XauthXXXXXX", d->userAuthDir);
+ snprintf (backup_name, sizeof(backup_name),
+ "%s/.XauthXXXXXX", d->userAuthDir);
+#ifdef HAS_MKSTEMP
+ fd = mkstemp (backup_name);
+ if (fd >= 0) {
+ old = fdopen (fd, "r");
+ if (old == NULL)
+ (void) close(fd);
+ }
+
+ if (old != NULL)
+#else
(void) mktemp (backup_name);
- lockStatus = XauLockAuth (backup_name, 1, 2, 10);
- Debug ("backup lock is %d\n", lockStatus);
- if (lockStatus == LOCK_SUCCESS) {
- if (openFiles (backup_name, new_name, &old, &new)) {
- name = backup_name;
- setenv = 1;
+#endif
+ {
+ lockStatus = XauLockAuth (backup_name, 1, 2, 10);
+ Debug ("backup lock is %d\n", lockStatus);
+ if (lockStatus == LOCK_SUCCESS) {
+ if (openFiles (backup_name, new_name, &old, &new)
+ && (old != NULL) && (new != NULL)) {
+ name = backup_name;
+ setenv = 1;
+ } else {
+ XauUnlockAuth (backup_name);
+ lockStatus = LOCK_ERROR;
+ if (old != NULL) {
+ (void) fclose (old);
+ old = NULL;
+ }
+ if (new != NULL)
+ (void) fclose (new);
+ }
+#ifdef HAS_MKSTEMP
} else {
- XauUnlockAuth (backup_name);
- lockStatus = LOCK_ERROR;
- }
+ (void) fclose (old);
+#endif
+ }
}
}
if (lockStatus != LOCK_SUCCESS) {
@@ -1371,6 +1428,7 @@
Debug ("Lock is %d\n", lockStatus);
if (lockStatus != LOCK_SUCCESS)
return;
+ old = NULL;
if (openFiles (name, new_name, &old, &new))
{
initAddrs ();
Index: daemon.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xdm/daemon.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/daemon.c 17 Nov 2003 19:03:47 -0000 1.1.4.1
+++ b/daemon.c 23 Feb 2004 21:37:40 -0000 1.1.4.2
@@ -26,7 +26,7 @@
from The Open Group.
*/
-/* $XFree86: xc/programs/xdm/daemon.c,v 3.20 2002/12/04 16:53:39 tsi Exp $ */
+/* $XFree86: xc/programs/xdm/daemon.c,v 3.22 2004/01/11 00:19:30 dawes Exp $ */
/*
* xdm - display manager daemon
@@ -39,16 +39,8 @@
#include <stdlib.h>
#include <string.h>
-#ifndef __GLIBC__
-# if defined(__osf__) || \
- defined(__GNU__) || \
- defined(__CYGWIN__) || \
- defined(linux)
-# define setpgrp setpgid
-# endif
-#endif
-#if defined(SVR4) || defined(USG) || defined(__GLIBC__)
+#if defined(USG)
# include <termios.h>
#else
# include <sys/ioctl.h>
@@ -66,101 +58,88 @@
#include "dm.h"
#include "dm_error.h"
-void
-BecomeOrphan (void)
-{
- Pid_t child_id;
+#if defined(__GLIBC__) || defined(CSRG_BASED)
+#define HAS_DAEMON
+#endif
- /*
- * fork so that the process goes into the background automatically. Also
- * has a nice side effect of having the child process get inherited by
- * init (pid 1).
- * Separate the child into its own process group before the parent
- * exits. This eliminates the possibility that the child might get
- * killed when the init script that's running xdm exits.
- */
+#ifndef X_NOT_POSIX
+#define HAS_SETSID
+#endif
- child_id = fork ();
- switch (child_id) {
- case 0:
- /* child */
- break;
- case -1:
- /* error */
- LogError ("daemon fork failed, errno = %d\n", errno);
- break;
+#ifndef HAS_SETSID
+#define setsid() MySetsid()
- default: {
- /* parent */
+static Pid_t
+MySetsid(void)
+{
+#if defined(TIOCNOTTY) || defined(TCCLRCTTY) || defined(TIOCTTY)
+ int fd;
+#endif
+ int stat;
-#if defined(CSRG_BASED) || defined(SYSV) || defined(SVR4) || defined(__QNXNTO__) || defined(__GLIBC__)
-#if defined(SVR4) || defined(__QNXNTO__)
- /* This gets error EPERM. Why? */
- int stat = setpgid(child_id, child_id);
-#elif defined(SYSV)
- /* don't know how to set child's process group */
- int stat = 0;
-#elif defined(__GLIBC__)
- int stat = setpgrp ();
-#else
- int stat = setpgrp (child_id, child_id);
+ fd = open("/dev/tty", O_RDWR);
+ if (fd >= 0) {
+#if defined(USG) && defined(TCCLRCTTY)
+ int zero = 0;
+ (void) ioctl (fd, TCCLRCTTY, &zero);
+#elif (defined(SYSV) || defined(SVR4)) && defined(TIOCTTY)
+ int zero = 0;
+ (void) ioctl (i, TIOCTTY, &zero);
+#elif defined(TIOCNOTTY)
+ (void) ioctl (i, TIOCNOTTY, (char *) 0); /* detach, BSD style */
#endif
- if (stat != 0)
- LogError ("setting process group for daemon failed: %s\n",
- strerror(errno));
-#endif /* ! (CSRG_BASED || SYSV || SVR4 || __QNXNTO__ || __GLIBC__) */
- }
- exit (0);
+ close(fd);
}
+
+#if defined(SYSV) || defined(__QNXNTO__)
+ return setpgrp();
+#else
+ return setpgid(0, getpid());
+#endif
}
+#endif /* !HAS_SETSID */
+/* detach */
void
BecomeDaemon (void)
{
- /*
- * Close standard file descriptors and get rid of controlling tty
- */
/* If our C library has the daemon() function, just use it. */
-#if defined(__GLIBC__) || defined(CSRG_BASED)
+#ifdef HAS_DAEMON
daemon (0, 0);
#else
- int i;
+ switch (fork()) {
+ case -1:
+ /* error */
+ LogError("daemon fork failed, %s\n", strerror(errno));
+ exit(1);
+ break;
+ case 0:
+ /* child */
+ break;
+ default:
+ /* parent */
+ exit(0);
+ }
-# if defined(SYSV) || defined(SVR4) || defined(__QNXNTO__)
- setpgrp ();
-# else
- setpgrp (0, getpid ());
-# endif
+ if (setsid() == -1) {
+ LogError("setting session id for daemon failed: %s\n",
+ strerror(errno));
+ exit(1);
+ }
+
+ chdir("/");
close (0);
close (1);
close (2);
-# if !defined(__UNIXOS2__) && !defined(__CYGWIN__)
-# if !((defined(SYSV) || defined(SVR4)) && defined(i386))
- if ((i = open ("/dev/tty", O_RDWR)) >= 0) { /* did open succeed? */
-# if defined(USG) && defined(TCCLRCTTY)
- int zero = 0;
- (void) ioctl (i, TCCLRCTTY, &zero);
-# else
-# if (defined(SYSV) || defined(SVR4)) && defined(TIOCTTY)
- int zero = 0;
- (void) ioctl (i, TIOCTTY, &zero);
-# else
- (void) ioctl (i, TIOCNOTTY, (char *) 0); /* detach, BSD style */
-# endif
-# endif
- (void) close (i);
- }
-# endif /* !((SYSV || SVR4) && i386) */
-# endif /* !__UNIXOS2__ && !__CYGWIN__*/
/*
* Set up the standard file descriptors.
*/
- (void) open ("/", O_RDONLY); /* root inode already in core */
+ (void) open ("/dev/null", O_RDWR);
(void) dup2 (0, 1);
(void) dup2 (0, 2);
-#endif
+#endif /* HAS_DAEMON */
}
Index: dm.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xdm/dm.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- a/dm.c 26 Nov 2003 22:49:11 -0000 1.1.4.2
+++ b/dm.c 23 Feb 2004 21:37:40 -0000 1.1.4.3
@@ -26,7 +26,7 @@
from The Open Group.
*/
-/* $XFree86: xc/programs/xdm/dm.c,v 3.23 2003/09/17 05:48:32 herrb Exp $ */
+/* $XFree86: xc/programs/xdm/dm.c,v 3.24 2004/01/10 21:26:29 herrb Exp $ */
/*
* xdm - display manager daemon
@@ -133,11 +133,9 @@
exit (1);
}
if (debugLevel == 0 && daemonMode)
- BecomeOrphan ();
+ BecomeDaemon ();
if (debugLevel >= 10)
nofork_session = 1;
- if (debugLevel == 0 && daemonMode)
- BecomeDaemon ();
/* SUPPRESS 560 */
if ((oldpid = StorePid ()))
{
@@ -478,12 +476,6 @@
else
RestartDisplay (d, FALSE);
break;
- default:
- Debug ("Display exited with unknown status %d\n", waitVal(status));
- LogError ("Unknown session exit code %d from process %d\n",
- waitVal (status), pid);
- StopDisplay (d);
- break;
case OPENFAILED_DISPLAY:
Debug ("Display exited with OPENFAILED_DISPLAY, try %d of %d\n",
d->startTries, d->startAttempts);
@@ -556,6 +548,12 @@
else
RestartDisplay (d, FALSE);
break;
+ default:
+ Debug ("Display exited with unknown status %d\n", waitVal(status));
+ LogError ("Unknown session exit code %d from process %d\n",
+ waitVal (status), pid);
+ StopDisplay (d);
+ break;
}
}
/* SUPPRESS 560 */
Index: genauth.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xdm/genauth.c,v
retrieving revision 1.1.4.5
retrieving revision 1.1.4.6
diff -u -d -r1.1.4.5 -r1.1.4.6
--- a/genauth.c 20 Dec 2003 00:28:31 -0000 1.1.4.5
+++ b/genauth.c 23 Feb 2004 21:37:40 -0000 1.1.4.6
@@ -27,7 +27,7 @@
from The Open Group.
*/
-/* $XFree86: xc/programs/xdm/genauth.c,v 3.22 2003/12/18 16:38:39 dawes Exp $ */
+/* $XFree86: xc/programs/xdm/genauth.c,v 3.24 2003/12/21 15:07:06 herrb Exp $ */
/*
* xdm - display manager daemon
@@ -127,15 +127,15 @@
* DAMAGE.
*/
-static unsigned int epool[32], erotate, eadd_ptr;
+static CARD32 epool[32], erotate, eadd_ptr;
static void
-add_entropy (unsigned const int *in, int nwords)
+add_entropy (const CARD32 *in, int nwords)
{
- static unsigned const int twist_table[8] = {
+ static const CARD32 twist_table[8] = {
0, 0x3b6e20c8, 0x76dc4190, 0x4db26158,
0xedb88320, 0xd6d6a3e8, 0x9b64c2b0, 0xa00ae278 };
- unsigned i, w;
+ CARD32 i, w;
int new_rotate;
while (nwords--) {
@@ -180,9 +180,9 @@
* reflect the addition of 16 longwords of new data.
*/
static void
-pmd5_hash (unsigned int *out, unsigned const int in[16])
+pmd5_hash (CARD32 *out, const CARD32 in[16])
{
- unsigned int a, b, c, d;
+ CARD32 a, b, c, d;
a = out[0];
b = out[1];
@@ -287,7 +287,7 @@
return -1;
}
readlen += cnt;
- add_entropy((unsigned*)buf, (cnt + 3) / 4);
+ add_entropy((CARD32 *)buf, (cnt + 3) / 4);
}
close (fd);
Debug("read %d bytes from entropy source \"%s\"\n", readlen, name);
@@ -299,7 +299,7 @@
{
struct timeval now;
X_GETTIMEOFDAY (&now);
- add_entropy((unsigned*)&now, sizeof(now)/sizeof(unsigned));
+ add_entropy((CARD32 *)&now, sizeof(now)/sizeof(CARD32));
}
#define BSIZ 0x10000
@@ -319,8 +319,8 @@
void
AddPreGetEntropy (void)
{
- static long offset;
- long readlen;
+ static off_t offset;
+ off_t readlen;
AddTimerEntropy();
if ((readlen = sumFile (randomFile, BSIZ, SEEK_SET, offset)) == BSIZ) {
@@ -347,7 +347,7 @@
static void
InitXdmcpWrapper (void)
{
- uint32_t sum[4];
+ CARD32 sum[4];
#ifdef ARC4_RANDOM
sum[0] = arc4random();
@@ -441,14 +441,14 @@
return 1;
#else /* !XDMAUTH */
#ifdef ARC4_RANDOM
- unsigned int *rnd = (unsigned*)auth;
+ CARD32 *rnd = (CARD32 *)auth;
int i;
for (i = 0; i < len; i += 4)
rnd[i / 4] = arc4random();
return 1;
#else /* !ARC4_RANDOM */
- unsigned tmp[4] = { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 };
+ CARD32 tmp[4] = { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 };
#ifdef DEV_RANDOM
int fd;
Index: policy.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xdm/policy.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/policy.c 17 Nov 2003 19:03:47 -0000 1.1.4.1
+++ b/policy.c 23 Feb 2004 21:37:40 -0000 1.1.4.2
@@ -33,7 +33,7 @@
*
* policy.c. Implement site-dependent policy for XDMCP connections
*/
-/* $XFree86: xc/programs/xdm/policy.c,v 3.8 2002/12/07 20:31:04 herrb Exp $ */
+/* $XFree86: xc/programs/xdm/policy.c,v 3.9 2004/01/01 17:12:34 herrb Exp $ */
# include "dm.h"
# include "dm_auth.h"
@@ -179,7 +179,28 @@
ARRAY16Ptr connectionTypes,
ARRAYofARRAY8Ptr connectionAddresses)
{
- return 0;
+ int i;
+
+ /*
+ * Select one supported connection type
+ */
+
+ for (i = 0; i < connectionTypes->length; i++) {
+ switch (connectionTypes->data[i]) {
+ case FamilyLocal:
+#if defined(TCPCONN)
+ case FamilyInternet:
+#if defined(IPv6) && defined(AF_INET6)
+ case FamilyInternet6:
+#endif /* IPv6 */
+#endif /* TCPCONN */
+#if defined(DNETCONN)
+ case FamilyDECnet:
+#endif /* DNETCONN */
+ return i;
+ }
+ } /* for */
+ return -1;
}
#endif /* XDMCP */
Index: session.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xdm/session.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.5
diff -u -d -r1.1.4.4 -r1.1.4.5
--- a/session.c 6 Dec 2003 13:24:29 -0000 1.1.4.4
+++ b/session.c 23 Feb 2004 21:37:40 -0000 1.1.4.5
@@ -27,7 +27,7 @@
from The Open Group.
*/
-/* $XFree86: xc/programs/xdm/session.c,v 3.36 2003/09/29 21:00:08 herrb Exp $ */
+/* $XFree86: xc/programs/xdm/session.c,v 3.37 2004/01/07 04:28:06 dawes Exp $ */
/*
* xdm - display manager daemon
@@ -88,7 +88,7 @@
extern void endspent(void);
# endif
#endif
-#if defined(CSRG_BASED) || defined(__GLIBC__)
+#if defined(CSRG_BASED) || defined(__GLIBC__) || defined(USL)
# include <pwd.h>
# include <unistd.h>
#else
Index: xdm.man
===================================================================
RCS file: /cvs/xorg/xc/programs/xdm/xdm.man,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -d -r1.1.4.3 -r1.1.4.4
--- a/xdm.man 6 Dec 2003 13:24:29 -0000 1.1.4.3
+++ b/xdm.man 23 Feb 2004 21:37:40 -0000 1.1.4.4
@@ -24,7 +24,7 @@
.\" other dealings in this Software without prior written authorization
.\" from The Open Group.
.\"
-.\" $XFree86: xc/programs/xdm/xdm.man,v 3.27 2003/11/22 04:51:02 dawes Exp $
+.\" $XFree86: xc/programs/xdm/xdm.man,v 3.29 2004/01/12 21:43:19 herrb Exp $
.\"
.TH XDM 1 __xorgversion__
.SH NAME
@@ -93,13 +93,6 @@
.I chooser
or X terminals themselves.
.PP
-.I Xdm
-can be configured to ignore BroadcastQuery messages from selected hosts.
-This is useful when you don't want the host to appear in menus produced
-by
-.I chooser
-or X terminals themselves.
-.PP
Because
.I xdm
provides the first interface that users will see, it is designed to be
@@ -418,7 +411,7 @@
.IP "\fBDisplayManager.\fP\fIDISPLAY\fP\fB.chooser\fP"
Specifies the program run to offer a host menu for Indirect queries
redirected to the special host name CHOOSER.
-\fI __projectroot__/lib/X11/xdm/chooser\fP is the default.
+\fI CHOOSERPATH \fP is the default.
See the sections \fBXDMCP Access Control\fP and \fBChooser\fP.
.IP "\fBDisplayManager.\fP\fIDISPLAY\fP\fB.xrdb\fP"
Specifies the program used to load the resources. By default,
@@ -661,11 +654,6 @@
This can be used to prevent an xdm server from appearing on
menus based on Broadcast queries.
.PP
-To only respond to Direct queries for a host or pattern,
-it can be followed by the optional ``NOBROADCAST'' keyword.
-This can be used to prevent an xdm server from appearing on
-menus based on Broadcast queries.
-.PP
An Indirect entry also contains a host name or pattern,
but follows it with a list of
host names or macros to which indirect queries should be sent.
@@ -922,15 +910,6 @@
SHELL the value of \fBDisplayManager.\fP\fIDISPLAY\fP\fB.systemShell\fP
XAUTHORITY may be set to an authority file
.fi
-.IP "\fBxlogin.Login.allowRootLogin\fP"
-If set to ``false'', don't allow root (and any other user with uid = 0) to
-log in directly.
-The default is ``true''.
-.IP "\fBxlogin.Login.allowNullPasswd\fP"
-If set to ``true'', allow an otherwise failing password match to succeed
-if the account does not require a password at all.
-The default is ``false'', so only users that have passwords assigned can
-log in.
.PP
Note that since \fIxdm\fP grabs the keyboard, any other windows will not be
able to receive keyboard input. They will be able to interact with
@@ -999,6 +978,15 @@
.IP "\fBxlogin.Login.failTimeout\fP"
The number of seconds that the failure message is displayed.
The default is 30.
+.IP "\fBxlogin.Login.allowRootLogin\fP"
+If set to ``false'', don't allow root (and any other user with uid = 0) to
+log in directly.
+The default is ``true''.
+.IP "\fBxlogin.Login.allowNullPasswd\fP"
+If set to ``true'', allow an otherwise failing password match to succeed
+if the account does not require a password at all.
+The default is ``false'', so only users that have passwords assigned can
+log in.
.IP "\fBxlogin.Login.translations\fP"
This specifies the translations used for the login widget. Refer to the X
Toolkit documentation for a complete discussion on translations. The default
@@ -1023,15 +1011,6 @@
<Key>: insert-char() \\
.fi
-.IP "\fBxlogin.Login.allowRootLogin\fP"
-If set to ``false'', don't allow root (and any other user with uid = 0) to
-log in directly.
-The default is ``true''.
-.IP "\fBxlogin.Login.allowNullPasswd\fP"
-If set to ``true'', allow an otherwise failing password match to succeed
-if the account does not require a password at all.
-The default is ``false'', so only users that have passwords assigned can
-log in.
.PP
The actions which are supported by the widget are:
.IP "delete-previous-character"
@@ -1352,7 +1331,7 @@
to manage sessions on all three of these terminals. See the section
\fBControlling Xdm\fP for a description of using signals to enable
and disable these terminals in a manner reminiscent of
-.IR init (8).
+.IR init (__adminmansuffix__).
.SH LIMITATIONS
One thing that
.I xdm
@@ -1368,7 +1347,7 @@
.I $HOME/.Xauthority
user authorization file where \fIxdm\fP stores keys for clients to read
.TP 20
-.I __projectroot__/lib/X11/xdm/chooser
+.I CHOOSERPATH
the default chooser
.TP 20
.I __projectroot__/bin/xrdb
Index: xdmcp.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xdm/xdmcp.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.5
diff -u -d -r1.1.4.4 -r1.1.4.5
--- a/xdmcp.c 6 Dec 2003 13:24:29 -0000 1.1.4.4
+++ b/xdmcp.c 23 Feb 2004 21:37:40 -0000 1.1.4.5
@@ -27,7 +27,7 @@
from The Open Group.
*/
-/* $XFree86: xc/programs/xdm/xdmcp.c,v 3.25 2003/11/23 22:36:03 herrb Exp $ */
+/* $XFree86: xc/programs/xdm/xdmcp.c,v 3.26 2004/01/07 04:28:06 dawes Exp $ */
/*
* xdm - display manager daemon
@@ -417,7 +417,7 @@
{
#ifdef STREAMSCONN
if (xdmcpFd >= 0 && FD_ISSET (xdmcpFd, &reads))
- ProcessRequestSocket ();
+ ProcessRequestSocket (xdmcpFd);
#endif
if (chooserFd >= 0 && FD_ISSET (chooserFd, &reads))
{
- Previous message: [Xorg-commit] xc/programs/luit charset.c,1.1,1.1.4.1 other.c,1.1,1.1.4.1 other.h,1.1,1.1.4.1
- Next message: [Xorg-commit] xc/programs/xdm/config Imakefile,1.1.4.2,1.1.4.3 xdm-conf.cpp,1.1.4.1,1.1.4.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the xorg-commit
mailing list