xref: /titanic_44/usr/src/lib/libfakekernel/common/cred.c (revision 0b9539b1c0647a66f0ba973de2f8dfd1f5d44f17)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
14  */
15 
16 
17 #include <sys/types.h>
18 #include <sys/time.h>
19 #include <sys/thread.h>
20 #include <sys/cred.h>
21 
22 struct cred {
23 	uint32_t	pad[100];
24 };
25 
26 cred_t cred0;
27 cred_t *kcred = &cred0;
28 
29 cred_t *
30 _curcred(void)
31 {
32 	/* Thread-specific data? */
33 	return (&cred0);
34 }
35 
36 /*ARGSUSED*/
37 void
38 crfree(cred_t *cr)
39 {
40 }
41 
42 /*ARGSUSED*/
43 void
44 crhold(cred_t *cr)
45 {
46 }
47 
48 /*ARGSUSED*/
49 uid_t
50 crgetuid(const cred_t *cr)
51 {
52 	return (0);
53 }
54 
55 cred_t *
56 zone_kcred(void)
57 {
58 	return (kcred);
59 }
60