mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-16 19:32:26 +00:00
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
This commit is contained in:
parent
90f1536dd3
commit
adc7f9a4eb
705 changed files with 30330 additions and 26603 deletions
26
os/auth.c
26
os/auth.c
|
|
@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
|
|||
from The Open Group.
|
||||
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/os/auth.c,v 1.12 2002/12/09 02:56:03 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/os/auth.c,v 1.14 2003/08/27 19:57:21 herrb Exp $ */
|
||||
|
||||
/*
|
||||
* authorization hooks for the server
|
||||
|
|
@ -128,30 +128,19 @@ InitAuthorization (char *file_name)
|
|||
authorization_file = file_name;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
LoadAuthorization (void)
|
||||
{
|
||||
FILE *f;
|
||||
Xauth *auth;
|
||||
int i;
|
||||
int count = 0;
|
||||
#if !defined(WIN32) && !defined(__UNIXOS2__)
|
||||
char *buf;
|
||||
#endif
|
||||
|
||||
ShouldLoadAuth = FALSE;
|
||||
if (!authorization_file)
|
||||
return 0;
|
||||
#if !defined(WIN32) && !defined(__UNIXOS2__)
|
||||
buf = xalloc (strlen(authorization_file) + 5);
|
||||
if (!buf)
|
||||
return -1;
|
||||
sprintf (buf, "cat %s", authorization_file);
|
||||
f = Popen (buf, "r");
|
||||
xfree (buf);
|
||||
#else
|
||||
f = fopen (authorization_file, "r");
|
||||
#endif
|
||||
|
||||
f = Fopen (authorization_file, "r");
|
||||
if (!f)
|
||||
return -1;
|
||||
|
||||
|
|
@ -169,12 +158,7 @@ LoadAuthorization (void)
|
|||
XauDisposeAuth (auth);
|
||||
}
|
||||
|
||||
#if !defined(WIN32) && !defined(__UNIXOS2__)
|
||||
if (Pclose (f) != 0)
|
||||
return -1;
|
||||
#else
|
||||
fclose (f);
|
||||
#endif
|
||||
Fclose (f);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue