Bug 45066
Summary: | process looses access to files via the | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Need Real Name <mike_harris> |
Component: | kernel | Assignee: | Arjan van de Ven <arjanv> |
Status: | CLOSED NOTABUG | QA Contact: | Aaron Brown <abrown> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-06-25 08:21:19 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Need Real Name
2001-06-20 00:23:22 UTC
This has nothing to do with glibc, the relevant function calls are stright system calls. So I'll let kernel folks to explain this. Which kernel is this exactly ? "Other" permission bits are irrelevant if GID of file is one of your supplementary groups. setgid(2) doesn't alter them. man setgroups gives info on how to manipulate this. I've made the following modifications to my test program: insert these two lines before the setgid() call, (which probably isn't necessary anymore.): const gid_t groupList[] = {501}; setgroups((sizeof(groupList) / sizeof(gid_t)), &groupList); And now the program can access the file via the other bits, as a result of losing group 0. BTW, it is kernel 2.2.14. Thanks. Opps there was a bug in my code: add this line: #include <grp.h> and change the segroups() line to this: setgroups((sizeof(groupList)/sizeof(gid_t)), groupList); |