summaryrefslogtreecommitdiff
path: root/os/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/auth.c')
-rw-r--r--os/auth.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/os/auth.c b/os/auth.c
index b596aed44..a1cbc8c1f 100644
--- a/os/auth.c
+++ b/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;
}