Home
last modified time | relevance | path

Searched refs:ucred (Results 1 – 25 of 332) sorted by relevance

12345678910>>...14

/freebsd/sys/security/mac/
H A Dmac_framework.h86 struct ucred;
108 void mac_bpfdesc_create(struct ucred *cred, struct bpf_d *d);
113 void mac_cred_associate_nfsd(struct ucred *cred);
114 int mac_cred_check_setaudit(struct ucred *cred, struct auditinfo *ai);
115 int mac_cred_check_setaudit_addr(struct ucred *cred,
117 int mac_cred_check_setauid(struct ucred *cred, uid_t auid);
119 int mac_cred_check_setcred(u_int flags, const struct ucred *old_cred,
120 struct ucred *new_cred);
122 int mac_cred_check_setegid(struct ucred *cred, gid_t egid);
123 int mac_cred_check_seteuid(struct ucred *cred, uid_t euid);
[all …]
H A Dmac_policy.h101 struct ucred;
131 typedef void (*mpo_bpfdesc_create_t)(struct ucred *cred,
139 typedef void (*mpo_cred_associate_nfsd_t)(struct ucred *cred);
140 typedef int (*mpo_cred_check_relabel_t)(struct ucred *cred,
142 typedef int (*mpo_cred_check_setaudit_t)(struct ucred *cred,
144 typedef int (*mpo_cred_check_setaudit_addr_t)(struct ucred *cred,
146 typedef int (*mpo_cred_check_setauid_t)(struct ucred *cred, uid_t auid);
149 const struct ucred *old_cred, struct ucred *new_cred);
151 typedef int (*mpo_cred_check_setegid_t)(struct ucred *cred, gid_t egid);
152 typedef int (*mpo_cred_check_seteuid_t)(struct ucred *cred, uid_t euid);
[all …]
H A Dmac_cred.c87 mac_cred_init(struct ucred *cred) in mac_cred_init()
105 mac_cred_destroy(struct ucred *cred) in mac_cred_destroy()
124 mac_cred_associate_nfsd(struct ucred *cred) in mac_cred_associate_nfsd()
135 mac_cred_create_swapper(struct ucred *cred) in mac_cred_create_swapper()
146 mac_cred_create_init(struct ucred *cred) in mac_cred_create_init()
179 mac_cred_copy(struct ucred *src, struct ucred *dest) in mac_cred_copy()
192 mac_cred_relabel(struct ucred *cred, struct label *newlabel) in mac_cred_relabel()
202 mac_cred_check_relabel(struct ucred *cred, struct label *newlabel) in mac_cred_check_relabel()
237 mac_cred_check_setcred(u_int flags, const struct ucred *old_cred, in mac_cred_check_setcred()
238 struct ucred *new_cred) in mac_cred_check_setcred()
[all …]
H A Dmac_vfs.c83 static int mac_vnode_setlabel_extattr(struct ucred *cred,
276 mac_vnode_create_extattr(struct ucred *cred, struct mount *mp, in mac_vnode_create_extattr()
310 mac_vnode_setlabel_extattr(struct ucred *cred, struct vnode *vp, in mac_vnode_setlabel_extattr()
343 mac_vnode_execve_transition(struct ucred *old, struct ucred *new, in mac_vnode_execve_transition()
354 mac_vnode_execve_will_transition(struct ucred *old, struct vnode *vp, in mac_vnode_execve_will_transition()
373 mac_vnode_check_access_impl(struct ucred *cred, struct vnode *vp, accmode_t accmode) in mac_vnode_check_access_impl()
389 mac_vnode_check_chdir(struct ucred *cred, struct vnode *dvp) in mac_vnode_check_chdir()
405 mac_vnode_check_chroot(struct ucred *cred, struct vnode *dvp) in mac_vnode_check_chroot()
421 mac_vnode_check_create(struct ucred *cred, struct vnode *dvp, in mac_vnode_check_create()
439 mac_vnode_check_deleteacl(struct ucred *cred, struct vnode *vp, in mac_vnode_check_deleteacl()
[all …]
H A Dmac_posix_shm.c94 mac_posixshm_create(struct ucred *cred, struct shmfd *shmfd) in mac_posixshm_create()
105 mac_posixshm_check_create(struct ucred *cred, const char *path) in mac_posixshm_check_create()
119 mac_posixshm_check_mmap(struct ucred *cred, struct shmfd *shmfd, int prot, in mac_posixshm_check_mmap()
136 mac_posixshm_check_open(struct ucred *cred, struct shmfd *shmfd, in mac_posixshm_check_open()
152 mac_posixshm_check_stat(struct ucred *active_cred, struct ucred *file_cred, in mac_posixshm_check_stat()
169 mac_posixshm_check_truncate(struct ucred *active_cred, struct ucred *file_cred, in mac_posixshm_check_truncate()
186 mac_posixshm_check_unlink(struct ucred *cred, struct shmfd *shmfd) in mac_posixshm_check_unlink()
201 mac_posixshm_check_setmode(struct ucred *cred, struct shmfd *shmfd, mode_t mode) in mac_posixshm_check_setmode()
216 mac_posixshm_check_setowner(struct ucred *cred, struct shmfd *shmfd, uid_t uid, in mac_posixshm_check_setowner()
233 mac_posixshm_check_read(struct ucred *active_cred, struct ucred *file_cred, in mac_posixshm_check_read()
[all …]
H A Dmac_posix_sem.c95 mac_posixsem_create(struct ucred *cred, struct ksem *ks) in mac_posixsem_create()
105 mac_posixsem_check_open(struct ucred *cred, struct ksem *ks) in mac_posixsem_check_open()
120 mac_posixsem_check_getvalue(struct ucred *active_cred, struct ucred *file_cred, in mac_posixsem_check_getvalue()
137 mac_posixsem_check_post(struct ucred *active_cred, struct ucred *file_cred, in mac_posixsem_check_post()
154 mac_posixsem_check_stat(struct ucred *active_cred, struct ucred *file_cred, in mac_posixsem_check_stat()
171 mac_posixsem_check_unlink(struct ucred *cred, struct ksem *ks) in mac_posixsem_check_unlink()
186 mac_posixsem_check_wait(struct ucred *active_cred, struct ucred *file_cred, in mac_posixsem_check_wait()
203 mac_posixsem_check_setmode(struct ucred *cred, struct ksem *ks, mode_t mode) in mac_posixsem_check_setmode()
218 mac_posixsem_check_setowner(struct ucred *cred, struct ksem *ks, uid_t uid, in mac_posixsem_check_setowner()
H A Dmac_system.c74 mac_kenv_check_dump(struct ucred *cred) in mac_kenv_check_dump()
87 mac_kenv_check_get(struct ucred *cred, char *name) in mac_kenv_check_get()
101 mac_kenv_check_set(struct ucred *cred, char *name, char *value) in mac_kenv_check_set()
114 mac_kenv_check_unset(struct ucred *cred, char *name) in mac_kenv_check_unset()
127 mac_kld_check_load(struct ucred *cred, struct vnode *vp) in mac_kld_check_load()
142 mac_kld_check_stat(struct ucred *cred) in mac_kld_check_stat()
156 mac_system_check_acct(struct ucred *cred, struct vnode *vp) in mac_system_check_acct()
174 mac_system_check_reboot(struct ucred *cred, int howto) in mac_system_check_reboot()
188 mac_system_check_swapon(struct ucred *cred, struct vnode *vp) in mac_system_check_swapon()
204 mac_system_check_swapoff(struct ucred *cred, struct vnode *vp) in mac_system_check_swapoff()
[all …]
/freebsd/sys/security/mac_stub/
H A Dmac_stub.c178 stub_bpfdesc_create(struct ucred *cred, struct bpf_d *d, in stub_bpfdesc_create()
192 stub_cred_associate_nfsd(struct ucred *cred) in stub_cred_associate_nfsd()
198 stub_cred_check_relabel(struct ucred *cred, struct label *newlabel) in stub_cred_check_relabel()
205 stub_cred_check_setaudit(struct ucred *cred, struct auditinfo *ai) in stub_cred_check_setaudit()
212 stub_cred_check_setaudit_addr(struct ucred *cred, struct auditinfo_addr *aia) in stub_cred_check_setaudit_addr()
219 stub_cred_check_setauid(struct ucred *cred, uid_t auid) in stub_cred_check_setauid()
231 stub_cred_check_setcred(u_int flags, const struct ucred *old_cred, in stub_cred_check_setcred()
232 struct ucred *new_cred) in stub_cred_check_setcred()
243 stub_cred_check_setegid(struct ucred *cred, gid_t egid) in stub_cred_check_setegid()
250 stub_cred_check_seteuid(struct ucred *cred, uid_t euid) in stub_cred_check_seteuid()
[all …]
/freebsd/sys/security/mac_bsdextended/
H A Dugidfw_internal.h36 int ugidfw_check(struct ucred *cred, struct vnode *vp, struct vattr *vap,
38 int ugidfw_check_vp(struct ucred *cred, struct vnode *vp, int acc_mode);
43 int ugidfw_system_check_acct(struct ucred *cred, struct vnode *vp,
45 int ugidfw_system_check_auditctl(struct ucred *cred, struct vnode *vp,
47 int ugidfw_system_check_swapon(struct ucred *cred, struct vnode *vp,
53 int ugidfw_vnode_check_access(struct ucred *cred, struct vnode *vp,
55 int ugidfw_vnode_check_chdir(struct ucred *cred, struct vnode *dvp,
57 int ugidfw_vnode_check_chroot(struct ucred *cred, struct vnode *dvp,
59 int ugidfw_check_create_vnode(struct ucred *cred, struct vnode *dvp,
62 int ugidfw_vnode_check_deleteacl(struct ucred *cred, struct vnode *vp,
[all …]
H A Dugidfw_vnode.c62 ugidfw_vnode_check_access(struct ucred *cred, struct vnode *vp, in ugidfw_vnode_check_access()
70 ugidfw_vnode_check_chdir(struct ucred *cred, struct vnode *dvp, in ugidfw_vnode_check_chdir()
78 ugidfw_vnode_check_chroot(struct ucred *cred, struct vnode *dvp, in ugidfw_vnode_check_chroot()
86 ugidfw_check_create_vnode(struct ucred *cred, struct vnode *dvp, in ugidfw_check_create_vnode()
94 ugidfw_vnode_check_deleteacl(struct ucred *cred, struct vnode *vp, in ugidfw_vnode_check_deleteacl()
102 ugidfw_vnode_check_deleteextattr(struct ucred *cred, struct vnode *vp, in ugidfw_vnode_check_deleteextattr()
110 ugidfw_vnode_check_exec(struct ucred *cred, struct vnode *vp, in ugidfw_vnode_check_exec()
119 ugidfw_vnode_check_getacl(struct ucred *cred, struct vnode *vp, in ugidfw_vnode_check_getacl()
127 ugidfw_vnode_check_getextattr(struct ucred *cred, struct vnode *vp, in ugidfw_vnode_check_getextattr()
135 ugidfw_vnode_check_link(struct ucred *cred, struct vnode *dvp, in ugidfw_vnode_check_link()
[all …]
/freebsd/sys/sys/
H A Ducred.h73 struct ucred { struct
102 #define NOCRED ((struct ucred *)0) /* no credential available */ argument
103 #define FSCRED ((struct ucred *)-1) /* filesystem credential */
194 struct ucred *cred;
216 void change_egid(struct ucred *newcred, gid_t egid);
217 void change_euid(struct ucred *newcred, struct uidinfo *euip);
218 void change_rgid(struct ucred *newcred, gid_t rgid);
219 void change_ruid(struct ucred *newcred, struct uidinfo *ruip);
220 void change_svgid(struct ucred *newcred, gid_t svgid);
221 void change_svuid(struct ucred *newcred, uid_t svuid);
[all …]
H A Djail.h412 struct ucred;
423 bool jailed_without_vnet(struct ucred *);
424 void getcredhostname(struct ucred *, char *, size_t);
425 void getcreddomainname(struct ucred *, char *, size_t);
426 void getcredhostuuid(struct ucred *, char *, size_t);
427 void getcredhostid(struct ucred *, unsigned long *);
428 void getjailname(struct ucred *cred, char *name, size_t len);
430 bool prison_allow(struct ucred *, unsigned);
431 int prison_check(struct ucred *cred1, struct ucred *cred2);
432 bool prison_check_nfsd(struct ucred *cred);
[all …]
/freebsd/sys/fs/nfs/
H A Dnfs_var.h40 struct ucred;
119 vnode_t, int, struct ucred *, NFSPROC_T *, int *);
148 int, char *, int *, uint64_t *, struct ucred *, NFSPROC_T *);
151 int *, char *, struct ucred *, NFSPROC_T *);
156 struct ucred *, NFSPROC_T *);
167 struct pnfsdsfile *, struct pnfsdsfile *, int, struct ucred *, NFSPROC_T *);
319 struct ucred *);
332 void newnfs_copycred(struct nfscred *, struct ucred *);
333 void newnfs_copyincred(struct ucred *, struct nfscred *);
343 int, int *, u_int32_t *, u_int32_t *, NFSPROC_T *, struct ucred *);
[all …]
/freebsd/sys/security/mac_test/
H A Dmac_test.c176 test_bpfdesc_create(struct ucred *cred, struct bpf_d *d, in test_bpfdesc_create()
216 test_cred_check_relabel(struct ucred *cred, struct label *newlabel) in test_cred_check_relabel()
228 test_cred_check_setaudit(struct ucred *cred, struct auditinfo *ai) in test_cred_check_setaudit()
239 test_cred_check_setaudit_addr(struct ucred *cred, in test_cred_check_setaudit_addr()
251 test_cred_check_setauid(struct ucred *cred, uid_t auid) in test_cred_check_setauid()
269 test_cred_check_setcred(u_int flags, const struct ucred *old_cred, in test_cred_check_setcred()
270 struct ucred *new_cred) in test_cred_check_setcred()
288 test_cred_check_setegid(struct ucred *cred, gid_t egid) in test_cred_check_setegid()
299 test_cred_check_seteuid(struct ucred *cred, uid_t euid) in test_cred_check_seteuid()
310 test_cred_check_setregid(struct ucred *cred, gid_t rgid, gid_t egid) in test_cred_check_setregid()
[all …]
/freebsd/sys/fs/nfsclient/
H A Dnfs.h93 int ncl_bioread(struct vnode *, struct uio *, int, struct ucred *);
94 int ncl_biowrite(struct vnode *, struct uio *, int, struct ucred *);
96 int ncl_asyncio(struct nfsmount *, struct buf *, struct ucred *,
98 int ncl_doio(struct vnode *, struct buf *, struct ucred *, struct thread *,
105 int ncl_readrpc(struct vnode *, struct uio *, struct ucred *);
106 int ncl_writerpc(struct vnode *, struct uio *, struct ucred *, int *, int *,
108 int ncl_readlinkrpc(struct vnode *, struct uio *, struct ucred *);
109 int ncl_readdirrpc(struct vnode *, struct uio *, struct ucred *,
111 int ncl_readdirplusrpc(struct vnode *, struct uio *, struct ucred *,
113 int ncl_commit(struct vnode *, u_quad_t, int, struct ucred *, struc
[all...]
/freebsd/sys/nfsclient/
H A Dnfs.h158 struct ucred *cred);
160 struct ucred *cred, int *iomode, int *must_commit);
163 struct ucred *cred);
166 struct ucred *cred, struct thread *td);
245 int nfs_readrpc(struct vnode *, struct uio *, struct ucred *);
246 int nfs_writerpc(struct vnode *, struct uio *, struct ucred *, int *,
249 struct ucred *cred, struct thread *td);
250 int nfs_readdirrpc(struct vnode *, struct uio *, struct ucred *);
253 int nfs_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct thread *);
254 int nfs_doio(struct vnode *, struct buf *, struct ucred *, struct thread *);
[all …]
/freebsd/sys/security/mac_biba/
H A Dmac_biba.c789 biba_bpfdesc_create(struct ucred *cred, struct bpf_d *d, in biba_bpfdesc_create()
813 biba_cred_associate_nfsd(struct ucred *cred) in biba_cred_associate_nfsd()
824 biba_cred_check_relabel(struct ucred *cred, struct label *newlabel) in biba_cred_check_relabel()
885 biba_cred_check_visible(struct ucred *u1, struct ucred *u2) in biba_cred_check_visible()
903 biba_cred_create_init(struct ucred *cred) in biba_cred_create_init()
915 biba_cred_create_swapper(struct ucred *cred) in biba_cred_create_swapper()
927 biba_cred_relabel(struct ucred *cred, struct label *newlabel) in biba_cred_relabel()
938 biba_devfs_create_device(struct ucred *cred, struct mount *mp, in biba_devfs_create_device()
974 biba_devfs_create_symlink(struct ucred *cred, struct mount *mp, in biba_devfs_create_symlink()
1012 biba_ifnet_check_relabel(struct ucred *cred, struct ifnet *ifp, in biba_ifnet_check_relabel()
[all …]
/freebsd/sys/security/mac_mls/
H A Dmac_mls.c754 mls_bpfdesc_create(struct ucred *cred, struct bpf_d *d, struct label *dlabel) in mls_bpfdesc_create()
777 mls_cred_associate_nfsd(struct ucred *cred) in mls_cred_associate_nfsd()
788 mls_cred_check_relabel(struct ucred *cred, struct label *newlabel) in mls_cred_check_relabel()
848 mls_cred_check_visible(struct ucred *cr1, struct ucred *cr2) in mls_cred_check_visible()
866 mls_cred_create_init(struct ucred *cred) in mls_cred_create_init()
878 mls_cred_create_swapper(struct ucred *cred) in mls_cred_create_swapper()
890 mls_cred_relabel(struct ucred *cred, struct label *newlabel) in mls_cred_relabel()
901 mls_devfs_create_device(struct ucred *cred, struct mount *mp, in mls_devfs_create_device()
939 mls_devfs_create_symlink(struct ucred *cred, struct mount *mp, in mls_devfs_create_symlink()
977 mls_ifnet_check_relabel(struct ucred *cred, struct ifnet *ifp, in mls_ifnet_check_relabel()
[all …]
/freebsd/sys/security/mac_partition/
H A Dmac_partition.c108 partition_cred_check_relabel(struct ucred *cred, struct label *newlabel) in partition_cred_check_relabel()
135 partition_cred_check_visible(struct ucred *cr1, struct ucred *cr2) in partition_cred_check_visible()
155 partition_cred_create_init(struct ucred *cred) in partition_cred_create_init()
162 partition_cred_create_swapper(struct ucred *cred) in partition_cred_create_swapper()
216 partition_cred_relabel(struct ucred *cred, struct label *newlabel) in partition_cred_relabel()
224 partition_inpcb_check_visible(struct ucred *cred, struct inpcb *inp, in partition_inpcb_check_visible()
235 partition_proc_check_debug(struct ucred *cred, struct proc *p) in partition_proc_check_debug()
245 partition_proc_check_sched(struct ucred *cred, struct proc *p) in partition_proc_check_sched()
255 partition_proc_check_signal(struct ucred *cred, struct proc *p, in partition_proc_check_signal()
266 partition_socket_check_visible(struct ucred *cred, struct socket *so, in partition_socket_check_visible()
[all …]
/freebsd/sys/security/mac_seeotheruids/
H A Dmac_seeotheruids.c102 seeotheruids_check(struct ucred *cr1, struct ucred *cr2) in seeotheruids_check()
131 seeotheruids_proc_check_debug(struct ucred *cred, struct proc *p) in seeotheruids_proc_check_debug()
138 seeotheruids_proc_check_sched(struct ucred *cred, struct proc *p) in seeotheruids_proc_check_sched()
145 seeotheruids_proc_check_signal(struct ucred *cred, struct proc *p, in seeotheruids_proc_check_signal()
153 seeotheruids_cred_check_visible(struct ucred *cr1, struct ucred *cr2) in seeotheruids_cred_check_visible()
160 seeotheruids_inpcb_check_visible(struct ucred *cred, struct inpcb *inp, in seeotheruids_inpcb_check_visible()
168 seeotheruids_socket_check_visible(struct ucred *cred, struct socket *so, in seeotheruids_socket_check_visible()
/freebsd/sys/ufs/ffs/
H A Dffs_extern.h49 struct ucred;
56 struct ucred *, ufs2_daddr_t *);
58 struct ucred *a_cred, int a_flags, struct buf **a_bpp);
60 struct ucred *a_cred, int a_flags, struct buf **a_bpp);
92 ufs2_daddr_t, int, int, int, struct ucred *, struct buf **);
110 int ffs_truncate(struct vnode *, off_t, int, struct ucred *);
114 int ffs_valloc(struct vnode *, int, struct ucred *, struct vnode **);
122 daddr_t *, int *, int, struct ucred *, int, void (*)(struct buf *),
167 struct ucred *);
177 struct ucred *, int);
[all …]
/freebsd/sys/kern/
H A Dkern_prot.c96 static void crfree_final(struct ucred *cr);
111 static void crsetgroups_internal(struct ucred *cr, int ngrp,
114 static int cr_canseeotheruids(struct ucred *u1, struct ucred *u2);
115 static int cr_canseeothergids(struct ucred *u1, struct ucred *u2);
116 static int cr_canseejailproc(struct ucred *u1, struct ucred *u2);
323 struct ucred *cred; in sys_getgroups()
664 struct ucred *new_cred, *old_cred, *to_free_cred; in kern_setcred()
873 struct ucred *newcred, *oldcred; in sys_setuid()
995 struct ucred *newcred, *oldcred; in sys_seteuid()
1051 struct ucred *newcred, *oldcred; in sys_setgid()
[all …]
H A Dkern_priv.c60 suser_enabled(struct ucred *cred) in suser_enabled()
69 struct ucred *cred; in sysctl_kern_suser_enabled()
99 priv_check_cred_pre(struct ucred *cred, int priv) in priv_check_cred_pre()
112 priv_check_cred_post(struct ucred *cred, int priv, int error, bool handled) in priv_check_cred_post()
148 priv_check_cred(struct ucred *cred, int priv) in priv_check_cred()
279 priv_check_cred_vfs_lookup_slow(struct ucred *cred) in priv_check_cred_vfs_lookup_slow()
299 priv_check_cred_vfs_lookup(struct ucred *cred) in priv_check_cred_vfs_lookup()
314 priv_check_cred_vfs_lookup_nomac(struct ucred *cred) in priv_check_cred_vfs_lookup_nomac()
329 priv_check_cred_vfs_generation_slow(struct ucred *cred) in priv_check_cred_vfs_generation_slow()
354 priv_check_cred_vfs_generation(struct ucred *cred) in priv_check_cred_vfs_generation()
/freebsd/crypto/openssh/openbsd-compat/
H A Dbsd-getpeereid.c30 struct ucred cred; in getpeereid()
49 ucred_t *ucred = NULL; in getpeereid() local
51 if (getpeerucred(s, &ucred) == -1) in getpeereid()
53 if ((*euid = ucred_geteuid(ucred)) == -1) in getpeereid()
55 if ((*gid = ucred_getrgid(ucred)) == -1) in getpeereid()
58 ucred_free(ucred); in getpeereid()
/freebsd/sys/fs/fuse/
H A Dfuse_file.h199 struct ucred *cred, pid_t pid);
201 struct fuse_filehandle **fufhp, struct ucred *cred,
204 struct fuse_filehandle **fufhp, struct ucred *cred,
207 struct fuse_filehandle **fufhp, struct ucred *cred,
212 const struct ucred *cred,
216 struct ucred *cred);
218 struct thread *td, struct ucred *cred);

12345678910>>...14