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

Re: Applications using Linux capabilities



On Sat, Mar 24, 2001 at 02:49:29AM -0800, Alexander Hvostov wrote:
> > 
> > i have read GnuPG has code to use a capability to allocate secure
> > memory instead of using suid, but its only really useful if you have
> > capability bits in the filesystem which niether the kernel nor ext2
> > currently supports.
> 
> Wrong. GPG uses mlock() to prevent the memory it allocates from being
> swapped to disk.

yes, mlock() is only available to root (or rather users with a certain
capability) thus gpg must be installed setuid root or else its mlock()
call will fail.  the idea i got from the gpg docs is it has the
ability to have a filesystem capability set so it runs with ONE extra
capability so it can use mlock() and then drop that capability.  this
would be done instead of just making gpg fully suid root.  

there is a ./configure option

  --with-capabilities     use linux capabilities [default=no]

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgp2JEbKHRQP7.pgp
Description: PGP signature


Reply to: