fa568bc3f52171fabcf892301d4263537cabaf8a
[openafs.git] / src / afs / OBSD / 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  * osi_misc.c
12  *
13  * OpenBSD version of afs_osi_suser() by Jim Rees.
14  * See osi_machdep.h for afs_suser macro. It simply calls afs_osi_suser()
15  * with the creds of the current process.
16  */
17
18 #include <afsconfig.h>
19 #include "afs/param.h"
20
21 RCSID("$Header$");
22
23 #include "afs/sysincludes.h"    /* Standard vendor system headers */
24 #include "afs/afsincludes.h"    /* Afs-based standard headers */
25
26 /*
27  * afs_suser() returns true if the caller is superuser, false otherwise.
28  *
29  * Note that it must NOT set errno.
30  */
31
32 int
33 afs_osi_suser(void *credp)
34 {
35     return (suser((struct ucred *) credp, &curproc->p_acflag) ? 0 : 1);
36 }
37
38 int
39 afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, retval)
40      long *retval;
41      long dev, near_inode, param1, param2, param3, param4;
42 {
43     return EINVAL;
44 }
45
46 int
47 afs_syscall_iopen(dev, inode, usrmod, retval)
48      long *retval;
49      int dev, inode, usrmod;
50 {
51     return EINVAL;
52 }
53
54 int
55 afs_syscall_iincdec(dev, inode, inode_p1, amount)
56      int dev, inode, inode_p1, amount;
57 {
58     return EINVAL;
59 }