summaryrefslogtreecommitdiffstats
path: root/sys/sys/ucred.h
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2015-03-21 20:24:54 +0000
committermjg <mjg@FreeBSD.org>2015-03-21 20:24:54 +0000
commitb6e838d488e059efc84b230c7acae9bfd1af4d5f (patch)
treea24d794036a812dd553331e895b827ad3a6fcdef /sys/sys/ucred.h
parent1cd59e2b5dec1e9bf1a0f5467ca0918aa51c7c72 (diff)
downloadFreeBSD-src-b6e838d488e059efc84b230c7acae9bfd1af4d5f.zip
FreeBSD-src-b6e838d488e059efc84b230c7acae9bfd1af4d5f.tar.gz
cred: add proc_set_cred_init helper
proc_set_cred_init can be used to set first credentials of a new process. Update proc_set_cred assertions so that it only expects already used processes. This fixes panics where p_ucred of a new process happens to be non-NULL. Reviewed by: kib
Diffstat (limited to 'sys/sys/ucred.h')
-rw-r--r--sys/sys/ucred.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
index 2b42b01..9a45308 100644
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -106,6 +106,7 @@ void crcopy(struct ucred *dest, struct ucred *src);
struct ucred *crcopysafe(struct proc *p, struct ucred *cr);
struct ucred *crdup(struct ucred *cr);
void cred_update_thread(struct thread *td);
+void proc_set_cred_init(struct proc *p, struct ucred *cr);
struct ucred *proc_set_cred(struct proc *p, struct ucred *cr);
void crfree(struct ucred *cr);
struct ucred *crget(void);
OpenPOWER on IntegriCloud