Summary: | shared/util.c:get_group_creds() should not return -ESRCH upon error | ||
---|---|---|---|
Product: | systemd | Reporter: | Corey Ashford <cjashfor> |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED NOTOURBUG | QA Contact: | systemd-bugs |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Corey Ashford
2013-08-09 20:37:40 UTC
Well, the underlying getpwuid() tends to return ESRCH too, and in many cases we just pass that on (see getpwuid(3)). I am not sure it's such a good idea to tape over that... I see what you're saying, but on the other hand, getpwuid can also return ENOENT in the event that it can't find the user name. And seeing as how this error ends up getting display to a user, I think "papering over" may not be a bad choice here. "no such process" is completely misleading and confusing. But "No such file or directory" is misleading too. Users are neither files nor directories nor processes... Sounds wrong replacing one misleading error code with another misleading error code... Good point. In that case, maybe doing some interpretation of the error code rather than using perror (or strerror_r, etc.) to print the error message. The problem is actually that NSS modules can return whatever they want, and they are not very good at sticking to clear rules when to return what. Honestly, I am not sure we can fix this really. NSS modules can return whatever they want, and we shouldn't try to hide the precise errors. If this should be fixed, then please fix it in glibc. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.