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 * Copyright 2017 RackTop Systems. 15 */ 16 17 18 #include <sys/types.h> 19 #include <sys/time.h> 20 #include <sys/thread.h> 21 #include <sys/cred.h> 22 23 struct cred { 24 uint32_t pad[100]; 25 }; 26 27 cred_t cred0; 28 cred_t *kcred = &cred0; 29 30 cred_t * 31 _curcred(void) 32 { 33 /* Thread-specific data? */ 34 return (&cred0); 35 } 36 37 /*ARGSUSED*/ 38 void 39 crfree(cred_t *cr) 40 { 41 } 42 43 /*ARGSUSED*/ 44 void 45 crhold(cred_t *cr) 46 { 47 } 48 49 /*ARGSUSED*/ 50 uid_t 51 crgetuid(const cred_t *cr) 52 { 53 return (0); 54 } 55 56 /*ARGSUSED*/ 57 uid_t 58 crgetruid(const cred_t *cr) 59 { 60 return (0); 61 } 62 63 /*ARGSUSED*/ 64 uid_t 65 crgetgid(const cred_t *cr) 66 { 67 return (0); 68 } 69 70 /*ARGSUSED*/ 71 int 72 crgetngroups(const cred_t *cr) 73 { 74 return (0); 75 } 76 77 /*ARGSUSED*/ 78 const gid_t * 79 crgetgroups(const cred_t *cr) 80 { 81 return (NULL); 82 } 83 84 cred_t * 85 zone_kcred(void) 86 { 87 return (kcred); 88 } 89