Date: Tue, 24 Dec 2002 15:43:56 +0100 From: phk@freebsd.org To: "Paul A. Scott" <pscott@skycoast.us> Cc: current@freebsd.org Subject: Re: revoke(2) redux... Message-ID: <1731.1040741036@critter.freebsd.dk> In-Reply-To: Your message of "Tue, 24 Dec 2002 06:31:59 PST." <BA2DAFDF.17D6B%pscott@skycoast.us>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <BA2DAFDF.17D6B%pscott@skycoast.us>, "Paul A. Scott" writes:
>> I think you missed the fine point in the "kick everybody *else*
>> off" comment.
>
>Ahhh. I guess you mean that revoke() would change to do that. You're right,
>I did miss your point.
>
>> The point is you cannot serialize against other processes.
>
>But that's the point of serialization. Anyway, if init is the only process
>opening a tty,
revoke is used in most "login daemons", telnetd, getty and elsewhere.
There is no way you can close the race between:
revoke("/dev/ttyfoo");
and
open("/dev/ttyfoo");
Not even in init(8). There is always the risk that another process
opens the device between the two.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1731.1040741036>
