[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Locking of serial devices and devfs

On Thu, Jun 21, 2001 at 09:36:48AM -0400, Itai Zukerman wrote:
> I'm worried that this code lets the user put directories anywhere on
> the filesystem.  First run it with dev as "/dev/tts/0" (to create the
> lockfile directory), then run it with dev as "tts/../../../foo/bar"
> (to create a root directory, "foo").
> Why not just remove the leading "/dev/" and convert "/"s to something
> harmless like ","?

This brings up an interesting question -- did the LCK..%s designers
expect all devices to be under /dev/ ?  In any case, a major/minor scheme
seems best.  

Is it wise to kill three birds with one stone (non-"/dev/" and "LCK..n" and
multiple links to same device) when all introduce compatibility problems?
I suppose if you're going to break something, it's best to fix it com-

						- chad

Chad Miller <cmiller@surfsouth.com>  | Policeman: You're playing God!
unix brujo, shutterbug, bookworm     | Dr. Hfuhruhurr: *Somebody* has to!
URL: http://web.chad.org/home/     from ``The Man with Two Brains'' (1993)

Reply to: