Polish `Details` panel; added "Not Applicable" to fill otherwise blank spaces
Concern Raisedb340539eca13

Authored by sharvey on Apr 24 2018, 1:19 PM.

Description

Polish Details panel; added "Not Applicable" to fill otherwise blank spaces

Summary: Aligned detail item labels; added "Not Applicable" when PolicyKit info is missing

Test Plan:

  • Apply patch
  • Kill and relaunch polkit-kde-authentication-agent-1
  • Launch an application or change a KCM that prompts for authorization
  • Check that details are no longer left blank

Reviewers: davidedmundson, ngraham, Plasma

Reviewed By: davidedmundson, ngraham, Plasma

Subscribers: abetts, plasma-devel, Plasma

Tags: Plasma

Maniphest Tasks: T8569

Differential Revision: https://phabricator.kde.org/D12479

Details

bruns raised a concern with this commit.Apr 24 2018, 1:41 PM
bruns added a subscriber: bruns.
bruns added inline comments.
/AuthDialog.cpp
326

Just remove it completely, its pointless

Commit removing large parts of the original code ("Fix some Krazy issues", go figure):
https://phabricator.kde.org/R121:98bc4a47e7a36c0b259d2d75b30d325563fdc7da

appname was set using polkit_sysdeps_get_exe_for_pid_with_helper

Get the name of the binary a given process was started from.

Note that this is not necessary reliable information and as such shouldn't be relied on 100% to make a security decision. In fact, this information is only trustworthy in situations where the given binary is securely locked down meaning that 1) it can't be ptrace(2)'d; 2) libc secure mode kicks in (e.g LD_PRELOAD won't work); 3) there are no other attack vectors (e.g. GTK_MODULES, X11, CORBA, D-Bus) to patch running code into the process.
...

It has been removed since for a reason, and won't come back

This commit now has outstanding concerns.Apr 24 2018, 1:41 PM

I had a lurking feeling it was some bit of dead code. Thanks for pointing it out!

bruns added inline comments.Apr 24 2018, 3:40 PM
/AuthDialog.cpp
360

Also "Not applicable" is technically wrong, it is "Not available".

"Not applicable" is only applicable when some detail is missing because the information has no meaning for the specific context.

E.g. if you have a video file without audio, "number of audio channels" is not applicable. If the file has audio, but you are not able to parse it, number of channels is not available (or unknown).