merge latest (4.3.99.16) from XFree86 (vendor) branch
This commit is contained in:
23
os/auth.c
23
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,7 +128,7 @@ InitAuthorization (char *file_name)
|
||||
authorization_file = file_name;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
LoadAuthorization (void)
|
||||
{
|
||||
FILE *f;
|
||||
@@ -142,16 +142,8 @@ LoadAuthorization (void)
|
||||
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 +161,7 @@ LoadAuthorization (void)
|
||||
XauDisposeAuth (auth);
|
||||
}
|
||||
|
||||
#if !defined(WIN32) && !defined(__UNIXOS2__)
|
||||
if (Pclose (f) != 0)
|
||||
return -1;
|
||||
#else
|
||||
fclose (f);
|
||||
#endif
|
||||
Fclose (f);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user