git: kernel - Fix kern.proc.pathname sysctl

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Aug 5 13:19:08 PDT 2016


commit 726f7ca07e193db73635e9c4e24e40c96087d6d9
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Aug 5 13:12:08 2016 -0700

    kernel - Fix kern.proc.pathname sysctl
    
    * kern.proc.pathname is a sysctl used by programs to find the path
      of the running program.  This sysctl was created before we stored
      sufficient information in the proc structure to construct the
      correct path when multiple aliases are present (due to e.g. null-mounts)
      to the same file.
    
    * We do have this information, in p->p_textnch, so change the sysctl to
      use it.  The sysctl will now return the actual full path in the context
      of whomever ran the program, so it should properly take into account
      chroots and such.

Summary of changes:
 sys/kern/kern_proc.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/726f7ca07e193db73635e9c4e24e40c96087d6d9


-- 
DragonFly BSD source repository



More information about the Commits mailing list