Commit graph

134 commits

Author SHA1 Message Date
Kay Sievers c112873b5b rules: static_node - use 0660 if group is given to get the cigar
>> On Tue, May 24, 2011 at 15:33, Tom Gundersen <teg@jklm.no> wrote:
>
> Close, but no cigar. Looks like the static nodes are not assigned
> permissions 0660 even if a gid is set (the nodes have perms 0600).
>
> Cheers,
>
> Tom
2011-05-30 02:12:02 +02:00
Kay Sievers 1eb037a7bf rules: support substitutions in TAG= 2011-05-26 14:46:12 +02:00
Kay Sievers 7df0ed83c1 rules: implement TAGS== match 2011-05-25 21:08:52 +02:00
Kay Sievers 38932b9fba rules: fix whitespace 2011-05-25 20:07:34 +02:00
Kay Sievers 3cf1a8e36e libudev: device - use DEVMODE from kernel as the default mode 2011-05-16 22:04:02 +02:00
Kay Sievers 8958da13c7 libudev: list - use bit flags for 'sort' and 'unique' 2011-04-24 00:22:23 +02:00
Kay Sievers c7c32e9c98 simplify rules file overwrite logic
The udev list already provides all we need, if we use the basename
as the key, and request sorting and uniqueness.
2011-04-23 23:33:11 +02:00
Kay Sievers a178e7fe90 udevd: rules files - accept empty or /dev/null links 2011-04-20 17:58:58 +02:00
Kay Sievers 2181d30a34 timeout handling without alarm() 2011-04-20 01:54:38 +02:00
Kay Sievers 7f2d3a3fc8 require explicit "db_persist" to exclude device info from --db-cleanup 2011-04-14 14:44:56 +02:00
Kay Sievers d3990a576a "db_persist=" -> "db_persist" 2011-04-14 12:42:59 +02:00
Kay Sievers 02bf3e13e0 udevd: do not nice processes 2011-04-14 12:25:19 +02:00
Kay Sievers 9ead662791 udevadm: info --cleanup-db
Most of the udev database from initramfs should be deleted before
starting udev in the real root. udevadm: info --cleanup-db deletes
all database entries in /run/udev. Events that processed IMPORT{db},
or mark devices explicitely as persistent, will be excluded.
2011-04-13 22:33:01 +02:00
Kay Sievers 4ec9c3e797 use /run/udev/ if possible and fall back to /dev/.udev/ 2011-03-23 02:31:09 +01:00
Kay Sievers 5f59fa0900 move /dev/.udev/ to /dev/.run/udev/ and convert old udev database at udevd startup 2011-03-15 17:26:08 +01:00
Kay Sievers ff0e1f4e5d check ifindex > 0 instead of subsystem == "net" 2010-12-14 11:27:02 +01:00
Harald Hoyer 851dd4ddc5 udev-rules.c: change import property buffer to 16384 bytes
import_program_into_properties() should have the same line length as
import_file_into_properties()

see also https://bugzilla.redhat.com/show_bug.cgi?id=652318
2010-11-12 14:42:35 +01:00
Yin Kangkai 27f4528b9a malloc()+memset() -> calloc() 2010-08-03 08:10:26 +02:00
Yin Kangkai 1851332c08 udevd: fix some memory leaks in error path
Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
2010-08-02 12:37:55 +02:00
Kay Sievers 3b529da425 allow final assignment for OPTIONS:="nowatch"
A final assignemnt operator will disable any device watching by
inotify, and any possible later rules setting "watch" again will
be ignored.
2010-07-07 11:35:40 +02:00
Kay Sievers 7d2b68b734 IMPORT{cmdline}: start at first char after '=' 2010-05-31 11:04:42 +02:00
Kay Sievers c4f6dcc4a5 add IMPORT{cmdline} 2010-05-31 01:13:03 +02:00
Kay Sievers 88cbfb09ee while (1) -> for (;;) 2010-05-27 15:11:00 +02:00
Kay Sievers d80f8ffd1a fix compilation with --enable-debug 2010-05-25 15:11:02 +02:00
Kay Sievers 761dfddcc0 create static nodes provided by kernel modules to allow module autoloading 2010-05-20 17:09:04 +02:00
Kay Sievers e85f5ec15f reset process priority before executing RUN+=
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581235
2010-05-12 08:46:56 +02:00
Kay Sievers d0d7b8d085 add info message when empty NAME is given 2010-05-07 22:57:20 +02:00
Kay Sievers 75cb1ac51e warn when renaming kernel-provided nodes instead of adding symlinks 2010-05-05 11:39:25 +02:00
Kay Sievers 6d80a7e83f remove debug output during rules parsing 2010-05-03 18:09:25 +02:00
Kay Sievers 1dbfbfbea6 use the usual TAG+=, TAG= logic 2010-04-22 19:03:11 +02:00
Kay Sievers 3f896a2abd all to match against a given TAG== 2010-04-22 18:33:24 +02:00
Kay Sievers 28460195c2 add TAG= to improve event filtering and device enumeration 2010-04-22 18:12:36 +02:00
Kay Sievers 5d69a34caf fix previous commit 2010-04-21 15:43:05 +02:00
Kay Sievers e9906fec71 remove left-over from ignore_remove and all_partitions 2010-04-21 15:11:57 +02:00
Kay Sievers a89d342dfb remove "ignore_remove" option 2010-04-13 12:45:38 +02:00
Kay Sievers 1f084fe581 remove "all_partitions" option
We can not predict the major/minor of non-existing devices:
  $ grep . /sys/class/block/sd*/dev
  /sys/class/block/sda1/dev:259:524288
  /sys/class/block/sda2/dev:259:262144
  /sys/class/block/sda3/dev:259:786432
  /sys/class/block/sda4/dev:259:131072
  /sys/class/block/sda/dev:259:0
  /sys/class/block/sdb/dev:259:655360
  /sys/class/block/sdc/dev:259:393216

