summaryrefslogtreecommitdiff
path: root/udev_utils.c
AgeCommit message (Collapse)Author
2006-04-15apply format char to variables exported by ENVKay Sievers
2006-01-09replace libsysfsKay Sievers
We never used any of the libsysfs convenience features. Here we replace it completely with 300 lines of code, which are much simpler and a bit faster cause udev(d) does not open any syfs file for a simple event which does not need any parent device information. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-07move some logging from dbg() to info()Marco d'Itri
2005-11-07add strerror() to error logsMarco d'Itri
2005-10-29remove no longer needed waiting for "dev" fileKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2005-08-28add uft8 validation for safe volume label exportingKay Sievers
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>
2005-08-27add and use name_list_cleanup() for cleaning up the string listsKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-10split udev_util in several filesKay Sievers
It too big for the small tools to link against for only the log function. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-02update release notes for next versionKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-01allow RUN to send the environment to a local socketKay Sievers
RUN="socket:<name>" will send the environment in the kernel uevent format to the named destination. Using the socket instead of the program to pass the hotplug events to the HAL daemon, cuts down the running time of udevstart from 0.8 to 0.4 seconds on my box. env -i ACTION=add DEVPATH=/block/hda/hda1 strace -s10000 ./udev block sendto(3, "add@/block/hda/hda1\0 ACTION=add\0DEVPATH=/block/hda/hda1\0UDEV_LOG=3\0 ID_TYPE=disk\0ID_MODEL=HTS726060M9AT00\0ID_SERIAL=MRH401M4G6UM9B\0 ID_REVISION=MH4OA6BA\0ID_BUS=ata\0ID_PATH=pci-0000:00:1f.1-ide-0:0\0 ID_FS_USAGE=other\0ID_FS_TYPE=swap\0ID_FS_VERSION=2\0 ID_FS_UUID=9352cfef-7687-47bc-a2a3-34cf136f72e1\0 ID_FS_LABEL=ThisIsSwap\0ID_FS_LABEL_SAFE=ThisIsSwap\0 DEVNAME=/dev/hda1\0" Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-22move code to its own filesKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-27add ID_TYPE to the id probersKay Sievers
Export the type of device from ata_id and scsi_id, also strip leading and trailing whitespace and substitute consecutive whitespace with a single underline char. From: Hannes Reinecke <hare@suse.de> Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-26store the imported device information in the udevdbKay Sievers
Any program can query with udevinfo for persistent device attributes evaluated on device discovery now. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-25unify execute_command() and execute_program()Kay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-24allow rules to be compiled to one binary fileKay Sievers
All the rule files can be compiled into a single file, which can be mapped into the udev process to avoid parsing the rules with every event. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-16udevd: control log-priority of the running daemon with udevcontrolKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05udev: clear lists if a new value is assignedKay Sievers
Former values are cleared if SYMLINK=<value> is used. To add a value SYMLINK+=<value> is now needed. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05udev: move dev.d/ handling to external helperKay Sievers
Modern rules are expected to call notification and postprocessing with the RUN key. For compatibility the current behavior can be emulated with an external helper. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-04-26[PATCH] apply default permissions only for devices that will need itkay.sievers@vrfy.org
2005-04-26[PATCH] add RUN key to be able to run rule based notificationkay.sievers@vrfy.org
SUBSYSTEM=="block", RUN="/sbin/program" will execute the program only for block device events. ACTION="remove", SUBSYSTEM=="block", RUN"/sbin/program" will execute the program, if a block device is removed.
2005-04-26[PATCH] move execute_program to utils + add action to init_devicekay.sievers@vrfy.org
2005-04-26[PATCH] remove untrusted chars read from sysfs-values or returned by PROGRAMkay.sievers@vrfy.org
Better remove characters that are useless in a device node name. It may be a security risk to pass any character read from e.g. a sysfs attribute to a shell script we execute later. Prevent the modification of the libsysfs attribute value cache. Clear PROGRAM result if the execution encountered an error.
2005-04-26[PATCH] change call_foreach_file to return a listkay.sievers@vrfy.org
2005-04-26[PATCH] support =, ==, !=, += for the key match and assignmentkay.sievers@vrfy.org
2005-04-26[PATCH] correct enum device_typekay.sievers@vrfy.org
2005-04-26[PATCH] don't lookup "root" in the userdbkay.sievers@vrfy.org
2005-04-26[PATCH] replace strncpy()/strncat() by strlcpy()/strlcat()kay.sievers@vrfy.org
2005-04-26[PATCH] use numeric owner/group as default values to avoid parsing userdbkay.sievers@vrfy.org
2005-04-26[PATCH] allow unlimitied count of symlinkskay.sievers@vrfy.org
2005-04-26[PATCH] remove typedef for call_foreach_file() handler functionkay.sievers@vrfy.org
2005-04-26[PATCH] correct udev_init_devicekay.sievers@vrfy.org
2005-04-26[PATCH] determine device type in udev_init_device()kay.sievers@vrfy.org
2005-04-26[PATCH] move kernel name/number evaluation into udev_init_device()kay.sievers@vrfy.org
2005-04-26[PATCH] switch device type to enumkay.sievers@vrfy.org
2005-04-26[PATCH] udev_volume_id: remove __packed__ from dasd structure as it does not ↵kay.sievers@vrfy.org
work
2005-04-26[PATCH] provide temporary device node for callouts to access the devicekay.sievers@vrfy.org
%N will create a temporary node for a callout a be sustituted with the name of the node.
2005-04-26[PATCH] trivial: remove _all_ trailing slashes with no_trailing_slash()mbuesch@freenet.de
This changes no_trailing_slash() to remove all trailing slashes and not just the last one.
2005-04-26[PATCH] trivial: fix signednessmbuesch@freenet.de
We are already using %u in the sscanf() format string. The patch replaces the int for the kernel release number with unsigned int, as we can never have negative release numbers.
2005-04-26[PATCH] remove default_* permissions from udev.conf filekay.sievers@vrfy.org
With the "permissions only rules" we can just place: MODE="0660", OWNER="root", GROUP="root" at the beginning of the rules file and get exactly the same behavior. If no values are given the compiled-in defaults are used.
2005-04-26[PATCH] allow multiline rules by backslash at the end of the linekay.sievers@vrfy.org
On Sun, 2004-12-19 at 18:31 +0100, Marco d'Itri wrote: > > On Dec 19, Kay Sievers <kay.sievers@vrfy.org> wrote: > > > (Feature request: would it be possible to extend the rules files parser > > to support continuation lines? I'd like it to consider lines starting > > with white space as part of the previous line.) > > How about the usual backslash at the end of the line. Here is a simple > patch.
2005-04-26[PATCH] simplify permission applicationkay.sievers@vrfy.org
We have only one source of permissions now, so apply the default permissions at udev init.
2005-04-26[PATCH] remove unused variableskay.sievers@vrfy.org
Remove udev.bus, cause it's currently unused and newer kernels will pass it in the hotplug environment as PHYSDEVBUS. Remove udev.action, cause it's unused. Rename udev_set_values() to udev_init_device().
2005-04-26[PATCH] rename udev_lib to udev_utils and dev_d to udev_multiplexkay.sievers@vrfy.org