remove unused code and add some comments.
This commit is contained in:
parent
73f44d02f7
commit
96cfc7d98a
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ucred.h,v 1.29 2006/07/13 11:07:19 martin Exp $ */
|
||||
/* $NetBSD: ucred.h,v 1.30 2006/07/15 06:33:40 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -34,7 +34,6 @@
|
||||
#ifndef _SYS_UCRED_H_
|
||||
#define _SYS_UCRED_H_
|
||||
|
||||
#include <sys/lock.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
/*
|
||||
@ -51,7 +50,6 @@ struct uucred {
|
||||
};
|
||||
|
||||
struct ucred {
|
||||
struct simplelock cr_lock; /* mutex for ref count */
|
||||
uint32_t cr_ref; /* reference count */
|
||||
#define cr_startcopy cr_uid /* for dup & copy */
|
||||
uid_t cr_uid; /* effective user id */
|
||||
@ -61,14 +59,15 @@ struct ucred {
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
static __inline void crhold(struct ucred *cr)
|
||||
{
|
||||
simple_lock(&cr->cr_lock);
|
||||
cr->cr_ref++;
|
||||
simple_unlock(&cr->cr_lock);
|
||||
}
|
||||
|
||||
/* flags that control when do_setres{u,g}id will do anything */
|
||||
/*
|
||||
* flags that control when do_setres{u,g}id will do anything
|
||||
*
|
||||
* ID_XXX_EQ_YYY means
|
||||
* "allow modifying XXX uid to the given value if the new value of
|
||||
* XXX uid (or gid) equals the current value of YYY uid (or gid)."
|
||||
*/
|
||||
|
||||
#define ID_E_EQ_E 0x001 /* effective equals effective */
|
||||
#define ID_E_EQ_R 0x002 /* effective equals real */
|
||||
#define ID_E_EQ_S 0x004 /* effective equals saved */
|
||||
|
Loading…
Reference in New Issue
Block a user