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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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>
This fixes the issue of cdroms not showing up in the proper group,
and them showing up in /dev/cd/ for the persistant names.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
If USE_DEBUG=true and udev_log="debug", all output of the forked
programs to stdout and stderr is send to syslog.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
From: Bill Nottingham <notting@redhat.com>
Changed reading of firmware blob to mmap and let firmware_helper
follow the setting of the log level with UDEV_LOG.