summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-03-27 19:16:31 +0000
committerjhb <jhb@FreeBSD.org>2006-03-27 19:16:31 +0000
commit1f7d4ffc3ee3be256a7722ba250a9076f2ddbd0f (patch)
tree6380876163407ec95e38e225a7a513ea4a9cd327
parent8cb017d125c114fd54825ed60044f4744af929c7 (diff)
downloadFreeBSD-src-1f7d4ffc3ee3be256a7722ba250a9076f2ddbd0f.zip
FreeBSD-src-1f7d4ffc3ee3be256a7722ba250a9076f2ddbd0f.tar.gz
Use td_ucred rather than p_ucred to avoid panics and general unhappiness.
Pointy hat to: netchild
-rw-r--r--sys/compat/linux/linux_misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index a63c2a3..2d7f8a2 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1411,7 +1411,7 @@ linux_sethostname(struct thread *td, struct linux_sethostname_args *args)
name[0] = CTL_KERN;
name[1] = KERN_HOSTNAME;
- if ((error = suser_cred(p->p_ucred, SUSER_ALLOWJAIL)))
+ if ((error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL)))
return (error);
return (userland_sysctl(td, name, 2, 0, 0, 0, args->hostname,
args->len, 0, 0));
OpenPOWER on IntegriCloud