Home
last modified time | relevance | path

Searched refs:cr (Results 1 – 25 of 547) sorted by relevance

12345678910>>...22

/illumos-gate/usr/src/uts/common/os/
H A Dpolicy.c159 #define HAS_ALLPRIVS(cr) priv_isfullset(&CR_OEPRIV(cr)) argument
160 #define ZONEPRIVS(cr) ((cr)->cr_zone->zone_privset) argument
161 #define HAS_ALLZONEPRIVS(cr) priv_issubset(ZONEPRIVS(cr), &CR_OEPRIV(cr)) argument
162 #define HAS_PRIVILEGE(cr, pr) ((pr) == PRIV_ALL ? \ argument
163 HAS_ALLPRIVS(cr) : \
164 PRIV_ISASSERT(&CR_OEPRIV(cr), pr))
166 #define FAST_BASIC_CHECK(cr, priv) \ argument
167 if (PRIV_ISASSERT(&CR_OEPRIV(cr), priv)) { \
230 priv_policy_errmsg(const cred_t *cr, int priv, const char *msg) in priv_policy_errmsg() argument
257 if (priv_debug == 0 && (CR_FLAGS(cr) & PRIV_DEBUG) == 0) in priv_policy_errmsg()
[all …]
H A Dcred.c251 cred_t *cr = kmem_cache_alloc(cred_cache, flgs); in cralloc_flags() local
253 if (cr == NULL) in cralloc_flags()
256 cr->cr_ref = 1; /* So we can crfree() */ in cralloc_flags()
257 cr->cr_zone = NULL; in cralloc_flags()
258 cr->cr_label = NULL; in cralloc_flags()
259 cr->cr_ksid = NULL; in cralloc_flags()
260 cr->cr_klpd = NULL; in cralloc_flags()
261 cr->cr_grps = NULL; in cralloc_flags()
262 return (cr); in cralloc_flags()
277 cred_t *cr = cralloc(); in cralloc_ksid() local
[all …]
H A Dpriv.c167 priv_pr_spriv(proc_t *p, prpriv_t *prpriv, const cred_t *cr) in priv_pr_spriv() argument
190 if (priv_proc_cred_perm(cr, p, &oldcred, VWRITE) != 0) { in priv_pr_spriv()
202 eset = CR_OEPRIV(cr); in priv_pr_spriv()
310 priv_getset(const cred_t *cr, int set) in priv_getset() argument
314 if ((CR_FLAGS(cr) & PRIV_AWARE) == 0) in priv_getset()
317 return (&CR_OEPRIV(cr)); in priv_getset()
319 return (&CR_OPPRIV(cr)); in priv_getset()
321 return (&CR_PRIVS(cr)->crprivs[set]); in priv_getset()
331 priv_getinfo(const cred_t *cr, void *buf) in priv_getinfo() argument
336 ii->val = CR_FLAGS(cr); in priv_getinfo()
[all …]
/illumos-gate/usr/src/uts/common/syscall/
H A Duid.c50 cred_t *cr, *newcr; in setuid() local
79 cr = p->p_cred; in setuid()
80 crhold(cr); in setuid()
83 if ((uid == cr->cr_ruid || uid == cr->cr_suid) && in setuid()
84 secpolicy_allow_setid(cr, uid, B_TRUE) != 0) { in setuid()
86 crfree(cr); in setuid()
87 if (cr != p->p_cred) in setuid()
90 crcopy_to(cr, newcr); in setuid()
95 } else if ((error = secpolicy_allow_setid(cr, uid, B_FALSE)) == 0) { in setuid()
97 crfree(cr); in setuid()
[all …]
H A Dgid.c47 cred_t *cr, *newcr; in setgid() local
72 cr = p->p_cred; in setgid()
73 crhold(cr); in setgid()
77 if ((gid == cr->cr_rgid || gid == cr->cr_sgid) && in setgid()
78 secpolicy_allow_setid(cr, -1, B_TRUE) != 0) { in setgid()
80 crfree(cr); in setgid()
81 if (cr != p->p_cred) in setgid()
84 crcopy_to(cr, newcr); in setgid()
89 } else if ((error = secpolicy_allow_setid(cr, -1, B_FALSE)) == 0) { in setgid()
91 crfree(cr); in setgid()
[all …]
H A Dppriv.c58 cred_t *cr, *pcr; in setppriv() local
69 cr = cralloc(); in setppriv()
92 crfree(cr); in setppriv()
102 crfree(cr); in setppriv()
121 crcopy_to(pcr, cr); in setppriv()
128 priv_set_PA(cr); in setppriv()
130 target = &(CR_PRIVS(cr)->crprivs[type]); in setppriv()
155 priv_intersect(&pset, &CR_EPRIV(cr)); in setppriv()
168 cr->cr_uid != 0 && cr->cr_ruid != 0 && cr->cr_suid != 0) { in setppriv()
169 priv_set_t diff = CR_OPPRIV(cr); in setppriv()
[all …]
H A Dgroups.c44 cred_t *cr, *newcr; in setgroups() local
94 cr = p->p_cred; in setgroups()
95 crhold(cr); in setgroups()
98 if ((error = secpolicy_allow_setid(cr, -1, B_FALSE)) != 0) { in setgroups()
104 crfree(cr); in setgroups()
108 crfree(cr); in setgroups()
109 if (cr != p->p_cred) in setgroups()
112 crdup_to(cr, newcr); in setgroups()
118 crfree(cr); /* free the old one */ in setgroups()
132 struct cred *cr; in getgroups() local
[all …]
H A Daccess.c68 cred_t *cr; in caccess() local
76 cr = CRED(); in caccess()
80 (cr->cr_uid == cr->cr_ruid && cr->cr_gid == cr->cr_rgid); in caccess()
83 tmpcr = cr; in caccess()
85 tmpcr = crdup(cr); in caccess()
86 tmpcr->cr_uid = cr->cr_ruid; in caccess()
87 tmpcr->cr_gid = cr->cr_rgid; in caccess()
88 tmpcr->cr_ruid = cr->cr_uid; in caccess()
89 tmpcr->cr_rgid = cr->cr_gid; in caccess()
/illumos-gate/usr/src/uts/common/sys/
H A Dfem.h151 int (*femop_open)(femarg_t *vf, int mode, cred_t *cr, \
154 offset_t offset, cred_t *cr, \
157 cred_t *cr, caller_context_t *ct); \
159 cred_t *cr, caller_context_t *ct); \
161 int flag, cred_t *cr, int *rvalp, \
164 cred_t *cr, caller_context_t *ct); \
166 cred_t *cr, caller_context_t *ct); \
168 cred_t *cr, caller_context_t *ct); \
170 cred_t *cr, caller_context_t *ct); \
173 cred_t *cr, caller_context_t *ct, \
[all …]
H A Dvnode.h1080 uchar_t, uchar_t, uint_t, cred_t *cr,
1113 #define VOP_OPEN(vpp, mode, cr, ct) \ argument
1114 fop_open(vpp, mode, cr, ct)
1115 #define VOP_CLOSE(vp, f, c, o, cr, ct) \ argument
1116 fop_close(vp, f, c, o, cr, ct)
1117 #define VOP_READ(vp, uiop, iof, cr, ct) \ argument
1118 fop_read(vp, uiop, iof, cr, ct)
1119 #define VOP_WRITE(vp, uiop, iof, cr, ct) \ argument
1120 fop_write(vp, uiop, iof, cr, ct)
1121 #define VOP_IOCTL(vp, cmd, a, f, cr, rvp, ct) \ argument
[all …]
/illumos-gate/usr/src/cmd/tbl/
H A Dtu.c23 int cr, type, shortl; in makeline() local
26 cr=c; in makeline()
30 for(cr=c; cr < ncol && (ctype(i,cr)=='s'||type==thish(i,cr)); cr++); in makeline()
32 for(cr=c+1; cr<ncol && ctype(i,cr)=='s'; cr++); in makeline()
33 drawline(i, c, cr-1, lintype, 0, shortl); in makeline()
39 int cr, cl; in fullwide() local
42 cr= 0; in fullwide()
43 while (cr<ncol) in fullwide()
45 cl=cr; in fullwide()
48 for(cr=cl; cr<ncol; cr++) in fullwide()
[all …]
/illumos-gate/usr/src/lib/libfakekernel/common/
H A Dcred.c62 crfree(cred_t *cr) in crfree() argument
68 crhold(cred_t *cr) in crhold() argument
74 crgetuid(const cred_t *cr) in crgetuid() argument
76 return (cr->cr_uid); in crgetuid()
81 crgetruid(const cred_t *cr) in crgetruid() argument
83 return (cr->cr_uid); in crgetruid()
88 crgetgid(const cred_t *cr) in crgetgid() argument
95 crgetngroups(const cred_t *cr) in crgetngroups() argument
102 crgetgroups(const cred_t *cr) in crgetgroups() argument
109 crgetzoneid(const cred_t *cr) in crgetzoneid() argument
[all …]
H A Dksocket.c128 struct cred *cr) in ksocket_socket() argument
134 ASSERT(cr != NULL); in ksocket_socket()
162 struct cred *cr) in ksocket_bind() argument
167 ASSERT(cr != NULL); in ksocket_bind()
183 ksocket_listen(ksocket_t ks, int backlog, struct cred *cr) in ksocket_listen() argument
186 ASSERT(cr != NULL); in ksocket_listen()
199 socklen_t *addrlenp, ksocket_t *nks, struct cred *cr) in ksocket_accept() argument
204 ASSERT(cr != NULL); in ksocket_accept()
225 struct cred *cr) in ksocket_connect() argument
228 ASSERT(cr != NULL); in ksocket_connect()
[all …]
/illumos-gate/usr/src/uts/common/io/ksocket/
H A Dksocket.c51 struct cred *cr) in ksocket_socket() argument
59 ASSERT(cr != NULL); in ksocket_socket()
63 cr, &error); in ksocket_socket()
85 mod, version, flags, cr, &error); in ksocket_socket()
101 struct cred *cr) in ksocket_bind() argument
106 ASSERT(cr != NULL); in ksocket_bind()
111 error = socket_bind(KSTOSO(ks), addr, addrlen, _SOBIND_SOCKBSD, cr); in ksocket_bind()
117 ksocket_listen(ksocket_t ks, int backlog, struct cred *cr) in ksocket_listen() argument
120 ASSERT(cr != NULL); in ksocket_listen()
125 return (socket_listen(KSTOSO(ks), backlog, cr)); in ksocket_listen()
[all …]
/illumos-gate/usr/src/uts/common/fs/smbsrv/
H A Dsmb_cred.c67 cred_t *cr; in smb_cred_create() local
74 cr = crget(); in smb_cred_create()
75 ASSERT(cr != NULL); in smb_cred_create()
81 priv_addset(&CR_PPRIV(cr), PRIV_SYS_SMB); in smb_cred_create()
90 if (crsetugid(cr, token->tkn_user.i_id, gid) != 0) { in smb_cred_create()
91 crfree(cr); in smb_cred_create()
95 if (crsetgroups(cr, posix_grps->pg_ngrps, posix_grps->pg_grps) != 0) { in smb_cred_create()
96 crfree(cr); in smb_cred_create()
101 crsetsid(cr, &ksid, KSID_USER); in smb_cred_create()
103 crsetsid(cr, &ksid, KSID_GROUP); in smb_cred_create()
[all …]
H A Dsmb_fsops.c124 smb_fsop_create_with_sd(smb_request_t *sr, cred_t *cr, in smb_fsop_create_with_sd() argument
147 ASSERT(cr); in smb_fsop_create_with_sd()
181 &vp, flags, cr, vsap); in smb_fsop_create_with_sd()
185 &vp, flags, cr, vsap); in smb_fsop_create_with_sd()
216 *ret_snode = smb_node_lookup(sr, &sr->arg.open, cr, vp, in smb_fsop_create_with_sd()
236 flags, cr, NULL); in smb_fsop_create_with_sd()
239 flags, cr, NULL); in smb_fsop_create_with_sd()
245 *ret_snode = smb_node_lookup(sr, &sr->arg.open, cr, vp, in smb_fsop_create_with_sd()
262 (void) smb_vop_rmdir(dnode->vp, name, flags, cr); in smb_fsop_create_with_sd()
264 (void) smb_vop_remove(dnode->vp, name, flags, cr); in smb_fsop_create_with_sd()
[all …]
H A Dsmb_vops.c257 smb_vop_read(vnode_t *vp, uio_t *uiop, int ioflag, cred_t *cr) in smb_vop_read() argument
262 error = VOP_READ(vp, uiop, ioflag, cr, &smb_ct); in smb_vop_read()
269 cred_t *cr) in smb_vop_write() argument
278 error = VOP_WRITE(vp, uiop, ioflag, cr, &smb_ct); in smb_vop_write()
287 smb_vop_ioctl(vnode_t *vp, int cmd, void *arg, cred_t *cr) in smb_vop_ioctl() argument
295 error = VOP_IOCTL(vp, cmd, (intptr_t)arg, (int)flags, cr, in smb_vop_ioctl()
308 smb_vop_reqzcbuf(vnode_t *vp, int ioflag, xuio_t *xuio, cred_t *cr) in smb_vop_reqzcbuf() argument
312 error = VOP_REQZCBUF(vp, ioflag, xuio, cr, &smb_ct); in smb_vop_reqzcbuf()
317 smb_vop_retzcbuf(vnode_t *vp, xuio_t *xuio, cred_t *cr) in smb_vop_retzcbuf() argument
321 error = VOP_RETZCBUF(vp, xuio, cr, &smb_ct); in smb_vop_retzcbuf()
[all …]
/illumos-gate/usr/src/lib/smbclnt/libfksmbfs/common/
H A Dfake_vnode.c89 #define VOPXID_MAP_CR(vp, cr) ((void)vp) argument
324 cred_t *cr, in vn_rdwr() argument
338 VOPXID_MAP_CR(vp, cr); in vn_rdwr()
358 error = nbl_svmand(vp, cr, &svmand); in vn_rdwr()
373 error = VOP_WRITE(vp, &uio, ioflag, cr, NULL); in vn_rdwr()
377 error = VOP_READ(vp, &uio, ioflag, cr, NULL); in vn_rdwr()
998 cred_t *cr, in fop_open() argument
1016 VOPXID_MAP_CR(vp, cr); in fop_open()
1018 ret = (*(*(vpp))->v_op->vop_open)(vpp, mode, cr, ct); in fop_open()
1062 cred_t *cr, in fop_close() argument
[all …]
/illumos-gate/usr/src/uts/common/fs/lofs/
H A Dlofs_vnops.c50 lo_open(vnode_t **vpp, int flag, struct cred *cr, caller_context_t *ct) in lo_open() argument
69 error = VOP_OPEN(&rvp, flag, cr, ct); in lo_open()
86 svp = specvp(*vpp, (*vpp)->v_rdev, (*vpp)->v_type, cr); in lo_open()
108 struct cred *cr, in lo_close() argument
115 return (VOP_CLOSE(vp, flag, count, offset, cr, ct)); in lo_close()
119 lo_read(vnode_t *vp, struct uio *uiop, int ioflag, struct cred *cr, in lo_read() argument
126 return (VOP_READ(vp, uiop, ioflag, cr, ct)); in lo_read()
130 lo_write(vnode_t *vp, struct uio *uiop, int ioflag, struct cred *cr, in lo_write() argument
137 return (VOP_WRITE(vp, uiop, ioflag, cr, ct)); in lo_write()
146 struct cred *cr, in lo_ioctl() argument
[all …]
/illumos-gate/usr/src/uts/common/sys/crypto/
H A Dapi.h72 crypto_data_t *digest, crypto_call_req_t *cr);
77 crypto_call_req_t *cr);
81 crypto_call_req_t *cr);
83 crypto_call_req_t *cr);
90 crypto_call_req_t *cr);
96 crypto_call_req_t *cr);
101 crypto_ctx_template_t tmpl, crypto_context_t *ctxp, crypto_call_req_t *cr);
106 crypto_call_req_t *cr);
108 crypto_call_req_t *cr);
115 crypto_data_t *signature, crypto_call_req_t *cr);
[all …]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Ducred.c114 const prcred_t *cr = UCCRED(uc); in ucred_geteuid() local
116 if (cr == NULL) { in ucred_geteuid()
121 return (cr->pr_euid); in ucred_geteuid()
128 const prcred_t *cr = UCCRED(uc); in ucred_getruid() local
130 if (cr == NULL) { in ucred_getruid()
135 return (cr->pr_ruid); in ucred_getruid()
142 const prcred_t *cr = UCCRED(uc); in ucred_getsuid() local
144 if (cr == NULL) { in ucred_getsuid()
149 return (cr->pr_suid); in ucred_getsuid()
156 const prcred_t *cr = UCCRED(uc); in ucred_getegid() local
[all …]
/illumos-gate/usr/src/uts/common/fs/sockfs/
H A Dsock_notsupp.c38 sock_upper_handle_t upper, struct cred *cr) in sock_accept_notsupp() argument
46 socklen_t namelen, struct cred *cr) in sock_bind_notsupp() argument
54 struct cred *cr) in sock_listen_notsupp() argument
63 struct cred *cr) in sock_connect_notsupp() argument
71 socklen_t *len, struct cred *cr) in sock_getsockname_notsupp() argument
79 socklen_t *addrlen, struct cred *cr) in sock_getpeername_notsupp() argument
87 int option_name, void *optval, socklen_t *optlenp, struct cred *cr) in sock_getsockopt_notsupp() argument
95 int option_name, const void *optval, socklen_t optlen, struct cred *cr) in sock_setsockopt_notsupp() argument
103 struct msghdr *msg, struct cred *cr) in sock_send_notsupp() argument
111 struct nmsghdr *msg, struct cred *cr) in sock_senduio_notsupp() argument
[all …]
H A Dsockcommon.c70 int flags, int version, struct cred *cr, int *errorp) in socket_create() argument
112 protocol, version, flags, errorp, cr); in socket_create()
116 if ((*errorp = SOP_INIT(so, NULL, cr, flags)) == 0) { in socket_create()
118 (void) VOP_OPEN(&SOTOV(so), FREAD|FWRITE, cr, NULL); in socket_create()
136 struct cred *cr; in socket_newconn() local
138 if ((cr = CRED()) == NULL) in socket_newconn()
139 cr = kcred; in socket_newconn()
147 errorp, cr); in socket_newconn()
157 if ((*errorp = SOP_INIT(so, parent, cr, flags)) == 0) { in socket_newconn()
159 (void) VOP_OPEN(&SOTOV(so), FREAD|FWRITE, cr, NULL); in socket_newconn()
[all …]
/illumos-gate/usr/src/uts/common/fs/smbclnt/netsmb/
H A Dsmb_pass.c99 int smb_pkey_check(smbioc_pk_t *pk, cred_t *cr);
100 int smb_pkey_deluid(uid_t ioc_uid, cred_t *cr);
205 smb_pkey_del(smbioc_pk_t *pk, cred_t *cr) in smb_pkey_del() argument
214 uid = crgetruid(cr); in smb_pkey_del()
216 if (secpolicy_smbfs_login(cr, uid)) in smb_pkey_del()
245 smb_pkey_deluid(uid_t ioc_uid, cred_t *cr) in smb_pkey_deluid() argument
249 if (secpolicy_smbfs_login(cr, ioc_uid)) in smb_pkey_deluid()
276 smb_pkey_add(smbioc_pk_t *pk, cred_t *cr) in smb_pkey_add() argument
286 uid = crgetruid(cr); in smb_pkey_add()
288 if (secpolicy_smbfs_login(cr, uid)) in smb_pkey_add()
[all …]
/illumos-gate/usr/src/lib/libm/common/m9x/
H A Dtgammaf.c60 static const double cr[] = { variable
92 #define P10 cr[0]
93 #define P11 cr[1]
94 #define P12 cr[2]
95 #define P13 cr[3]
96 #define P14 cr[4]
97 #define P15 cr[5]
98 #define P20 cr[6]
99 #define P21 cr[7]
100 #define P22 cr[8]
[all …]

12345678910>>...22