Re: schroot: mount: exec mount_nullfs not found: No such file or directory

2012-02-15 Thread Robert Millan
El 12 de febrer de 2012 23:06, Damien Raude-Morvan
draz...@drazzib.com ha escrit:
 Could someone please check if 044_mount_exec.diff is the culprit?

 Yes, it works without 044_mount_exec.diff !

Thanks.  Will be fixed in next upload.

 I think that debian/patches/tmp_glibc.diff should be dropped since 2.13-26
 is in unstable now.

Yes.  It's fixed in SVN.

-- 
Robert Millan


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caofdtxn+cpjeag2_n3jddfkbnwqr5dqz7c7zllavd_yfsbd...@mail.gmail.com



schroot: mount: exec mount_nullfs not found: No such file or directory

2012-02-12 Thread Damien Raude-Morvan

Hi BSD Porters,

Since last December, I'm unable to use sbuild/schroot on an unstable box :

~# sbuild-update -ugdc unstable
E: 10mount: mount: exec mount_nullfs not found: No such file or directory
E: unstable-kfreebsd-amd64-sbuild-1329077042-35644: Chroot setup failed: 
stage=setup-start

Chroot setup failed
Error setting up unstable chroot
Chroot setup failed at /usr/bin/sbuild-update line 166.

FTR:
1) I can manually mount -t nullfs via sudo
2) I haven't made any change to PATH
3) AFAIK, mount can't find its helper in /sbin/

This issue is tracked as #650978.

Does anybody have a clue ?

Regards,
--
Damien


--
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f381dc4.8030...@drazzib.com



Re: schroot: mount: exec mount_nullfs not found: No such file or directory

2012-02-12 Thread Steven Chamberlain
Hi,

On 12/02/12 20:15, Damien Raude-Morvan wrote:
 ~# sbuild-update -ugdc unstable

At that shell, if you first run:

~# echo $PATH

What is the actual output?

I just wonder if /sbin is missing from PATH either before, or after, you
run sbuild-update.

Thanks,
Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f3823eb.8010...@pyro.eu.org



Re: [buildd-tools-devel] Bug#650978: schroot: mount: exec mount_nullfs not found: No such file or directory

2012-02-12 Thread Roger Leigh
On Sun, Feb 12, 2012 at 09:15:00PM +0100, Damien Raude-Morvan wrote:
 Hi BSD Porters,
 
 Since last December, I'm unable to use sbuild/schroot on an unstable box :
 
 ~# sbuild-update -ugdc unstable
 E: 10mount: mount: exec mount_nullfs not found: No such file or directory
 E: unstable-kfreebsd-amd64-sbuild-1329077042-35644: Chroot setup
 failed: stage=setup-start
 Chroot setup failed
 Error setting up unstable chroot
 Chroot setup failed at /usr/bin/sbuild-update line 166.
 
 FTR:
 1) I can manually mount -t nullfs via sudo
 2) I haven't made any change to PATH
 3) AFAIK, mount can't find its helper in /sbin/
 
 This issue is tracked as #650978.
 
 Does anybody have a clue ?

Well, I have a suspicion of the problem.

1) schroot setup scripts are run without a PATH being set.  This
   has not been an issue to date for some reason; either this works
   on Linux and not BSD, or we were hitherto only using shell
   builtins or commands which didn't rely on PATH.  This fix is
   fairly simple: we need to explicity set PATH in the environment
   before execing the setup scripts.

2) BSD mount is not using a sensible PATH to search for its helpers.
   If it's using the user PATH to search for its helpers, there might
   be security implication here, especially if it's SUID like on Linux.

We can fix (1) in schroot fairly simply.  (2) might need some
investigation by the BSD porters.


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.


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120212203250.gt8...@codelibre.net



Re: schroot: mount: exec mount_nullfs not found: No such file or directory

2012-02-12 Thread Robert Millan
El 12 de febrer de 2012 20:15, Damien Raude-Morvan
draz...@drazzib.com ha escrit:
 Does anybody have a clue ?

I recently applied this patch in mount to support /usr/sbin helpers:

http://anonscm.debian.org/viewvc/glibc-bsd/trunk/freebsd-utils/debian/patches/044_mount_exec.diff?revision=4047view=markup

could you try rebuilding freebsd-utils without it?

