kern_xxx.c (1930e303cfa1b9fe2c50fdad0d1ba6143311a53c) | kern_xxx.c (56f21b9d74a516a6c2f67d09e1b6c588bfa54c6a) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 81 unchanged lines hidden (view full) --- 90 register struct sethostname_args *uap; 91{ 92 int name[2]; 93 int error; 94 95 name[0] = CTL_KERN; 96 name[1] = KERN_HOSTNAME; 97 mtx_lock(&Giant); | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 81 unchanged lines hidden (view full) --- 90 register struct sethostname_args *uap; 91{ 92 int name[2]; 93 int error; 94 95 name[0] = CTL_KERN; 96 name[1] = KERN_HOSTNAME; 97 mtx_lock(&Giant); |
98 if ((error = suser_cred(td->td_ucred, PRISON_ROOT)) == 0) { | 98 if ((error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL)) == 0) { |
99 error = userland_sysctl(td, name, 2, 0, 0, 0, 100 uap->hostname, uap->len, 0); 101 } 102 mtx_unlock(&Giant); 103 return (error); 104} 105 106#ifndef _SYS_SYSPROTO_H_ --- 207 unchanged lines hidden --- | 99 error = userland_sysctl(td, name, 2, 0, 0, 0, 100 uap->hostname, uap->len, 0); 101 } 102 mtx_unlock(&Giant); 103 return (error); 104} 105 106#ifndef _SYS_SYSPROTO_H_ --- 207 unchanged lines hidden --- |