Summary: | suauth NOPASS option not honored | ||
---|---|---|---|
Product: | [Applications] kdesu | Reporter: | Richard A.Gollub <rgollub> |
Component: | general | Assignee: | kdesu bugs tracker <kdesu-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aacid, adam.richard2023, devil, faure, piterpunk, zencat |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Allow NOPASS in /etc/suauth
Allow NOPASS on suauth (second version) |
Description
Richard A.Gollub
2004-06-26 16:58:42 UTC
*** Bug 83683 has been marked as a duplicate of this bug. *** Will look at it next week. My su doesn't seem to support suauth so it's a bit hard to reproduce. Next week came and went... maybe after KDE 3.3 *** Bug 91059 has been marked as a duplicate of this bug. *** Created attachment 35928 [details]
Allow NOPASS in /etc/suauth
I guess this has been forgotten, but we ran across this recently, and piterpunk AT slackware.com worked up the attached patch. Please consider queuing for 4.3.1
I'm not a kdesu expert so i'm just going to point out some general stuff i see if (check == 2) <-- sucks, use a enum value here my suggestion would be to use int ConverseSU(const char *password, checkMode check=NoCheck); instead of int ConverseSU(const char *password, int check=NoCheck); Also i wonder how that string comparison works on localized sudo programs Isn't the string "Password authentication bypassed." translated when using another locale than english? Created attachment 38202 [details]
Allow NOPASS on suauth (second version)
This patch solves the problem with NOPASS option on /etc/suauth and kdesu, without depends on specific strings.
Depending on "Password authentication bypassed." is ugly. And not locale wise (well... by now, this message is the same on all locales in "su" from shadow package, but that can change someday). Studying better the code and the problem, I found a more clever solution. ConverseSU waits for two kinds of string: 1. kdesu_stub -> if that is found it exits and confirm it don't need password 2. [some lines]+[string]: -> It presumes this is a prompt waiting for password When "su" is using the NOPASS option, it shows the string "Password authentication bypassed." and then "kdesu_stub". That didn't matches with any of expected patterns. The patch move the check for "kde_stub". With that change, the pattern 1 now is: 1. [some lines]+kdesu_stub A similar change is done on ConverseStub Hope this time the patch is OK to be included. Piter PUNK SVN commit 1056186 by ossi: fix password-less su/sudo authentication based on a patch by Piter PUNK BUG: 84039 M +13 -22 su.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1056186 *** Bug 99239 has been marked as a duplicate of this bug. *** *** Bug 116818 has been marked as a duplicate of this bug. *** |