View | Details | Raw Unified | Return to bug 181127
Collapse All | Expand All

(-)b/sys/kern/kern_mib.c (-4 / +3 lines)
Lines 266-272 sysctl_hostname(SYSCTL_HANDLER_ARGS) Link Here
266
{
266
{
267
	struct prison *pr, *cpr;
267
	struct prison *pr, *cpr;
268
	size_t pr_offset;
268
	size_t pr_offset;
269
	char tmpname[MAXHOSTNAMELEN];
269
	char tmpname[MAXHOSTNAMELEN+1];
270
	int descend, error, len;
270
	int descend, error, len;
271
271
272
	/*
272
	/*
Lines 314-324 sysctl_hostname(SYSCTL_HANDLER_ARGS) Link Here
314
314
315
SYSCTL_PROC(_kern, KERN_HOSTNAME, hostname,
315
SYSCTL_PROC(_kern, KERN_HOSTNAME, hostname,
316
    CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE,
316
    CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE,
317
    (void *)(offsetof(struct prison, pr_hostname)), MAXHOSTNAMELEN,
317
    (void *)(offsetof(struct prison, pr_hostname)), MAXHOSTNAMELEN+1,
318
    sysctl_hostname, "A", "Hostname");
318
    sysctl_hostname, "A", "Hostname");
319
SYSCTL_PROC(_kern, KERN_NISDOMAINNAME, domainname,
319
SYSCTL_PROC(_kern, KERN_NISDOMAINNAME, domainname,
320
    CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE,
320
    CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE,
321
    (void *)(offsetof(struct prison, pr_domainname)), MAXHOSTNAMELEN,
321
    (void *)(offsetof(struct prison, pr_domainname)), MAXHOSTNAMELEN+1,
322
    sysctl_hostname, "A", "Name of the current YP/NIS domain");
322
    sysctl_hostname, "A", "Name of the current YP/NIS domain");
323
SYSCTL_PROC(_kern, KERN_HOSTUUID, hostuuid,
323
SYSCTL_PROC(_kern, KERN_HOSTUUID, hostuuid,
324
    CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE,
324
    CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE,
325
- 

Return to bug 181127