Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 102501 - gnupg does not need suid since kernel 2.6.9
Summary: gnupg does not need suid since kernel 2.6.9
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-14 08:15 UTC by Tobias Sager
Modified: 2005-09-03 04:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gnupg ebuild with version check for kernel >= 2.6.9 (gnupg-1.4.1.ebuild,6.41 KB, application/octet-stream)
2005-08-20 18:52 UTC, Thomas Meira Andrade
Details
gnupg-1.4.2.ebuild (gnupg-1.4.2-r3.ebuild,6.40 KB, text/plain)
2005-08-21 05:18 UTC, Tobias Sager
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Sager 2005-08-14 08:15:00 UTC
Gnupg does not need to be suid since kernel 2.6.9.
It is possilbe since this version of the kernel to lock the required 32kb of
memory without root privileges.

See this thread on lkml:
http://marc.theaimsgroup.com/?l=linux-kernel&m=109167907532562&w=2

The patch went into the kernel here:
http://linux.bkbits.net:8080/linux-2.6/diffs/include/linux/resource.h@1.3?nav=index.html|src/|src/include/linux|hist/include/linux/resource.h
and was shipped with 2.6.9 after that:
http://linux.bkbits.net:8080/linux-2.6/cset@1.1938.156.17?nav=index.html|tags


This means that the ebuild could check for kernel version >= 2.6.9 and not suid
the executable then. This might make a few sysadmins happier.
Comment 1 Daniel Black (RETIRED) gentoo-dev 2005-08-20 01:48:06 UTC
this is a good idea. 
 
I'm struggling to work out a good way to implement. All the kernel test 
functions from the linux-info seem to die if the kernel is not configured. 
Comment 2 Marcelo Goes (RETIRED) gentoo-dev 2005-08-20 08:05:53 UTC
I had a bit of a rough time with it too.
Perhaps using linux-mod helps?
Comment 3 Thomas Meira Andrade 2005-08-20 18:52:41 UTC
Created attachment 66442 [details]
gnupg ebuild with version check for kernel >= 2.6.9

simple check for version >= 2.6.9 as suggested using kernel-mod eclass
(linux-mod deprecated)
Comment 4 Tobias Sager 2005-08-21 05:18:50 UTC
Created attachment 66470 [details]
gnupg-1.4.2.ebuild

- Updated the proposed ebuild to match the current gnupg-1.4.2-r2.ebuild in
tree.
- Simplified kernel version matching (basing on already parsed values by
kernel-mod)
Comment 5 Daniel Black (RETIRED) gentoo-dev 2005-09-03 04:15:47 UTC
k - fixed 
 
kernel-mod is deprecated and replaced with linux-mod. These are realy for 
modules 
 
For general kernel info use linux-info.