Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 241128 - net-print/cups group authorisation fails with duplicated groups
Summary: net-print/cups group authorisation fails with duplicated groups
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-10 16:02 UTC by Daniel Solano Gómez
Modified: 2010-06-22 22:02 UTC (History)
0 users

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


Attachments
Change group authorisation logic to use iterative getgrent() calls instead of getgrnam() (cups-1.3.8-group_fix.patch,1.71 KB, patch)
2008-10-10 16:04 UTC, Daniel Solano Gómez
Details | Diff
Patches the ebuild to include new group authorisation patch. (cups-ebuild.patch,464 bytes, patch)
2008-10-10 16:06 UTC, Daniel Solano Gómez
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Solano Gómez 2008-10-10 16:02:40 UTC
CUPS has the ability to authorise people based upon group membership by using a configuration directive similar to 'Require group lpadmin'.  However, if a group is defined both in '/etc/group' and in LDAP, CUPS will only use the first instance.

The cause of this problem is that the 'getgrnam()' system call only returns one entry, even though multiple entries may fit the search criterion.  Iterating through the entries returned by 'getgrent()' allows the program to verify against all groups.

I have attached a patch that changes the authorisation code.  I have also submitted the patch upstream (http://cups.org/str.php?L2967).
Comment 1 Daniel Solano Gómez 2008-10-10 16:04:14 UTC
Created attachment 167880 [details, diff]
Change group authorisation logic to use iterative getgrent() calls instead of getgrnam()
Comment 2 Daniel Solano Gómez 2008-10-10 16:06:28 UTC
Created attachment 167884 [details, diff]
Patches the ebuild to include new group authorisation patch.
Comment 3 Timo Gurr (RETIRED) gentoo-dev 2010-06-22 22:02:06 UTC
Thanks for taking this upstream, resolving as upstream (even though that means we've to wait for >=cups-1.5 for this to happen).