[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sudo(8) and fdesc don't get along
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: Sudo(8) and fdesc don't get along
- From: Cyrus Durgin <cider_(_at_)_rset_(_dot_)_net>
- Date: Mon, 30 Jul 2001 00:33:27 -0700
Hi,
It seems that sudo(8) and the fdesc filesystem do not play nicely
together. I have fdesc mounted as:
fdesc on /dev type fdesc (local, union)
I am no longer able to use sudo(8) (it hangs after prompting for user
password). I have tracked this problem to the following code, in
tgetpass.c,v 1.95;
/* Open /dev/tty for reading/writing if possible else use
stdin/stderr. */
if ((flags & TGP_STDIN) ||
(input = output = open(_PATH_TTY, O_RDWR|O_NOCTTY)) == -1) {
input = STDIN_FILENO;
output = STDERR_FILENO;
}
It would appear that opening /dev/tty when fdesc is mounted does not
yield the expected results; modifying the sudo code to use "input =
STDIN_FILENO" and "output = STDERR_FILENO" seems to solve the problem.
I haven't studied up on the semantics of fdesc yet, so I don't know what
the correct way to solve this is, but I'm sure someone familiar with the
code can work it up.
--
cyrus.
<cider_(_at_)_rset_(_dot_)_net>
Visit your host, monkey.org