Bug 951728
Summary: | proftpd tries to close PAM session while running as non-root user | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michal Schmidt <mschmidt> |
Component: | proftpd | Assignee: | Matthias Saou <matthias> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 18 | CC: | jason.donald.burgess, matthias, paul, tmraz |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | proftpd-1.3.4c-2.fc18 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-04-26 06:32:07 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Michal Schmidt
2013-04-12 21:50:39 UTC
(In reply to comment #0) > PRIVS_ROOT does not have the desired effect because > session.disable_id_switching is set. It is set by mod_cap. This leads us to > an ugly but effective workaround: Use "CapabilitiesEngine off" in the config > file to disable mod_cap. Which capability should proftpd retain in order for this to work properly with mod_cap enabled? Upstream has been receptive to retaining needed capabilities for proper PAM operation in the past: http://bugs.proftpd.org/show_bug.cgi?id=3257 (In reply to comment #1) > Which capability should proftpd retain in order for this to work properly > with mod_cap enabled? I really think the proper way is to split it into two processes as I described in my original comment. [Adding Tomáš Mráz to CC]. Tomáš, would you have any comments on the proper way to open and close PAM sessions? I don't have much else to comment than just confirm what you said in the bug description as the proper way to call the pam_close_session(). Additional fork is needed also for the situation where the unprivileged child crashes. Raised upstream: http://bugs.proftpd.org/show_bug.cgi?id=3929 proftpd-1.3.4c-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/proftpd-1.3.4c-2.fc19 proftpd-1.3.4c-2.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/proftpd-1.3.4c-2.fc18 I see that proftpd upstream refused to add the fork(), because : """ we'd have another process which does absolutely nothing but shadow the original session, taking a slot in the process table, solely for purposes of closing some PAM session (which, for some reason, *requires root privs*) """ So instead they made sure to restore root privileges before closing the PAM session in the same process: http://pkgs.fedoraproject.org/cgit/proftpd.git/plain/pam-close-bug3929.patch?id=9f2fb5f2fa5ae0f9cc576ca985f97bc2a8f3e22a I must say, having a process partially drop privileges, but only so that it can restore them at will later, does not appear as a secure design. I'll let Jason comment on whether it gets rid of the DBus error messages. proftpd-1.3.4c-2.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. proftpd-1.3.4c-2.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |