bug-gnulib
[Top][All Lists]
Advanced

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

Re: license request for mgetgroups


From: Jim Meyering
Subject: Re: license request for mgetgroups
Date: Thu, 23 May 2013 06:07:19 +0200

Eric Blake wrote:
> I am trying to fix a bug in libvirt where a child process deadlocked
> because it called initgroups() in between fork and exec when the parent
> was multithreaded; it turns out that looking up group membership
> information requires a mutex, but if some other thread in the parent
> owns that mutex at the time of the fork, then the child will no longer
> have that thread around to ever release the mutex.  The solution is to
> not call initgroups, but to instead split the use of the underlying
> pieces of what initgroups does - a call to getgrouplist prior to forking
> (requires the mutex, but pre-fork is safe) and a call to setgroups after
> forking (no lookup required, therefore no mutex involved and no deadlock
> possible).  I ended up writing my own wrapper around getgrouplist, and
> only then discovered that gnulib's mgetgroups module does a better job
> at the task, except for one bit: mgetgroups is currently GPLv3 but
> libvirt wants LGPLv2+.
>
> Since getgrouplist is implemented in glibc as LGPLv2+, is there any
> objection to relicensing the following modules as LGPLv2+?
>
> For my argument on the xalloc-oversized module, observe that malloca.h
> (part of the LGPLv2+ malloca module) has effectively inlined the
> contents of lib/xalloc-oversized.h, so while the larger xalloc module
> will never be LGPL (it calls exit), the mere use of checking for
> oversized allocation has already been intentionally isolated for safe
> use in LGPL code.
>
> For my own contributions to these modules, I'm okay with relaxing to
> LGPLv2+.  I've cc'd all other contributors as tracked by gnulib.git's
> history (I'm not sure if coreutils.git would turn up any earlier authors
> from before we promoted mgetgroups from coreutils to gnulib).  I did
> track the history of xalloc-oversized changes further back from when the
> macro was part of the larger xalloc.h (pre-split contributors marked in
> '()').  Module maintainers are denoted with *.
>
> getgroups [LGPLv3+] => *Jim, *Eric, Bruno, Paul
> getugroups [GPLv3+] => *Jim, Eric, Paul, Bruno, Lasse
> mgetgroups [GPLv3+] => *Jim, *Eric, Bruno
> xalloc-oversized [GPLv3+] => [*all] Eric, Paul, Jim, (Bruno)

Relicensing these to LGPLv2+ is fine with me.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]