Review Request 126724: Expose callingUser in HelperSupport if available

David Edmundson david at davidedmundson.co.uk
Tue Jan 12 14:45:33 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126724/#review90971
-----------------------------------------------------------

Ship it!


looks good, thanks for this patch.

note given my comment in the other patch you'll need to change 1 line here.

- David Edmundson


On Jan. 12, 2016, 9:36 a.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126724/
> -----------------------------------------------------------
> 
> (Updated Jan. 12, 2016, 9:36 a.m.)
> 
> 
> Review request for KDE Frameworks, Dario Freddi and David Edmundson.
> 
> 
> Repository: kauth
> 
> 
> Description
> -------
> 
> The Polkit backend is able to retrieve the calling user. As this is
> a useful information for a helper the information can be exposed in
> the AuthBackend and be retrieved through the HelperSupport.
> 
> 
> Diffs
> -----
> 
>   src/kauthhelpersupport.h 2828ec21aa00b7fb35dcf19db7f3869158e85b1d 
>   src/kauthhelpersupport.cpp c2a88d7cc574eb6ab092f0981b828fd4c68ba025 
>   src/AuthBackend.h c67a706dda107c9815e3c3f74c628fed6d2e4dcc 
>   src/AuthBackend.cpp ff91dd580919af9046b3f3d26f340885d54d370e 
>   src/CMakeLists.txt 1b6930d1db89f6ecc1223772b6632c57762f829f 
>   src/backends/polkit-1/Polkit1Backend.cpp 78ee5bb6d97d9d83beec21e197a947dfc994b2a9 
> 
> Diff: https://git.reviewboard.kde.org/r/126724/diff/
> 
> 
> Testing
> -------
> 
> a helper with:
>     ActionReply KScreenLockerAuthHelper::save(const QVariantMap &args)
>     {
>     auto user = KAuth::HelperSupport::callingUser();
> 
>     QFile file(QStringLiteral("/tmp/authtest"));
>     file.open(QIODevice::WriteOnly);
>     file.write(user->homeDir().toUtf8());
>     file.write("\n");
>     file.write(user->loginName().toUtf8());
>     file.write("\n");
>     file.write(QByteArray::number(user->userId().nativeId()));
>     file.write("\n");
> 
>     return ActionReply::SuccessReply();
>     }
>     
> created the file /tmp/authtest with the following content:
> 
>     /home/martin
>     martin
>     1000
>     
> Which matches my user.
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160112/8f3ffda4/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list