1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-11-01 09:21:11 +03:00
Commit Graph

45 Commits

Author SHA1 Message Date
Kay Sievers
27b77df44d update source file headers 2006-08-28 00:29:11 +02:00
Kay Sievers
3a020a85da remove built-in /etc/passwd /etc/group parser 2006-08-20 18:25:57 +02:00
Kay Sievers
7ba2d2e6ae apply format char to variables exported by ENV 2006-04-15 19:32:05 +02:00
Kay Sievers
1aa1e24848 replace libsysfs
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>
2006-01-09 21:18:00 +01:00
Marco d'Itri
df4e89bfa6 move some logging from dbg() to info() 2005-11-07 18:52:03 +01:00
Marco d'Itri
ff3e4bed21 add strerror() to error logs 2005-11-07 18:44:18 +01:00
Kay Sievers
2a4ce70925 remove no longer needed waiting for "dev" file
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2005-10-29 21:13:43 +02:00
Kay Sievers
5b13ecb830 add uft8 validation for safe volume label exporting
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-28 13:49:32 +02:00
Kay Sievers
fb17920701 add and use name_list_cleanup() for cleaning up the string lists
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-27 16:15:41 +02:00
Kay Sievers
59d6bfefce split udev_util in several files
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-10 16:54:14 +02:00
Kay Sievers
61341fae4f update release notes for next version
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-02 04:32:19 +02:00
Kay Sievers
d455b0085d allow RUN to send the environment to a local socket
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-08-01 05:07:19 +02:00
Kay Sievers
e8d569b414 move code to its own files
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-22 12:35:58 -04:00
Kay Sievers
aaff09a30a add ID_TYPE to the id probers
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-27 17:04:56 +02:00
Kay Sievers
b8476286d6 store the imported device information in the udevdb
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-26 18:55:24 +02:00
Kay Sievers
be4bedd16b unify execute_command() and execute_program()
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-25 15:35:14 +02:00
Kay Sievers
6bf0ffe8fd allow rules to be compiled to one binary file
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-24 18:05:32 +02:00
Kay Sievers
8ab44e3fd0 udevd: control log-priority of the running daemon with udevcontrol
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-16 01:58:47 +02:00
Kay Sievers
995aec8759 udev: clear lists if a new value is assigned
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-05 05:13:33 +02:00
Kay Sievers
6a522681e1 udev: move dev.d/ handling to external helper
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-06-05 05:11:29 +02:00
kay.sievers@vrfy.org
1bbff4f035 [PATCH] apply default permissions only for devices that will need it 2005-04-26 23:55:01 -07:00
kay.sievers@vrfy.org
821d0ec803 [PATCH] add RUN key to be able to run rule based notification
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 23:55:00 -07:00
kay.sievers@vrfy.org
fb39f0566e [PATCH] move execute_program to utils + add action to init_device 2005-04-26 23:55:00 -07:00
kay.sievers@vrfy.org
18614ab25d [PATCH] remove untrusted chars read from sysfs-values or returned by PROGRAM
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 23:54:59 -07:00
kay.sievers@vrfy.org
67747e1de3 [PATCH] change call_foreach_file to return a list 2005-04-26 23:53:53 -07:00
kay.sievers@vrfy.org
28ce66de17 [PATCH] support =, ==, !=, += for the key match and assignment 2005-04-26 23:53:17 -07:00
kay.sievers@vrfy.org
e6764498e7 [PATCH] correct enum device_type 2005-04-26 23:53:17 -07:00
kay.sievers@vrfy.org
783272f045 [PATCH] don't lookup "root" in the userdb 2005-04-26 23:51:00 -07:00
kay.sievers@vrfy.org
63f61c5cf6 [PATCH] replace strncpy()/strncat() by strlcpy()/strlcat() 2005-04-26 23:51:00 -07:00
kay.sievers@vrfy.org
915a12adc2 [PATCH] use numeric owner/group as default values to avoid parsing userdb 2005-04-26 23:48:48 -07:00
kay.sievers@vrfy.org
e48fc108d9 [PATCH] allow unlimitied count of symlinks 2005-04-26 23:48:48 -07:00
kay.sievers@vrfy.org
f0308095c7 [PATCH] remove typedef for call_foreach_file() handler function 2005-04-26 23:39:48 -07:00
kay.sievers@vrfy.org
03cfa1394f [PATCH] correct udev_init_device 2005-04-26 23:39:48 -07:00
kay.sievers@vrfy.org
2a9a19245b [PATCH] determine device type in udev_init_device() 2005-04-26 23:36:13 -07:00
kay.sievers@vrfy.org
9ed47a9f21 [PATCH] move kernel name/number evaluation into udev_init_device() 2005-04-26 23:36:13 -07:00
kay.sievers@vrfy.org
5ef4268205 [PATCH] switch device type to enum 2005-04-26 23:36:13 -07:00
kay.sievers@vrfy.org
866bb54704 [PATCH] udev_volume_id: remove __packed__ from dasd structure as it does not work 2005-04-26 23:31:02 -07:00
kay.sievers@vrfy.org
c1ab046124 [PATCH] provide temporary device node for callouts to access the device
%N will create a temporary node for a callout a be sustituted with the
name of the node.
2005-04-26 23:27:32 -07:00
mbuesch@freenet.de
e39515ac1f [PATCH] trivial: remove _all_ trailing slashes with no_trailing_slash()
This changes no_trailing_slash() to remove all trailing slashes
and not just the last one.
2005-04-26 23:26:07 -07:00
mbuesch@freenet.de
85925517e6 [PATCH] trivial: fix signedness
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 23:24:20 -07:00
kay.sievers@vrfy.org
b9a8c4821a [PATCH] remove default_* permissions from udev.conf file
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 23:19:09 -07:00
kay.sievers@vrfy.org
9f8dfa19cf [PATCH] allow multiline rules by backslash at the end of the line
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 23:19:09 -07:00
kay.sievers@vrfy.org
65ab133412 [PATCH] simplify permission application
We have only one source of permissions now, so apply the default
permissions at udev init.
2005-04-26 23:19:09 -07:00
kay.sievers@vrfy.org
45a7b668ec [PATCH] remove unused variables
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 23:00:29 -07:00
kay.sievers@vrfy.org
9af5bb2f8f [PATCH] rename udev_lib to udev_utils and dev_d to udev_multiplex 2005-04-26 22:44:02 -07:00