Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 May 2011 14:00:21 GMT
From:      Patrick Lamaiziere <patfbsd@davenulle.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/157234: //proc/curproc/file returns "unknown" with a binary called via a nullfs mountpoint
Message-ID:  <201105211400.p4LE0LGC050957@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/157234; it has been noted by GNATS.

From: Patrick Lamaiziere <patfbsd@davenulle.org>
To: bug-followup@FreeBSD.org <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: kern/157234: //proc/curproc/file returns "unknown" with a
 binary called via a nullfs mountpoint
Date: Sat, 21 May 2011 15:34:18 +0200

 --MP_/VpgKIUX=tHLi5_qY/Vc1a2+
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 8bit
 Content-Disposition: inline
 
 Le Sat, 21 May 2011 11:18:00 GMT,
 Patrick Lamaiziere <patfbsd@davenulle.org> a écrit :
 
 > /proc/curproc/file returns "unknown" with a binary called via a
 > nullfs mountpoint, but not if called directly.
 
 Well, i've looked a bit the procfs code and this behavior seems
 more or less intented by the function vn_fullpath(9).
 
 procstat(1) is affected too : procstat: sysctl: kern.proc.pathname:
 2265: No such file or directory
 
 So it looks to be a limitation instead of a bug.
 
 I would like to suggest to reclassify this PR into the doc section and
 the attached patch to document the nulls manual page (as usual feel
 free to change the text as english is not my natural language).
 
 Thanks, regards
 
 --MP_/VpgKIUX=tHLi5_qY/Vc1a2+
 Content-Type: text/x-patch
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment; filename=nullfs.5.patch
 
 --- nullfs.5.org	2011-05-21 14:37:23.000000000 +0200
 +++ nullfs.5	2011-05-21 15:00:38.000000000 +0200
 @@ -56,6 +56,16 @@
  file system:
  .Pp
  .Dl "mount_nullfs /usr/ports /home/devel/ports"
 +.Sh CAVEAT
 +The
 +.Nm
 +file system prevents to convert a vnode reference to a full pathname, given a
 +process context. This will prevent an application to retrieve its path
 +to process binary. For example, applications using the
 +.Xr procfs 5
 +file system /proc/curproc/file or the 
 +.Xr sysctl 8
 +kern.proc.pathname
  .Sh SEE ALSO
  .Xr fstab 5 ,
  .Xr mount_nullfs 8
 
 --MP_/VpgKIUX=tHLi5_qY/Vc1a2+--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105211400.p4LE0LGC050957>