-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
munged crashes when processing supplementary group info under glibc #2
Comments
The more I dig the more confused I get. munge mixes pthreads and getgrent calls, why was this not migrated to the reentrant versions of the calls? Original comment by |
Without patch:
With patch:
Right now it's a big patch to Original comment by |
As a work-around, the gids code path can be disabled by running munged with So far, I've been unable to reproduce this behavior here under RHEL 5.5. One difference between our systems is that we're not running LDAP. The same UID can be mapped to different user names. User names and group names are treated as case-sensitive strings like they are with the standard password & group routines. I don't understand what the problem is with this behavior. I'm not very familiar with LDAP. Re: comment 1, Re: comment 2, Also, the comment 2 "without patch" excerpt is curious. I don't see why newgrp was needed there unless you had disabled the gids hash (e.g., via I had a similar bug report a while back with 0.5.8 under RHEL 5.2 (glibc-2.5-25) where munged would segfault in I'm still tracing through Original comment by |
Results from
Which mirrors the error I was getting
As I have worked on this there are a number of factors that have come up.
I plan on cleaning up and submitting 3 patches. I hope to have them by the end of the day barring any interruptions.
Original comment by |
Thanks for running this down, especially since I've been unable to reproduce it here. I'm somewhat surprised Re: 2), this matches the comment 2 "without patch" curious behavior and explains why newgrp was needed there. In Re: 3), munged can be run as root if needed; clients still won't need root privileges. I have concerns with Original comment by
|
The lazy caching scheme would add a field to the gid hash and otherwise be low impact. The I'll rework my patch to separate the code paths and not jettison the original code. That will allow the patch back in without any compromises at this point. Users can enable it with a flag if it's appropriate for their environment. Original comment by |
This issue was updated by svn:r854 / 842ec31. Created issue-2 branch. Original comment by
|
Original comment by |
Thanks for confirming that I can't simply replace As for Original comment by |
Out of curiosity, does running Original comment by |
This issue was closed by svn:r889 / dfe5ea5. Original comment by
|
Original comment by
|
Attachment from Chris Dunlap <cdunlap@llnl.gov> on 2010-10-28. https://storage.googleapis.com/google-code-attachments/munge/issue-2/comment-3/gids-test.c
Attachment from <ericew@gmail.com> on 2010-11-03. https://storage.googleapis.com/google-code-attachments/munge/issue-2/comment-8/munge-issue2.patch
What steps will reproduce the problem?
Add the following to
/etc/passwd
(this would never exist in production, but is used to emulate the fact that ldap groups can have case insensitive users defined in them)to
/etc/group
What is the expected output? What do you see instead?
munge should run and not crash. Munge will crash.
What version of the software are you using? On what operating system?
I have tried EPEL 0.5.8 (x86_64) and self built 0.5.9 (x86_64,i386) with identical results under Centos 5.5.
Please provide any additional information below.
Munge was quitting without any warning after 1 hour of running. The only clue in the logs was when it started it spit out an ...
Tracing the source it became obvious that munge can not handle the possibility that the same uid is mapped to two different strings, including case insensitivity. The fix for the most obvious issues should be as simple as altering the user comparison to a stricmp, but that does not fix the silent crash of munge during some edge cases and a group info reload.
Original issue reported on code.google.com by
ericew
on 28 Oct 2010 at 12:35The text was updated successfully, but these errors were encountered: