Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/ucred.h
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | #define cr_startcopy cr_uid | ||||
void *cr_pspare2[2]; /* general use 2 */ | void *cr_pspare2[2]; /* general use 2 */ | ||||
#define cr_endcopy cr_label | #define cr_endcopy cr_label | ||||
struct label *cr_label; /* MAC label */ | struct label *cr_label; /* MAC label */ | ||||
struct auditinfo_addr cr_audit; /* Audit properties. */ | struct auditinfo_addr cr_audit; /* Audit properties. */ | ||||
gid_t *cr_groups; /* groups */ | gid_t *cr_groups; /* groups */ | ||||
int cr_agroups; /* Available groups */ | int cr_agroups; /* Available groups */ | ||||
gid_t cr_smallgroups[XU_NGROUPS]; /* storage for small groups */ | gid_t cr_smallgroups[XU_NGROUPS]; /* storage for small groups */ | ||||
}; | }; | ||||
struct credwrap { | |||||
u_int crw_ref; | |||||
struct ucred *crw_ucred; | |||||
}; | |||||
#define NOCRED ((struct ucred *)0) /* no credential available */ | #define NOCRED ((struct ucred *)0) /* no credential available */ | ||||
#define FSCRED ((struct ucred *)-1) /* filesystem credential */ | #define FSCRED ((struct ucred *)-1) /* filesystem credential */ | ||||
#endif /* _KERNEL || _WANT_UCRED */ | #endif /* _KERNEL || _WANT_UCRED */ | ||||
/* | /* | ||||
* Flags for cr_flags. | * Flags for cr_flags. | ||||
*/ | */ | ||||
#define CRED_FLAG_CAPMODE 0x00000001 /* In capability mode. */ | #define CRED_FLAG_CAPMODE 0x00000001 /* In capability mode. */ | ||||
Show All 26 Lines | |||||
void change_ruid(struct ucred *newcred, struct uidinfo *ruip); | void change_ruid(struct ucred *newcred, struct uidinfo *ruip); | ||||
void change_svgid(struct ucred *newcred, gid_t svgid); | void change_svgid(struct ucred *newcred, gid_t svgid); | ||||
void change_svuid(struct ucred *newcred, uid_t svuid); | void change_svuid(struct ucred *newcred, uid_t svuid); | ||||
void crcopy(struct ucred *dest, struct ucred *src); | void crcopy(struct ucred *dest, struct ucred *src); | ||||
struct ucred *crcopysafe(struct proc *p, struct ucred *cr); | struct ucred *crcopysafe(struct proc *p, struct ucred *cr); | ||||
struct ucred *crdup(struct ucred *cr); | struct ucred *crdup(struct ucred *cr); | ||||
void crextend(struct ucred *cr, int n); | void crextend(struct ucred *cr, int n); | ||||
void proc_set_cred_init(struct proc *p, struct ucred *cr); | void proc_set_cred_init(struct proc *p, struct ucred *cr); | ||||
void proc_set_cred(struct proc *p, struct ucred *cr); | void proc_set_cred(struct proc *p, struct ucred *cr, struct credwrap *crw); | ||||
void crfree(struct ucred *cr); | void crfree(struct ucred *cr); | ||||
struct ucred *crget(void); | struct ucred *crget(void); | ||||
struct ucred *crhold(struct ucred *cr); | struct ucred *crhold(struct ucred *cr); | ||||
struct credwrap *crwget(struct ucred *cr); | |||||
struct credwrap *crwhold(struct credwrap *crw); | |||||
void crwfree(struct credwrap *crw); | |||||
void cru2x(struct ucred *cr, struct xucred *xcr); | void cru2x(struct ucred *cr, struct xucred *xcr); | ||||
void cru2xt(struct thread *td, struct xucred *xcr); | void cru2xt(struct thread *td, struct xucred *xcr); | ||||
void crsetgroups(struct ucred *cr, int n, gid_t *groups); | void crsetgroups(struct ucred *cr, int n, gid_t *groups); | ||||
int groupmember(gid_t gid, struct ucred *cred); | int groupmember(gid_t gid, struct ucred *cred); | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* !_SYS_UCRED_H_ */ | #endif /* !_SYS_UCRED_H_ */ |