Use td_ucred rather than p_ucred to avoid panics and general unhappiness.

Pointy hat to:	netchild
This commit is contained in:
jhb 2006-03-27 19:16:31 +00:00
parent 8cb017d125
commit 1f7d4ffc3e

View File

@ -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));