Date: Sun, 22 Mar 2015 21:18:45 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280355 - head/sys/kern Message-ID: <201503222118.t2MLIjWv021396@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Sun Mar 22 21:18:44 2015 New Revision: 280355 URL: https://svnweb.freebsd.org/changeset/base/280355 Log: The sysctls that return process argv and envv return binary data, so clear the SBUF_INCLUDENUL flag. Pointed out by: tijl@ Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Mar 22 20:38:28 2015 (r280354) +++ head/sys/kern/kern_proc.c Sun Mar 22 21:18:44 2015 (r280355) @@ -1851,6 +1851,7 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARG _PHOLD(p); PROC_UNLOCK(p); sbuf_new_for_sysctl(&sb, NULL, GET_PS_STRINGS_CHUNK_SZ, req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); error = proc_getargv(curthread, p, &sb); error2 = sbuf_finish(&sb); PRELE(p); @@ -1903,6 +1904,7 @@ sysctl_kern_proc_env(SYSCTL_HANDLER_ARGS } sbuf_new_for_sysctl(&sb, NULL, GET_PS_STRINGS_CHUNK_SZ, req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); error = proc_getenvv(curthread, p, &sb); error2 = sbuf_finish(&sb); PRELE(p);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503222118.t2MLIjWv021396>