If this patch is the problem, we could use execvP() instead (like upstream did).

-- 
Robert Millan


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOfDtXPD_OjKTvpfwKtbjK+EegWLf=9daasdngyheohxd4f...@mail.gmail.com



Re: schroot: mount: exec mount_nullfs not found: No such file or directory

2012-02-12 Thread Steven Chamberlain
On 12/02/12 20:52, Robert Millan wrote:
 I recently applied this patch in mount to support /usr/sbin helpers:
 
 http://anonscm.debian.org/viewvc/glibc-bsd/trunk/freebsd-utils/debian/patches/044_mount_exec.diff?revision=4047view=markup
 
 could you try rebuilding freebsd-utils without it?

Hi,

I tested that /lib/freebsd/mount (for which /bin/mount is wrapper
script) does accept a user-specified PATH when looking for a helper to
execute.  But fortunately it is not setuid (at least on my own Squeeze
installation).

If anyone allows the use of sudo for /bin/mount, that should reset the
environment to something sane, so they should not be at risk.


 If this patch is the problem, we could use execvP() instead (like upstream 
 did).

I see that upstream previously searched /sbin then /usr/sbin, before
rewriting it to use execvP with _PATH_SYSPATH which is
/rescue:/sbin:/usr/sbin.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f382cdb.40...@pyro.eu.org



Re: schroot: mount: exec mount_nullfs not found: No such file or directory

2012-02-12 Thread Robert Millan
El 12 de febrer de 2012 21:19, Steven Chamberlain ste...@pyro.eu.org
ha escrit:
 I tested that /lib/freebsd/mount (for which /bin/mount is wrapper
 script) does accept a user-specified PATH when looking for a helper to
 execute.  But fortunately it is not setuid (at least on my own Squeeze
 installation).

 If anyone allows the use of sudo for /bin/mount, that should reset the
 environment to something sane, so they should not be at risk.

Wouldn't it be better to fix the bug instead?

 If this patch is the problem, we could use execvP() instead (like upstream 
 did).

 I see that upstream previously searched /sbin then /usr/sbin, before
 rewriting it to use execvP with _PATH_SYSPATH which is
 /rescue:/sbin:/usr/sbin.

If someone can confirm this fixes the problem, I could cherry-pick the
execvP() fix from upstream, but that requires importing the whole
execvP() implementation so I'd rather be sure it's what we need.

Could someone please check if 044_mount_exec.diff is the culprit?

-- 
Robert Millan


--
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caofdtxprsx9fhrpjg43j0fssdcdkvq2bdgdx9+hwxfhmtcx...@mail.gmail.com



Re: schroot: mount: exec mount_nullfs not found: No such file or directory

2012-02-12 Thread Steven Chamberlain
On 12/02/12 21:24, Robert Millan wrote:
 If anyone allows the use of sudo for /bin/mount, that should reset the
 environment to something sane, so they should not be at risk.
 
 Wouldn't it be better to fix the bug instead?

Yes, of course...

 ... I could cherry-pick the
 execvP() fix from upstream, but that requires importing the whole
 execvP() implementation so I'd rather be sure it's what we need.

If it is easier, here is the older method used upstream before execvP
and paths.h:

http://svnweb.freebsd.org/base/head/sbin/mount/mount.c?r1=117030r2=117031

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f383043.2010...@pyro.eu.org



Re: schroot: mount: exec mount_nullfs not found: No such file or directory

2012-02-12 Thread Damien Raude-Morvan

Hi Robert,

On 12/02/2012 22:24, Robert Millan wrote:

If someone can confirm this fixes the problem, I could cherry-pick the
execvP() fix from upstream, but that requires importing the whole
execvP() implementation so I'd rather be sure it's what we need.

Could someone please check if 044_mount_exec.diff is the culprit?


Yes, it works without 044_mount_exec.diff !

FTR, during rebuild of freebsd-utils-9.0 without 044_mount_exec.diff, it 
FTBFS with an error: redefinition of 'getvfsbyname'. It seems to come 
from getvfsbyname redefined debian/patches/tmp_glibc.diff.


I think that debian/patches/tmp_glibc.diff should be dropped since 
2.13-26 is in unstable now. But maybe I'm just plain wrong as I'm not 
following kfreebsd closely...


Regards,
--
Damien


--
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f384603.9030...@drazzib.com