FreeBSD Bugzilla – Attachment 136061 Details for
Bug 181127
[libc] set{domain,host}name doesn't permit NUL terminated strings that are MAXHOSTNAMELEN long
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.txt
kern_kern_mib.c.patch (text/plain), 1.47 KB, created by
Enji Cooper
on 2013-08-08 03:20:00 UTC
(
hide
)
Description:
file.txt
Filename:
MIME Type:
Creator:
Enji Cooper
Created:
2013-08-08 03:20:00 UTC
Size:
1.47 KB
patch
obsolete
>From 1b8333ca810b682d8ef049887a3b6cc9abd80807 Mon Sep 17 00:00:00 2001 >From: Garrett Cooper <yanegomi@gmail.com> >Date: Wed, 7 Aug 2013 18:59:44 -0700 >Subject: [PATCH] Permit setting hostnames that are MAX_HOSTNAMELEN long and > are NUL terminated > >Sponsored-by: EMC Isilon >--- > sys/kern/kern_mib.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c >index c84d4b2..384c14d 100644 >--- a/sys/kern/kern_mib.c >+++ b/sys/kern/kern_mib.c >@@ -266,7 +266,7 @@ sysctl_hostname(SYSCTL_HANDLER_ARGS) > { > struct prison *pr, *cpr; > size_t pr_offset; >- char tmpname[MAXHOSTNAMELEN]; >+ char tmpname[MAXHOSTNAMELEN+1]; > int descend, error, len; > > /* >@@ -314,11 +314,11 @@ sysctl_hostname(SYSCTL_HANDLER_ARGS) > > SYSCTL_PROC(_kern, KERN_HOSTNAME, hostname, > CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, >- (void *)(offsetof(struct prison, pr_hostname)), MAXHOSTNAMELEN, >+ (void *)(offsetof(struct prison, pr_hostname)), MAXHOSTNAMELEN+1, > sysctl_hostname, "A", "Hostname"); > SYSCTL_PROC(_kern, KERN_NISDOMAINNAME, domainname, > CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, >- (void *)(offsetof(struct prison, pr_domainname)), MAXHOSTNAMELEN, >+ (void *)(offsetof(struct prison, pr_domainname)), MAXHOSTNAMELEN+1, > sysctl_hostname, "A", "Name of the current YP/NIS domain"); > SYSCTL_PROC(_kern, KERN_HOSTUUID, hostuuid, > CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, >-- >1.8.3.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 181127
: 136061