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

Pointy hat to:	netchild
This commit is contained in:
John Baldwin 2006-03-27 19:16:31 +00:00
parent ad90494725
commit b77619bd7f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157183

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