* [9fans] passwd(1) over ssh fails: race in telnetd
@ 2011-01-26 15:16 yaroslav
0 siblings, 0 replies; only message in thread
From: yaroslav @ 2011-01-26 15:16 UTC (permalink / raw)
To: 9fans
passwd(1), while started on telnetd-simulated /dev/cons (via ssh),
gets killed for writing on closed pipe after "Confirm:" message. I
think it is because of close()/open() race in
/sys/src/cmd/ip/telnetd.c:/^conssim/+/open/+/consctl/.
Readln opens and closes consctl, and when two readln calls are made,
next open may be attempted before the daemon reopens of its end of the
simulated consctl.
A fast workaround is injection of sleep(100) between readln calls in
/sys/src/cmd/auth/passwd.c:102.
Suggestions for the proper fix?
- Iaroslav
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-26 15:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26 15:16 [9fans] passwd(1) over ssh fails: race in telnetd yaroslav
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).