Gpgme does not find key after setuid()

Kaustubh Gadkari kaustubh.gadkari at
Fri Apr 24 00:52:46 CEST 2009


I have code that sets uid after I start it as root. I have a user A
that owns a key, and I su - to root. Then I do:
./simple-signer <my key name> '<data to sign>'  A
In this case, gpgme does not find the key for user A.

However, if I run the following as user A:
./simple-signer <my key name> '<data to sign>'
gpgme finds the key for user A.

I am attaching my code, for reference. My question is : do I need to
do something that will enable gpgme to find the key when I run my code
as root?


Kaustubh Gadkari
kaustubh [dot] gadkari [at] gmail [dot] com
-------------- next part --------------
A non-text attachment was scrubbed...
Type: text/x-c++src
Size: 5921 bytes
Desc: not available
URL: </pipermail/attachments/20090423/95a34d68/>

More information about the Gnupg-users mailing list