IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
No device node or symlink can have other characters as plain
readable ascii or valid utf8. The /dev/disk/by-label/* symlinks
can no longer contain weird stuff read from untrusted sources.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
We will not support any other character encoding than plain ascii
or utf8 for volume labels. All invalid utf8 and non-ascii characters
are substituted for security reasons. No options, no fancy heuristics.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
HAL soon wants to read the whole content of the udevdatabase while
starting up. This makes the whole udev structure available to the
udevinfo "dump".
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Just like the IMPORT values are stored in the udev database the
exported keys are stored in the udev database. The database is also
imported on a remove event before the rules are matched. So it
is possible to do:
ACTION=="add", KERNEL=="sda", ENV{MY_DEVICE}="1234", RUN+="/bin/logger add $devpath"
ACTION=="remove", ENV{MY_DEVICE}=="1234", RUN+="/bin/logger remove $devpath"
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
We want to write the output buffer before
we exit, otherwise redirection to a file
does not work correctly.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
If the kernel forks us as an usermodhelper, we don't have any of
the standard fd's and the first open() will start with fd=0.
This is inherited to all forked childs and confuses later forked
helpers where we want to read from a pipe connected to the helpers
stdout/stderr.
# ls -l /proc/$(pidof udevd)/fd
total 6
dr-x------ 2 root root 0 2005-08-18 12:44 .
dr-xr-xr-x 4 root root 0 2005-08-18 12:44 ..
lrwx------ 1 root root 64 2005-08-18 12:44 0 -> /dev/null
lrwx------ 1 root root 64 2005-08-18 12:44 1 -> socket:[1274617]
lr-x------ 1 root root 64 2005-08-18 12:44 2 -> pipe:[1274618]
l-wx------ 1 root root 64 2005-08-18 12:44 3 -> pipe:[1274618]
lrwx------ 1 root root 64 2005-08-18 12:44 4 -> socket:[1274619]
lrwx------ 1 root root 64 2005-08-18 12:44 5 -> socket:[1274620]
Ouch! This will obviously not redirect sterr, it will kill the pipe
we established between the parent and the child:
devnull = open("/dev/null", O_RDWR);
dup2(devnull, STDERR_FILENO);
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
vol_id segfaults if read() fails on broken devices reporting
the wrong size.
Thanks to Erhard Schultchen for the debugging.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This can be uses to export stuff to the event environment or
to carry a state from one rule to another, like enabling/disabling
later rules conditionally.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Several people complained about the "default" rules and the "default"
setup. Here we start to remove things where we can't hava a "default".
The best examples for rules are in the distro folders, just pick the one
that matches your needs and start from there.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>