Summary: | PolkitAgentSession incorrectly handles multiline PAM_TEXT_INFO output | ||
---|---|---|---|
Product: | PolicyKit | Reporter: | Dariusz Gadomski <dariusz.gadomski> |
Component: | daemon | Assignee: | David Zeuthen (not reading bugmail) <zeuthen> |
Status: | RESOLVED FIXED | QA Contact: | David Zeuthen (not reading bugmail) <zeuthen> |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Tested patch fixing the issue
Refactoring to use send_to_helper Refactoring to use send_to_helper |
Description
Dariusz Gadomski
2015-11-10 09:42:00 UTC
Created attachment 119534 [details] [review] Tested patch fixing the issue Thanks for the patch. Yes, this is the correct thing to do (polkitagentsession.c:io_watch_have_data is always calling g_strcompress()). Having the same newline handling and escaping code in three places seems too ugly and unnecessary, though. Would you be willing to update the patch so that polkitagenthelper-pam.c uses the send_to_helper function throughout (modified to do the escaping as necessary), or at least to test such an updated patch? Miroslav, thanks for taking a look. Sure, I can improve the patch. I'll attach the new version as soon as it's done. Created attachment 119643 [details]
Refactoring to use send_to_helper
I have refactored the code to make use of send_to_helper instead of duplicating the code.
I've chosen to apply it on top of the previous change to keep 2 different actions (escaping PAM_TEXT_INFO and refactoring) on the same step.
I have done sanity testing to make sure everything works as expected.
Typo, what I've meant in the above comment is that I wanted to avoid doing 2 different actions in the same commit. Created attachment 119702 [details] [review] Refactoring to use send_to_helper Perfect. Committed, thank you! |
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.