If this functionality is still needed for some broken hardware, it needs to be
solved with a tool not part of the udev package. Because such option is unreliable
and unsafe to use.
2010-04-13 08:52:48 +02:00
Kay Sievers 4b06c40935 replace "add|change" with "!remove" 2010-04-12 16:52:41 +02:00
Kay Sievers 5539f624e1 allow IMPORT{db}="KEY" 2010-04-12 15:58:05 +02:00
Kay Sievers fbb31cd6e1 libbudev-private: rename udev_list_entry_get_flag() 2010-03-10 14:52:42 +01:00
Kay Sievers 6d87ee2e00 print warning for BUS=, SYSFS{}=, ID= 2009-11-16 23:39:33 +01:00
Kay Sievers cdae488a3f remove "ignore_device"
There is no way to ignore an event these days. Libudev events can
not be suppressed. It only prevents RUN keys from being executed,
which results in an inconsistent behavior in current setups.
2009-11-16 15:22:17 +01:00
Kay Sievers 081be002ea udevd: create /dev/.udev/rules.d/ before watching it wit inotify
This should also address:

On Tue, Nov 3, 2009 at 16:21, Marco d'Itri <md@linux.it> wrote:
> udev_rules_new() in udev/udev-rules.c unconditionally creates the
> directory.
> This is a problem because the function is called also by e.g. udevadm
> test, and creating /dev/.udev/ when it does not exist is an unacceptable
> side effect which will break everything else that checks for its
> existence to know if udev is running.
2009-11-04 17:06:52 +01:00
Kay Sievers bfbf65aad0 remove "last_rule" option
Its use breaks too many things which expect to be run from independent
later rules, and is an idication that something needs to be fixed
properly instead.
2009-10-28 11:45:32 +01:00
Kay Sievers bcb8b2315b fix SYMLINK{} option parsing 2009-09-16 18:14:03 +02:00
Kay Sievers 6c29f2b942 simplify "symlink name stack"
With well defined and kernel-supplied node names, we no longer need
to support a possible stack of conflicting symlinks and node names.
Only symlinks with identical names can be claimed by multiple devices.

This shrinks the former /dev/.udev/names/ significantly.

Also the /dev/{block,char}/MAJ:MIN" links are excluded from the name
stack - they are unique and can not conflict.
2009-09-09 18:49:07 +02:00
Kay Sievers 78715f65c9 fix randonm findings from llvm-clang-analyzer
Thanks to Lennart for the log file!
2009-09-08 22:11:04 +02:00
Kay Sievers 335e316a71 fix whitespace 2009-09-07 12:15:29 +02:00
Jeremy Kerr d412a68573 util_run_program: restore signal mask before executing event RUN commands
External programs triggered by events (via RUN=) will inherit udev's
signal mask, which is set to block all but SIGALRM. For most utilities,
this is OK, but if we start daemons from RUN=, we run into trouble
(especially as SIGCHLD is blocked).

This change saves the original sigmask when udev starts, and restores it
just before we exec() the external command.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2009-09-07 12:13:50 +02:00
Kay Sievers 77f89e9330 Revert "udev-rules.c: remove 'first_token' variable"
That was a mistake. The variable is needed to be set before
we parse the file. Thanks a lot to Alan Jenkins for spotting
this.

This reverts commit 710fdac1e4.
2009-09-07 12:13:49 +02:00
Florian Zumbiehl 6d691b2bd6 udev-rules.c: parse_file() - fix possible buffer overflow 2009-09-01 13:26:37 +02:00