Gpgme does not find key after setuid()

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


Hi,

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?

Thanks,
Kaustubh

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


More information about the Gnupg-users mailing list