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?
Thanks for the patch.
Yes, this is the correct thing to do (polkitagentses sion.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 polkitagenthelp er-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?