Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150755444
D42255.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42255.id.diff
View Options
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -562,7 +562,7 @@
curthread->td_ucred = NULL;
newcred->cr_prison = &prison0;
newcred->cr_users++; /* avoid assertion failure */
- proc_set_cred_init(p, newcred);
+ p->p_ucred = crcowget(newcred);
newcred->cr_users--;
crfree(newcred);
#ifdef AUDIT
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1056,7 +1056,7 @@
* XXX: This is ugly; when we copy resource usage, we need to bump
* per-cred resource counters.
*/
- proc_set_cred_init(newproc, td->td_ucred);
+ newproc->p_ucred = crcowget(td->td_ucred);
/*
* Initialize resource accounting for the child process.
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -2194,17 +2194,6 @@
xcr->cr_pid = td->td_proc->p_pid;
}
-/*
- * Set initial process credentials.
- * Callers are responsible for providing the reference for provided credentials.
- */
-void
-proc_set_cred_init(struct proc *p, struct ucred *newcred)
-{
-
- p->p_ucred = crcowget(newcred);
-}
-
/*
* Change process credentials.
* Callers are responsible for providing the reference for passed credentials
diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -146,7 +146,6 @@
struct ucred *crcopysafe(struct proc *p, struct ucred *cr);
struct ucred *crdup(struct ucred *cr);
void crextend(struct ucred *cr, int n);
-void proc_set_cred_init(struct proc *p, struct ucred *cr);
void proc_set_cred(struct proc *p, struct ucred *cr);
void proc_unset_cred(struct proc *p);
void crfree(struct ucred *cr);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 8:32 PM (9 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30841692
Default Alt Text
D42255.id.diff (1 KB)
Attached To
Mode
D42255: Open-code proc_set_cred_init()
Attached
Detach File
Event Timeline
Log In to Comment