On Thu, 29 Mar 2012 08:32:18 +0200 Gian Piero Carrubba wrote:

> * [Wed, Mar 28, 2012 at 11:59:31PM +0200] Francesco Poli:
> >Mmmh, I don't think we can assume that sudo is installed, just because
> >we are within an sudo environment (with $SUDO_USER set).
> >Maybe we are inside a chroot environment and we entered by using sudo
> >from the outside. Package sudo is *not* necessarily installed *inside*
> >the chroot environment...
> 
> Oh, I see. More generally, this is an argument against the whole 
> 'switching-the-user' point: the same user pointed by $SUDO_USER isn't 
> guaranteed to exist inside the chroot.

Yes, I agree.

> 
> >After rebuilding apt-listbugs with your proposed modification,
> >I enter the chroot environment (B50shell_pdeb hook script),
> 
> Thanks for the explanation, I was really puzzled by the mysterious 
> behaviour :)
> In http://www.inventati.org/frx/progs/scripts/B50shell_pdeb I read:
> 
> /bin/bash < /dev/tty > /dev/tty 2> /dev/tty
> 
> Redirecting to/from the tty is evil,

Thanks to you for spotting this, I didn't remember those redirections
in that hook script!
I am of course open to suggestions on how to improve B50shell_pdeb,
so feel free to speak up, in case you have any good idea!

> and chaining such
> redirections is double evil for sure. Or is it evil^2 ? Well, anyway too 
> much evilness to defeat, I don't think there's a simple workaround for 
> it (for some meaning of 'simple').
> 
> >(even though I don't understand the use of the $n variable in "read p v 
> >n"...)
> 
> Oh, nothing (actually, it stands for 'null' or 'notcaringabout'), just 
> compulsory scripting for capturing the tail (if any) and not clobbering 
> the previous variable. Or if you feel like:
> test -n "$n" || continue # These aren't the droids you're looking for

Ah, right, just in case something else appears after the first two
fields.
Thanks for the explanation.

> 
> Ciao,

Ciao!   ;-)


-- 
 http://www.inventati.org/frx/frx-gpg-key-transition-2010.txt
 New GnuPG key, see the transition document!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

Attachment: pgpmSHlBaxPWZ.pgp
Description: PGP signature

Reply via email to