[PATCH] kdesu for FreeBSD non-wheel users

Waldo Bastian bastian at kde.org
Thu Nov 13 11:57:12 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu November 13 2003 11:56, Adriaan de Groot wrote:
> 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.

Can you add a file to kdelibs/kdesu that lists all possible responses from su 
on your platform, if we get some overview from the various responses on the 
various platforms it may be easier to get the parsing right everywhere.

Maybe we can hardcode that "su:" doesn't mean "password:"

Cheers,
Waldo
- -- 
bastian at kde.org -=|[ SUSE, The Linux Desktop Experts ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/s3GYN4pvrENfboIRAn+jAJ9JHa9RId4pDHQPUgmIJPqVeDKa3ACgiWOr
3xS705KD4tEuvswu65a5Q48=
=51Hp
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list