Standardize License information
[openafs.git] / src / afs / HPUX / osi_misc.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11  * Implements:
12  * afs_suser
13  */
14
15 #include "../afs/param.h"       /* Should be always first */
16 #include "../afs/sysincludes.h" /* Standard vendor system headers */
17 #include "../afs/afsincludes.h" /* Afs-based standard headers */
18
19 /*
20  * afs_suser() returns true if the caller is superuser, false otherwise.
21  *
22  * Note that it must NOT set errno.
23  *
24  * Here we have to save and restore errno since the HP-UX suser() sets errno.
25  */
26
27 afs_suser() {
28     int save_errno;
29     int code;
30
31     save_errno = u.u_error;
32     code = suser();
33     u.u_error = save_errno;
34
35     return code;
36 }