Deleted Added
sdiff udiff text old ( 176367 ) new ( 180291 )
full compact
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Mike Karels at Berkeley Software Design, Inc.
7 *
8 * Quite extensively rewritten by Poul-Henning Kamp of the FreeBSD

--- 22 unchanged lines hidden (view full) ---

31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/kern/kern_mib.c 176367 2008-02-17 16:44:48Z antoine $");
40
41#include "opt_compat.h"
42#include "opt_posix.h"
43#include "opt_config.h"
44
45#include <sys/param.h>
46#include <sys/kernel.h>
47#include <sys/sbuf.h>

--- 155 unchanged lines hidden (view full) ---

203SYSCTL_ULONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, "");
204
205static char machine_arch[] = MACHINE_ARCH;
206SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD,
207 machine_arch, 0, "System architecture");
208
209char hostname[MAXHOSTNAMELEN];
210
211static int
212sysctl_hostname(SYSCTL_HANDLER_ARGS)
213{
214 struct prison *pr;
215 char tmphostname[MAXHOSTNAMELEN];
216 int error;
217
218 pr = req->td->td_ucred->cr_prison;

--- 16 unchanged lines hidden (view full) ---

235 /*
236 * Copy the locally set hostname to the jail, if
237 * appropriate.
238 */
239 mtx_lock(&pr->pr_mtx);
240 bcopy(tmphostname, pr->pr_host, MAXHOSTNAMELEN);
241 mtx_unlock(&pr->pr_mtx);
242 }
243 } else
244 error = sysctl_handle_string(oidp,
245 hostname, sizeof hostname, req);
246 return (error);
247}
248
249SYSCTL_PROC(_kern, KERN_HOSTNAME, hostname,
250 CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_PRISON,
251 0, 0, sysctl_hostname, "A", "Hostname");
252
253static int regression_securelevel_nonmonotonic = 0;

--- 69 unchanged lines hidden (view full) ---

323 return (sysctl_handle_string(oidp, kernconfstring,
324 strlen(kernconfstring), req));
325}
326
327SYSCTL_PROC(_kern, OID_AUTO, conftxt, CTLTYPE_STRING|CTLFLAG_RW,
328 0, 0, sysctl_kern_config, "", "Kernel configuration file");
329#endif
330
331char domainname[MAXHOSTNAMELEN];
332SYSCTL_STRING(_kern, KERN_NISDOMAINNAME, domainname, CTLFLAG_RW,
333 &domainname, sizeof(domainname), "Name of the current YP/NIS domain");
334
335u_long hostid;
336SYSCTL_ULONG(_kern, KERN_HOSTID, hostid, CTLFLAG_RW, &hostid, 0, "Host ID");
337char hostuuid[64] = "00000000-0000-0000-0000-000000000000";
338SYSCTL_STRING(_kern, KERN_HOSTUUID, hostuuid, CTLFLAG_RW, hostuuid,
339 sizeof(hostuuid), "Host UUID");
340
341SYSCTL_NODE(_kern, OID_AUTO, features, CTLFLAG_RD, 0, "Kernel Features");
342

--- 86 unchanged lines hidden ---