Re: GNOME System Monitor will use libgnomesu
- From: Hongli Lai <h lai chello nl>
- To: desktop-devel-list gnome org
- Subject: Re: GNOME System Monitor will use libgnomesu
- Date: Tue, 11 Jan 2005 17:36:58 +0100
Carlos Garnacho wrote:
This is a really side case, right? :), For regular su you can waitpid for
it and check error codes, but it's not the same for ssh, though...
[hongli izumi su-backend]$ su -c false
Password:
[hongli izumi su-backend]$ echo $?
1
As you can see, su also returns the return value of the child process.
The return value is not a reliable way to check whether su succeeded.
And I guess that your su replacement check that the password is wrong, right?
Yes. Actually, regular su does it too (that's why it prints "incorrect
password"). My modified su prints a message through a pipe, and notifies
the parent that the password was wrong.
BTW, you can check that the authentication has suceeded and then close the
pipes before returning.
How? Let's say you do su -c gedit. gedit doesn't print anything. How can
you check whether authentication succeeded while gedit is running?
GST uses forkpty() for doing comunication
Seriously? Last time I used forkpty it doesn't work on SuSE and a few
other distributions.
And even then you can't return file descriptors pointing to the auth
process?
I can. I just haven't started working on it yet. But this would mean
that, if libgnomesu is going to support other authentication systems
like ssh, that those programs must be modified too. Right now I'm not
sure what I should do. On one side, people keep presurring me implement
ssh/sudo support, but on the other side, they want me to implement
pipes, which is not possible without modifications to ssh/sudo.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]