Date: Sat, 10 Dec 2011 18:36:25 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Kamil Choudhury <kamil.choudhury@anserinae.net> Cc: freebsd-fs@freebsd.org Subject: Re: mysterious sysctl failure on nullfs mount Message-ID: <20111210163625.GY50300@deviant.kiev.zoral.com.ua> In-Reply-To: <a115e80d65a1c010e1f056b80d02abd5.squirrel@webmail.anserinae.net> References: <a115e80d65a1c010e1f056b80d02abd5.squirrel@webmail.anserinae.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--kcC1fNEgTMCB/ozP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 10, 2011 at 10:50:07AM -0500, Kamil Choudhury wrote: > Hi all: >=20 > I've been trying to figure out what's going on with this bug for a few da= ys now: >=20 > http://docs.freebsd.org/cgi/getmsg.cgi?fetch=3D899628+0+current/freebsd-p= orts-bugs >=20 > Summary: you mount the virtualbox binaries to /usr/local/ via nullfs, and > execution fails with a syctl error. >=20 > I've figured out the bit of code that's causing the error, and I've > encapsulated it in the following (small) program: >=20 > #include <stdio.h> > #include <stdlib.h> > #include <errno.h> > #include <sys/param.h> > #include <sys/sysctl.h> >=20 > int main( void ) > { > char g_szSupLibHardenedExePath[5000]; > int aiName[4]; > aiName[0] =3D CTL_KERN; > aiName[1] =3D KERN_PROC; > aiName[2] =3D KERN_PROC_PATHNAME; > aiName[3] =3D getpid(); >=20 > size_t cbPath =3D sizeof( g_szSupLibHardenedExePath ); > printf( "%d\n", cbPath ); > if(sysctl(aiName, 4, g_szSupLibHardenedExePath, &cbPath, NULL, 0)= < 0) > printf( "sysctl failed" ); > else > printf( "sysctl succeeded" ); >=20 > return( 0 ); > } >=20 > Here's where it gets weird: if the code is executed in in > /usr/local/lib/virtualbox, it fails with the sysctl error. If the code is > executed in another location on the *same* nullfs mount (say, > /usr/local/bin/), it executes fine. >=20 > There seems to be a something at a filesystem level that's preventing > execution -- does anyone on the list know what that something may be? You did not specified which version of the OS you are running. --kcC1fNEgTMCB/ozP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7jiokACgkQC3+MBN1Mb4hxsQCglmZH0/Urn1edNnWHpY0+P1qt 7qYAn2x0RJOavl+5kSayi++M6Kww7Brd =RCq9 -----END PGP SIGNATURE----- --kcC1fNEgTMCB/ozP--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111210163625.GY50300>