mkcookie.c revision 919
1104N/A* mkcookie.c 1.x
370N/A#ifdef X_NOT_STDC_ENV
277N/Atypedef struct displayType {
277N/Astruct verify_info {
319N/Astruct AuthProtocol {
70N/A int name_length;
414N/A int (*GetXdmcpAuth)();
1122N/A unsigned short address_length;
763N/A unsigned short number_length;
493N/Astatic int auth_name_len;
char *name;
char *value;
char *result;
if (!result) {
return result;
char *name;
char *value;
char *newe;
int envsize;
if (!newe) {
if (*old) {
envsize = 0;
if (!new) {
return new;
int len;
while (len-- > 0)
#ifdef DEBUG
int len;
char *data;
for (i = 0; i < len; i++)
int family;
struct addrList *a;
unsigned short family;
if (!new) {
char *name;
int fd;
#ifdef TCPCONN
#ifdef IPv6
int family;
int addr_length;
char *addr;
int cmd;
char *arg;
int ret;
return(ret);
int fd;
int len;
char *addr;
int family;
#ifdef SIOCGLIFCONF
#ifdef SIOCGLIFNUM
#ifdef SIOCGLIFCONF
--n >= 0; ifr++)
&addr);
ifr++)
if (family <= 0)
#ifdef IPv6
/* stolen from xinit.c */
#ifdef hpux
int *len;
char **addr;
if (len == 0)
case AF_UNSPEC:
#ifndef hpux
case AF_UNIX:
#ifdef TCPCONN
case AF_INET:
return (AF_INET);
#ifdef IPv6
case AF_INET6:
return (AF_INET6);
case AF_DECnet:
return (AF_DECnet);
char *name;
char *colon;
if (colon) {
++colon;
if (number) {
int mask;
if (!*newp) {
doneAddrs ()
struct addrList *a, *n;
for (a = addrs; a; a = n) {
n = a->next;
if (a->address)
if (a->number)
free ((char *) a);
unsigned short name_len;
char *name;
int namelen;
char *name;
if (!new)
return (Xauth *) 0;
return (Xauth *) 0;
return (Xauth *) 0;
return new;
char *auth;
int len;
int seed;
int value;
int fd;
auth[i] = (
char *authFile;
int mask;
int ret;
if (!auth_file) {
return ret;
static struct AuthProtocol *
int name_length;
char *name;
for (i = 0; i < NUM_AUTHORIZATION; i++)
return &AuthProtocols[i];
return (struct AuthProtocol *) 0;
char *name;
int name_length;
struct AuthProtocol *a;
if (!a->inited)
return auth;
struct display *d;
if (d->authorization)
if (!auth)
struct display *d;
char *name;
char *home;
char *envname = 0;
int lockStatus;
int setenv;
char **setEnv ();
extern char *getenv ();
if (home) {
setenv = 0;
addrs = 0;
if (old) {
doneAddrs ();
if (setenv) {
if (envname)
char *str;
int argc;
char *argv[];
struct display d;
int server_number;
char *au_name;
d.authFile);
if (au_name) {
d.peer = 0;
d.peerlen = 0;
exit(0);