[PATCH] kdesu for FreeBSD non-wheel users

Oswald Buddenhagen ossi at kde.org
Wed Nov 12 15:10:52 GMT 2003


On Wed, Nov 12, 2003 at 07:05:51AM +0100, Adriaan de Groot wrote:
> Attached a patch for the following problem:
> 
> Users that are not in the group wheel (and that's all of them except root,
> by default) may not su root at all. su(1) reports this with "su: you are
> not allowed to su root", which the parser in su.cpp recognizes as a
> password prompt (after all, there's a colon in there). My previous fix
> broke Linux so Waldo fixed it back, but the effect is that non-wheel users
> who use kdesu _can_ hang kdesu.
> 
> The patch - idea by Andy - checks if the user could possibly su root, and
> if not, it bails out early. This might possibly apply to other BSDs as
> well. I've only tested that this compiles, not if it works, though. Once
> my current build of HEAD finishes I'll check, but I'd appreciate it if
> some other folks could look at it as well.
> 
i think that's wrong. potentially every system can have a wheel group,
particularily those which use pam can be trivially configured to do so.
instead, the prompt recognizion should be improved. i mean, a prompt is
really not that hard to recognize: it ends with a colon (minus trailing
whitespace), has no trailing newline, and the program hangs afterwards
(i.e., does not exit or output something else).

greetings

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.



More information about the kde-core-devel mailing list