summaryrefslogtreecommitdiffstats
path: root/sys/netncp
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-10-11 23:38:17 +0000
committerjhb <jhb@FreeBSD.org>2001-10-11 23:38:17 +0000
commit4806d88677d2a333254f9fc33d4e119cc56bb002 (patch)
treed3ca87a8ac917d5003235cc737cd5f76591f7c1b /sys/netncp
parent9f68054d87b5538c76f0b802ef8f7344eedd5647 (diff)
downloadFreeBSD-src-4806d88677d2a333254f9fc33d4e119cc56bb002.zip
FreeBSD-src-4806d88677d2a333254f9fc33d4e119cc56bb002.tar.gz
Change the kernel's ucred API as follows:
- crhold() returns a reference to the ucred whose refcount it bumps. - crcopy() now simply copies the credentials from one credential to another and has no return value. - a new crshared() primitive is added which returns true if a ucred's refcount is > 1 and false (0) otherwise.
Diffstat (limited to 'sys/netncp')
-rw-r--r--sys/netncp/ncp_conn.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netncp/ncp_conn.c b/sys/netncp/ncp_conn.c
index dc255f2..fbe9b15 100644
--- a/sys/netncp/ncp_conn.c
+++ b/sys/netncp/ncp_conn.c
@@ -230,10 +230,8 @@ ncp_conn_alloc(struct ncp_conn_args *cap, struct proc *p, struct ucred *cred,
if (cap->owner != NCP_DEFAULT_OWNER) {
owner = crget();
owner->cr_uid = cap->owner;
- } else {
- owner = cred;
- crhold(owner);
- }
+ } else
+ owner = crhold(cred);
MALLOC(ncp, struct ncp_conn *, sizeof(struct ncp_conn),
M_NCPDATA, M_WAITOK | M_ZERO);
error = 0;
OpenPOWER on IntegriCloud