Bill Allombert: > On Thu, Jul 23, 2015 at 11:57:04PM +0000, Patrick Schleizer wrote: >>>> Even if not disallowed. Even without any custom sudoers settings, this >>>> patch would work? No disadvantages by it? >>>> >>>> kdesudo works on any system. "sudo apt-get install kdesudo", that's it. >>>> No special settings required. And if one would not have it installed, >>>> su-to-root would act as it does now. No difference then. >>> >>> I just tested kdesudo and gksudo and they certainly do not work if the user >>> is >>> not allowed to use sudo, but is allowed to use su. >>> >>> Are you seeing something different ? >> >> You're right! >> >> Covering that case in the updated patch. > > So your patch is doing > if sudo -n true >/dev/null 2>&1 ; then > > The sudo documentation says: > -n, --non-interactive > Avoid prompting the user for input of any kind. If a > password is required > for the command to run, sudo will display an error message > and exit. > > so it does not work because sudo ask for a password the first time: I get > > %sudo -n true > sudo: sorry, a password is required to run sudo
But it does not block? It's non-interactive? If yes, then that's supposed to be that way. It's used as test to figure out whether the user is allowed to use sudo [and by extension, kdesudo] or not. In that case - in case the user is not allowed to use sudo - then sudo would exit non-zero. The new code block that would prefer kdesudo/gksudo would be skipped. The usual detection code would take over. Cheers, Patrick -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org