Bug 74933

Summary: [PATCH] pkexec: Support just plain "pkexec" to run shell
Product: PolicyKit Reporter: Colin Walters <walters>
Component: libpolkitAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: RESOLVED FIXED QA Contact: David Zeuthen (not reading bugmail) <zeuthen>
Severity: normal    
Priority: medium CC: walters
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: 0001-pkexec-Support-just-plain-pkexec-to-run-shell.patch

Description Colin Walters 2014-02-13 15:06:53 UTC
Created attachment 94006 [details]
0001-pkexec-Support-just-plain-pkexec-to-run-shell.patch

Personally I use "pkexec bash" over and over now, and it'd be a lot
nice to just type "pkexec" and have it do what I want.  Like how "su"
will run the shell by default.
---
 docs/man/pkexec.xml   | 11 +++++-----
 src/programs/pkexec.c | 56 +++++++++++++++++++++++++++++++++++----------------
 2 files changed, 45 insertions(+), 22 deletions(-)
Comment 1 David Zeuthen (not reading bugmail) 2014-02-13 15:44:58 UTC
Sure, sounds good to me.
Comment 2 Colin Walters 2014-02-13 22:16:08 UTC
(In reply to comment #1)
> Sure, sounds good to me.

Thanks!  If this wasn't a setuid binary I'd take that as a positive review...but did you get a chance to give the code at least a cursory look?

I think it's right, I just had to rearrange the code a bit because it was assuming that it could pass "argv" from the program down to the child, but here we have to make up our own argv.
Comment 3 David Zeuthen (not reading bugmail) 2014-02-13 23:13:53 UTC
I did read through and it did look good to me. But just to be on the safe side, get mitr to give it a second look too?
Comment 4 Colin Walters 2014-02-18 18:42:50 UTC
(In reply to comment #3)
> I did read through and it did look good to me. But just to be on the safe
> side, get mitr to give it a second look too?

I trust you to do a review for sure!  I just wanted to double check.  I went ahead and pushed, but mitr - if you have a few moments for post-commit review, that's appreciated!

http://cgit.freedesktop.org/polkit/commit/?id=fb0d00225c401a521430ddf232a11965cdc5dd44

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.