diff options
| author | Dima Dorfman <dd@FreeBSD.org> | 2002-02-27 04:45:37 +0000 |
|---|---|---|
| committer | Dima Dorfman <dd@FreeBSD.org> | 2002-02-27 04:45:37 +0000 |
| commit | 76183f345377df655cfb357a53d52aa045fa8073 (patch) | |
| tree | b9bd8d438620748c0c88ed7a994eb55f8d617278 /sys/kern/kern_prot.c | |
| parent | b7eeb587f6c0aa1aa84ed6cca74ad7ec43ed8019 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_prot.c')
| -rw-r--r-- | sys/kern/kern_prot.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 615709eb26c3..56f7895c8d4e 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1760,6 +1760,22 @@ crdup(cr) } /* + * Fill in a struct xucred based on a struct ucred. + */ +void +cru2x(cr, xcr) + struct ucred *cr; + struct xucred *xcr; +{ + + bzero(xcr, sizeof(*xcr)); + xcr->cr_version = XUCRED_VERSION; + xcr->cr_uid = cr->cr_uid; + xcr->cr_ngroups = cr->cr_ngroups; + bcopy(cr->cr_groups, xcr->cr_groups, sizeof(cr->cr_groups)); +} + +/* * small routine to swap a thread's current ucred for the correct one * taken from the process. */ |
