[Debconf-devel] Bug#563577: Debconf fails to gain exclusive flock on readonly file descriptor on Solaris

Joey Hess joeyh at debian.org
Mon Jan 4 19:37:32 UTC 2010


James Lee wrote:
> On my local machines I am modifying File.pm to open the file
> descriptor as read/write which fixes the problem (and works on a real
> Linux kernel too), however I'm not sure if this will affect any other
> operations of debconf, but as far as I can tell it will not.
> 
> On line 51 of File.pm change:
>     if (! open ($this->{_fh}, $this->{filename})) {
> to:
>     if (! open ($this->{_fh}, "+<", $this->{filename})) {

This seems reasonable.

> http://www.nexenta.org/diffs-gnusolaris/nexenta-delta-debconf.454083.diff
> - Nexentas diff (changes the lock type)

That patch seems wrong; using shared locking will defeat the purpose of
this lock and allow multiple concurrent readers of the file.

-- 
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debconf-devel/attachments/20100104/ca485ad7/attachment.pgp>


More information about the Debconf-devel mailing list