[buildd-tools-devel] Bug#650978: Bug#650978: /usr/bin/schroot: 10mount: mount: exec mount_nullfs not found: No such file or directory
Roger Leigh
rleigh at codelibre.net
Sun Dec 4 20:47:18 UTC 2011
On Sun, Dec 04, 2011 at 08:29:03PM +0100, Damien Raude-Morvan wrote:
> Le dimanche 04 décembre 2011 20:16:29, Roger Leigh a écrit :
> > On Sun, Dec 04, 2011 at 08:01:31PM +0100, Damien Raude-Morvan wrote:
> >
> > I'm not sure if this is a schroot issue, or an issue with the
> > kfreebsd system. Is "mount_nullfs" referenced by the 10mount
> > script (/etc/schroot/setup.d/10mount)?
>
> AFAIK, you're right: mount_nullfs helper is not referenced expicitly inside
> 10mount. There is only a BINDOPT="-t nullfs", which, I guess, is passed as-is
> to mount command.
Yes. It's just running "mount -t nullfs ...".
> No, I haven't touched anything on this script. Maybe there is something wrong
> with PATH (as mount_nullfs is in /sbin/) ?
I don't see PATH set in the debug output. Looking at the code running
run_parts in sbuild-session.cc, PATH is not explicitly set in the
environment. I would have to look back to see why we are doing this;
I think it was by design, but I can't offhand recall the reason. It
might be because we expect the shell to set up the environment if
missing, but not sure. It certainly doesn't set PATH on Linux with
/bin/sh=dash. We usually delegate to PAM, but the setup scripts are
PAM-independent.
WRT kfreebsd mount, it should not require PATH setting in order to
find its helpers, I think. On Linux, mount is setuid root, not sure
if it's also the case on kfreebsd. Such a program should not honour
the environment since it's a security hole.
We can certainly look at explicitly setting PATH when running setup
scripts. I just need to verify why we aren't doing it already in
case there's a good reason why we don't.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
More information about the Buildd-tools-devel
mailing list