[Nix-dev] Re: etc activation script & pkexec

Yury G. Kudryashov urkud.urkud at gmail.com
Sat Aug 27 00:47:13 CEST 2011


Eelco Dolstra wrote:

> Hi,
> 
> On 08/26/2011 09:08 PM, Yury G. Kudryashov wrote:
> 
>> I've spent some time trying to investigate why pkexec started to crash.
>>
>> It seems that our 'etc' activation script ignored the fact that
>> /etc/polkit-1 is a symlink to /etc/static/polkit-1, and created a symlink
>> from /etc/polkit-1/nullbackend.conf.d to
>> /etc/static/polkit-1/nullbackend.conf.d.
> 
> But that's correct.  /etc/static/polkit-1/nullbackend.conf.d is in turn
> a symlink to /nix/store/...-polkit-0.102/etc/polkit-1/nullbackend.conf.d.
> 
>> As a result, I had a symlink from /etc/static/polkit/nullbackend.conf.d
>> to itself, and pkexec crashed.
> 
> How did it end up being a symlink to itself?
Try the following:
$ mkdir /tmp/symlink-test
$ cd !:1
$ mkdir -p static/polkit-1
$ ln -s static/polkit-1 .
$ ln -s /somewhere static/polkit-1/nullbackend
$ ln -sf $PWD/static/polkit-1/nullbackend polkit-1/nullbackend
$ cat polkit-1/nullbackend
-- 
Yury G. Kudryashov,
mailto: urkud at mccme.ru




More information about the nix-dev mailing list