[Bug 228432] [PATCH] sysctl `KERN_PROC_CWD` should return `ENOMEM` when the output buffer isn't big enough

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed May 23 04:04:56 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228432

            Bug ID: 228432
           Summary: [PATCH] sysctl `KERN_PROC_CWD` should return `ENOMEM`
                    when the output buffer isn't big enough
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: brennan at umanwizard.com

Created attachment 193626
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193626&action=edit
patch fixing the issue

`man 3 sysctl` states: "If the amount of data available is greater than the
size of the buffer supplied, the call supplies as much data as fits in the
buffer provided and returns with the error code ENOMEM."

This is not true in the case of `KERN_PROC_CWD`, in which case `sysctl` returns
0, indicating success.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list