[PATCH] kdesu for FreeBSD non-wheel users

Adriaan de Groot adridg at cs.kun.nl
Thu Nov 13 10:56:57 GMT 2003


On Wednesday 12 November 2003 17:19, Waldo Bastian wrote:
>
> Btw, the comment in su.cpp says:
> 	// Match "Password: " with the regex ^[^:]+:[\w]*$.
>
> I actually fail to see how
> 	"su: you are not allowed to su root"
> would match that.

That message is written out in two parts (ie. there are two write(2) calls): 
"su: " and "you .." Depending on the relative timing between the su process 
and kdesu, those two chunks may be read separately, or as one chunk. If they 
are read separately, then "su: " matches the regexp and kdesu assumes it's a 
password prompt.

Anyway, back to the ol' drawing board.



More information about the kde-core-devel mailing list