[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Perl postinst script running external commands



On Tue, 1 Oct 2002 13:11, Matthias Urlichs wrote:
> Russell Coker:
> > > More specifically, it has something to do with using backticks to start
> > > an external command, and open file descriptors. You don't KNOW which
> > > descriptor DebConf uses.
> >
> > This is a good reason for not using debconf.
>
> IMHO it's a good reason for not mixing configuration with execution,
> and it's an even better reason for fixing a bug in DebConf. Specifically,
> setting the Close-On-Exec flag on the file descriptor(s) which represent
> the DebConf protocol will prevent all these problems from occurring.

Are you sure that it's possible to fix it in such a fashion?  This might work 
for Perl (I have never used the Perl interface so I don't know how it works), 
but would not work for calling Debconf from Bash.

I think that the way to solve this is to not have a file handle remain open.  
Debconf could easily run in a client-server manner and the client could 
connect to a unix domain socket.

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page



Reply to: