| /freebsd/sys/contrib/openzfs/module/os/freebsd/spl/ |
| H A D | spl_policy.c | 42 secpolicy_nfs(cred_t *cr) in secpolicy_nfs() argument 45 return (priv_check_cred(cr, PRIV_NFS_DAEMON)); in secpolicy_nfs() 49 secpolicy_zfs(cred_t *cr) in secpolicy_zfs() argument 52 return (priv_check_cred(cr, PRIV_VFS_MOUNT)); in secpolicy_zfs() 56 secpolicy_sys_config(cred_t *cr, int checkonly __unused) in secpolicy_sys_config() argument 59 return (priv_check_cred(cr, PRIV_ZFS_POOL_CONFIG)); in secpolicy_sys_config() 63 secpolicy_zinject(cred_t *cr) in secpolicy_zinject() argument 66 return (priv_check_cred(cr, PRIV_ZFS_INJECT)); in secpolicy_zinject() 70 secpolicy_fs_unmount(cred_t *cr, struct mount *vfsp __unused) in secpolicy_fs_unmount() argument 73 return (priv_check_cred(cr, PRIV_VFS_UNMOUNT)); in secpolicy_fs_unmount() [all …]
|
| /freebsd/sys/contrib/openzfs/module/os/linux/zfs/ |
| H A D | policy.c | 40 priv_policy_ns(const cred_t *cr, int capability, int err, in priv_policy_ns() argument 52 (cr != CRED() && cr != kcred) ? override_creds(cr) : NULL; in priv_policy_ns() 68 priv_policy(const cred_t *cr, int capability, int err) in priv_policy() argument 70 return (priv_policy_ns(cr, capability, err, cr->user_ns)); in priv_policy() 74 priv_policy_user(const cred_t *cr, int capability, int err) in priv_policy_user() argument 83 return (priv_policy_ns(cr, capability, err, cr->user_ns)); in priv_policy_user() 85 return (priv_policy_ns(cr, capability, err, NULL)); in priv_policy_user() 94 secpolicy_nfs(const cred_t *cr) in secpolicy_nfs() argument 96 return (priv_policy(cr, CAP_SYS_ADMIN, EPERM)); in secpolicy_nfs() 103 secpolicy_sys_config(const cred_t *cr, boolean_t checkonly) in secpolicy_sys_config() argument [all …]
|
| H A D | zpl_inode.c | 43 cred_t *cr = CRED(); in zpl_lookup() local 76 crhold(cr); in zpl_lookup() 87 zfs_flags, cr, NULL, ppn); in zpl_lookup() 90 crfree(cr); in zpl_lookup() 138 zpl_vap_init(vattr_t *vap, struct inode *dir, umode_t mode, cred_t *cr, in zpl_vap_init() argument 145 zfs_i_user_ns(dir), crgetuid(cr)); in zpl_vap_init() 153 zfs_i_user_ns(dir), crgetgid(cr)); in zpl_vap_init() 178 cred_t *cr = CRED(); in zpl_create() local 191 crhold(cr); in zpl_create() 193 zpl_vap_init(vap, dir, mode, cr, user_ns); in zpl_create() [all …]
|
| H A D | zpl_ctldir.c | 134 cred_t *cr = CRED(); in zpl_root_lookup() local 138 crhold(cr); in zpl_root_lookup() 139 error = -zfsctl_root_lookup(dip, dname(dentry), &ip, 0, cr, NULL, NULL); in zpl_root_lookup() 141 crfree(cr); in zpl_root_lookup() 268 cred_t *cr = CRED(); in zpl_snapdir_lookup() local 272 crhold(cr); in zpl_snapdir_lookup() 275 0, cr, NULL, NULL); in zpl_snapdir_lookup() 278 crfree(cr); in zpl_snapdir_lookup() 345 cred_t *cr = CRED(); in zpl_snapdir_rename2() local 352 crhold(cr); in zpl_snapdir_rename2() [all …]
|
| /freebsd/sys/dev/bhnd/cores/chipc/ |
| H A D | chipc_subr.c | 320 struct chipc_region *cr; in chipc_alloc_region() local 328 cr = malloc(sizeof(*cr), M_BHND, M_NOWAIT); in chipc_alloc_region() 329 if (cr == NULL) in chipc_alloc_region() 332 cr->cr_port_type = type; in chipc_alloc_region() 333 cr->cr_port_num = port; in chipc_alloc_region() 334 cr->cr_region_num = region; in chipc_alloc_region() 335 cr->cr_res = NULL; in chipc_alloc_region() 336 cr->cr_refs = 0; in chipc_alloc_region() 337 cr->cr_act_refs = 0; in chipc_alloc_region() 339 error = bhnd_get_region_addr(sc->dev, type, port, region, &cr->cr_addr, in chipc_alloc_region() [all …]
|
| /freebsd/sys/cddl/compat/opensolaris/sys/ |
| H A D | policy.h | 40 int secpolicy_nfs(cred_t *cr); 42 int secpolicy_sys_config(cred_t *cr, int checkonly); 43 int secpolicy_zinject(cred_t *cr); 44 int secpolicy_fs_unmount(cred_t *cr, struct mount *vfsp); 45 int secpolicy_basic_link(vnode_t *vp, cred_t *cr); 46 int secpolicy_vnode_owner(vnode_t *vp, cred_t *cr, uid_t owner); 47 int secpolicy_vnode_chown(vnode_t *vp, cred_t *cr, uid_t owner); 48 int secpolicy_vnode_stky_modify(cred_t *cr); 49 int secpolicy_vnode_remove(vnode_t *vp, cred_t *cr); 50 int secpolicy_vnode_access(cred_t *cr, vnode_t *vp, uid_t owner, [all …]
|
| /freebsd/sys/contrib/openzfs/include/os/freebsd/spl/sys/ |
| H A D | policy.h | 40 int secpolicy_nfs(cred_t *cr); 42 int secpolicy_sys_config(cred_t *cr, int checkonly); 43 int secpolicy_zinject(cred_t *cr); 44 int secpolicy_fs_unmount(cred_t *cr, struct mount *vfsp); 45 int secpolicy_basic_link(vnode_t *vp, cred_t *cr); 46 int secpolicy_vnode_owner(vnode_t *vp, cred_t *cr, uid_t owner); 47 int secpolicy_vnode_chown(vnode_t *vp, cred_t *cr, uid_t owner); 48 int secpolicy_vnode_stky_modify(cred_t *cr); 49 int secpolicy_vnode_remove(vnode_t *vp, cred_t *cr); 50 int secpolicy_vnode_access(cred_t *cr, vnode_t *vp, uid_t owner, [all …]
|
| H A D | cred.h | 60 #define crgetuid(cr) ((cr)->cr_uid) argument 61 #define crgetruid(cr) ((cr)->cr_ruid) argument 62 #define crgetgid(cr) ((cr)->cr_gid) argument 63 #define crgetgroups(cr) ((cr)->cr_groups) argument 64 #define crgetngroups(cr) ((cr)->cr_ngroups) argument 65 #define crgetzoneid(cr) ((cr)->cr_prison->pr_id) argument
|
| /freebsd/sys/dev/ciss/ |
| H A D | ciss.c | 146 static int ciss_start(struct ciss_request *cr); 153 static int _ciss_report_request(struct ciss_request *cr, int *command_status, int *scsi_status, con… 154 static int ciss_synch_request(struct ciss_request *cr, int timeout); 155 static int ciss_poll_request(struct ciss_request *cr, int timeout); 156 static int ciss_wait_request(struct ciss_request *cr, int timeout); 158 static int ciss_abort_request(struct ciss_request *cr); 163 static void ciss_preen_command(struct ciss_request *cr); 164 static void ciss_release_request(struct ciss_request *cr); 172 static int ciss_map_request(struct ciss_request *cr); 175 static void ciss_unmap_request(struct ciss_request *cr); [all …]
|
| /freebsd/sys/rpc/ |
| H A D | svc_auth.c | 174 struct ucred *cr = NULL; in svc_getcred() local 193 cr = crget(); in svc_getcred() 194 cr->cr_uid = cr->cr_ruid = cr->cr_svuid = xprt->xp_uid; in svc_getcred() 195 crsetgroups_and_egid(cr, xprt->xp_ngrps, xprt->xp_gidp, GID_NOGROUP); in svc_getcred() 196 cr->cr_rgid = cr->cr_svgid = cr->cr_gid; in svc_getcred() 197 cr->cr_prison = curthread->td_ucred->cr_prison; in svc_getcred() 198 prison_hold(cr->cr_prison); in svc_getcred() 199 *crp = cr; in svc_getcred() 208 cr = crget(); in svc_getcred() 209 cr->cr_uid = cr->cr_ruid = cr->cr_svuid = xcr->cr_uid; in svc_getcred() [all …]
|
| H A D | clnt_bck.c | 202 struct ct_request *cr; in clnt_bck_call() local 208 cr = malloc(sizeof(struct ct_request), M_RPC, M_WAITOK); in clnt_bck_call() 214 free(cr, M_RPC); in clnt_bck_call() 227 cr->cr_mrep = NULL; in clnt_bck_call() 228 cr->cr_error = 0; in clnt_bck_call() 278 cr->cr_xid = xid; in clnt_bck_call() 296 TAILQ_INSERT_TAIL(&ct->ct_pending, cr, cr_link); in clnt_bck_call() 327 TAILQ_REMOVE(&ct->ct_pending, cr, cr_link); in clnt_bck_call() 333 reply_msg.acpted_rply.ar_verf.oa_base = cr->cr_verf; in clnt_bck_call() 340 TAILQ_REMOVE(&ct->ct_pending, cr, cr_link); in clnt_bck_call() [all …]
|
| H A D | clnt_nl.c | 261 struct ct_request *cr; in clnt_nl_call() local 273 cr = malloc(sizeof(struct ct_request), M_RPC, M_WAITOK); in clnt_nl_call() 274 *cr = (struct ct_request){ in clnt_nl_call() 300 if (!AUTH_MARSHALL(auth, cr->cr_xid, &xdrs, args)) { in clnt_nl_call() 307 *(uint32_t *)mem = htonl(cr->cr_xid); in clnt_nl_call() 314 rv = nlmsg_add(&nw, 0, cr->cr_xid, rpcnl_family_id, 0, in clnt_nl_call() 328 TAILQ_INSERT_TAIL(&nl->nl_pending, cr, cr_link); in clnt_nl_call() 334 if (__predict_true(cr->cr_error == ETIMEDOUT)) in clnt_nl_call() 335 (void)msleep(cr, &nl->nl_lock, nl->nl_prio, nl->nl_wchan, in clnt_nl_call() 338 TAILQ_REMOVE(&nl->nl_pending, cr, cr_link); in clnt_nl_call() [all …]
|
| H A D | clnt_dg.c | 349 struct cu_request *cr; in clnt_dg_call() local 353 cr = malloc(sizeof(struct cu_request), M_RPC, M_WAITOK); in clnt_dg_call() 359 free(cr, M_RPC); in clnt_dg_call() 372 cr->cr_client = cl; in clnt_dg_call() 373 cr->cr_mrep = NULL; in clnt_dg_call() 374 cr->cr_error = 0; in clnt_dg_call() 448 cr->cr_xid = xid; in clnt_dg_call() 469 TAILQ_INSERT_TAIL(&cs->cs_pending, cr, cr_link); in clnt_dg_call() 484 reply_msg.acpted_rply.ar_verf.oa_base = cr->cr_verf; in clnt_dg_call() 491 TAILQ_REMOVE(&cs->cs_pending, cr, cr_link); in clnt_dg_call() [all …]
|
| /freebsd/sys/kern/ |
| H A D | subr_counter.c | 162 counter_rate_get(struct counter_rate *cr) in counter_rate_get() argument 164 if (cr->cr_ticks < (tick - (hz * cr->cr_period))) in counter_rate_get() 167 return (counter_u64_fetch(cr->cr_rate)); in counter_rate_get() 180 counter_ratecheck(struct counter_rate *cr, int64_t limit) in counter_ratecheck() argument 185 val = cr->cr_over; in counter_ratecheck() 188 if ((u_int)(now - cr->cr_ticks) >= (hz * cr->cr_period)) { in counter_ratecheck() 193 if ((cr->cr_lock == 0) && in counter_ratecheck() 194 atomic_cmpset_acq_int(&cr->cr_lock, 0, 1)) { in counter_ratecheck() 199 if ((u_int)(now - cr->cr_ticks) >= (hz * cr->cr_period)) { in counter_ratecheck() 200 val = counter_u64_fetch(cr->cr_rate); in counter_ratecheck() [all …]
|
| H A D | kern_prot.c | 96 static void crfree_final(struct ucred *cr); 110 static void crsetgroups_internal(struct ucred *cr, int ngrp, 1833 securelevel_gt(struct ucred *cr, int level) in securelevel_gt() argument 1836 return (cr->cr_prison->pr_securelevel > level ? EPERM : 0); in securelevel_gt() 1840 securelevel_ge(struct ucred *cr, int level) in securelevel_ge() argument 1843 return (cr->cr_prison->pr_securelevel >= level ? EPERM : 0); in securelevel_ge() 2455 crcowget(struct ucred *cr) in crcowget() argument 2458 mtx_lock(&cr->cr_mtx); in crcowget() 2459 KASSERT(cr->cr_users > 0, ("%s: users %d not > 0 on cred %p", in crcowget() 2460 __func__, cr->cr_users, cr)); in crcowget() [all …]
|
| /freebsd/sys/contrib/openzfs/module/os/linux/spl/ |
| H A D | spl-cred.c | 57 crhold(cred_t *cr) in crhold() argument 59 (void) get_cred((const cred_t *)cr); in crhold() 64 crfree(cred_t *cr) in crfree() argument 66 put_cred((const cred_t *)cr); in crfree() 71 crgetngroups(const cred_t *cr) in crgetngroups() argument 76 gi = cr->group_info; in crgetngroups() 87 crgetgroups(const cred_t *cr) in crgetgroups() argument 92 gi = cr->group_info; in crgetgroups() 100 groupmember(gid_t gid, const cred_t *cr) in groupmember() argument 105 gi = cr->group_info; in groupmember() [all …]
|
| /freebsd/sys/contrib/openzfs/lib/libspl/ |
| H A D | cred.c | 32 crgetuid(cred_t *cr) in crgetuid() argument 34 (void) cr; in crgetuid() 39 crgetruid(cred_t *cr) in crgetruid() argument 41 (void) cr; in crgetruid() 46 crgetgid(cred_t *cr) in crgetgid() argument 48 (void) cr; in crgetgid() 53 crgetngroups(cred_t *cr) in crgetngroups() argument 55 (void) cr; in crgetngroups() 60 crgetgroups(cred_t *cr) in crgetgroups() argument 62 (void) cr; in crgetgroups()
|
| /freebsd/sys/dev/cesa/ |
| H A D | cesa.c | 237 struct cesa_request *cr; in cesa_alloc_request() local 239 CESA_GENERIC_ALLOC_LOCKED(sc, cr, requests); in cesa_alloc_request() 240 if (!cr) in cesa_alloc_request() 243 STAILQ_INIT(&cr->cr_tdesc); in cesa_alloc_request() 244 STAILQ_INIT(&cr->cr_sdesc); in cesa_alloc_request() 246 return (cr); in cesa_alloc_request() 250 cesa_free_request(struct cesa_softc *sc, struct cesa_request *cr) in cesa_free_request() argument 255 STAILQ_CONCAT(&sc->sc_free_tdesc, &cr->cr_tdesc); in cesa_free_request() 260 STAILQ_CONCAT(&sc->sc_free_sdesc, &cr->cr_sdesc); in cesa_free_request() 264 if (cr->cr_dmap_loaded) { in cesa_free_request() [all …]
|
| /freebsd/sys/contrib/openzfs/lib/libspl/include/sys/ |
| H A D | cred.h | 39 extern uid_t crgetuid(cred_t *cr); 40 extern uid_t crgetruid(cred_t *cr); 41 extern gid_t crgetgid(cred_t *cr); 42 extern int crgetngroups(cred_t *cr); 43 extern gid_t *crgetgroups(cred_t *cr); 48 #define crhold(cr) ((void)cr) argument 49 #define crfree(cr) ((void)cr) argument
|
| /freebsd/sys/contrib/openzfs/include/os/linux/zfs/sys/ |
| H A D | zfs_vnops_os.h | 42 extern int zfs_open(struct inode *ip, int mode, int flag, cred_t *cr); 43 extern int zfs_close(struct inode *ip, int flag, cred_t *cr); 47 cred_t *cr, int *direntflags, pathname_t *realpnp); 50 int mode, znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp, 53 int mode, struct inode **ipp, cred_t *cr, int flag, vsecattr_t *vsecp, 55 extern int zfs_remove(znode_t *dzp, char *name, cred_t *cr, int flags); 57 znode_t **zpp, cred_t *cr, int flags, vsecattr_t *vsecp, zidmap_t *mnt_ns); 59 cred_t *cr, int flags); 60 extern int zfs_readdir(struct inode *ip, struct dir_context *ctx, cred_t *cr); 67 extern int zfs_setattr(znode_t *zp, vattr_t *vap, int flag, cred_t *cr, [all …]
|
| /freebsd/sys/contrib/ck/src/ |
| H A D | ck_epoch.c | 322 struct ck_epoch_record *cr, in ck_epoch_scan() argument 328 if (cr == NULL) { in ck_epoch_scan() 332 cursor = &cr->record_next; in ck_epoch_scan() 339 cr = ck_epoch_record_container(cursor); in ck_epoch_scan() 341 state = ck_pr_load_uint(&cr->state); in ck_epoch_scan() 347 active = ck_pr_load_uint(&cr->active); in ck_epoch_scan() 350 if (active != 0 && ck_pr_load_uint(&cr->epoch) != epoch) in ck_epoch_scan() 351 return cr; in ck_epoch_scan() 411 epoch_block(struct ck_epoch *global, struct ck_epoch_record *cr, in epoch_block() argument 416 cb(global, cr, ct); in epoch_block() [all …]
|
| /freebsd/sys/arm/freescale/imx/ |
| H A D | imx_machdep.c | 66 volatile uint16_t cr, *pcr; in imx_wdog_cpu_reset() local 74 cr = *pcr; in imx_wdog_cpu_reset() 88 if (cr & WDOG_CR_WDT) { in imx_wdog_cpu_reset() 89 cr &= ~WDOG_CR_WDA; /* Assert active-low ext reset bit. */ in imx_wdog_cpu_reset() 90 *pcr = cr; in imx_wdog_cpu_reset() 103 cr &= ~WDOG_CR_SRS; /* Assert active-low software reset bit. */ in imx_wdog_cpu_reset() 104 *pcr = cr; in imx_wdog_cpu_reset() 105 *pcr = cr; in imx_wdog_cpu_reset() 106 *pcr = cr; in imx_wdog_cpu_reset()
|
| /freebsd/sys/fs/procfs/ |
| H A D | procfs_status.c | 68 struct ucred *cr; in procfs_doprocstatus() local 138 cr = p->p_ucred; in procfs_doprocstatus() 141 (u_long)cr->cr_uid, in procfs_doprocstatus() 142 (u_long)cr->cr_ruid, in procfs_doprocstatus() 143 (u_long)cr->cr_rgid); in procfs_doprocstatus() 144 sbuf_printf(sb, ",%lu", (u_long)cr->cr_gid); in procfs_doprocstatus() 145 for (i = 0; i < cr->cr_ngroups; i++) in procfs_doprocstatus() 146 sbuf_printf(sb, ",%lu", (u_long)cr->cr_groups[i]); in procfs_doprocstatus() 148 if (jailed(cr)) { in procfs_doprocstatus() 149 mtx_lock(&cr->cr_prison->pr_mtx); in procfs_doprocstatus() [all …]
|
| /freebsd/sys/contrib/openzfs/include/os/freebsd/zfs/sys/ |
| H A D | zfs_vnops_os.h | 37 extern int zfs_remove(znode_t *dzp, const char *name, cred_t *cr, int flags); 39 znode_t **zpp, cred_t *cr, int flags, vsecattr_t *vsecp, zidmap_t *mnt_ns); 41 cred_t *cr, int flags); 42 extern int zfs_setattr(znode_t *zp, vattr_t *vap, int flag, cred_t *cr, 45 const char *tnm, cred_t *cr, int flags, uint64_t rflags, vattr_t *wo_vap, 48 const char *link, znode_t **zpp, cred_t *cr, int flags, zidmap_t *mnt_ns); 50 const char *name, cred_t *cr, int flags); 52 offset_t offset, cred_t *cr); 54 int mode, znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp, 57 cred_t *cr);
|
| /freebsd/share/examples/bootforth/ |
| H A D | loader.rc | 4 cr .( Loading Forth extensions:) 8 cr .( - loader.4th...) 14 cr .( - screen.4th...) 18 cr .( - frames.4th...) 22 cr .( - menuconf.4th...) 27 cr cr .( Initializing loader.4th...) 31 cr
|