On Aug 05, Josua Dietze <digidie...@draisberghof.de> wrote:

> So I'm afraid I need your advice about several things to do it right.
> Q: Is there a guideline what *can* be assumed available at boot time?
A read only /, no /usr and no /var.
If you want to persist in using tcl then you will need a wrapper shell
script which forks and waits for e.g. /dev/log to appear (which
guarantees that /usr is available, / is writeable and logging works).
e.g. have a look at /lib/udev/alsa-utils.

> Will do. The conflicts are now gone anyway from udev-extras if I'm not 
> mistaken.
udev-extras has been dead for more than one year.

>> And unless I am missing something, the usage of /tmp/gsmmodem_* is
>> insecure (if confirmed, please clone the bug and contact the security
>> team). And expected to *not* work at boot time. And subject to races.
>> And just plain ugly. What did the author think?
> I thought I'd make the life easier for users. And yes, it is a quick  
> hack.
This does not excuse the tempfile race, which is a grave security
problem.
And it will not work anyway at boot time since /tmp will be read only.

> My hack made udev create a symlink to the lowest interrupt interface  
> after mode-switching. To handle the switched device exclusively (i.e. 
> leaving any existing devices alone), I am storing just the bus/device 
> number in the temporary file name.
You are trying to solve this at the wrong level. You should use an
IMPORT rule triggered by KERNEL=ttyS* (or something like this) and then
a SYMLINK rule triggered by an exported variable.
Anyway, you should not manually create symlinks in /dev.
If you need help, ask on the linux-hotp...@vger mailing list.

> Regarding modern kernels, this tool is used on old netbooks, on routers 
> and sometimes dated distributions. Unfortunately, I can't assume a 
> certain kernel version nor a distribution minimum.
udev does.
And even if you do not, the distribution maintainers should.

-- 
ciao,
Marco

Attachment: signature.asc
Description: Digital signature

Reply via email to