]> err.no Git - systemd/log
systemd
15 years agorelease 147
Kay Sievers [Tue, 10 Nov 2009 14:35:11 +0000 (15:35 +0100)]
release 147

15 years agoRevert "gudev: fix out-of-tree build"
Kay Sievers [Tue, 10 Nov 2009 14:09:27 +0000 (15:09 +0100)]
Revert "gudev: fix out-of-tree build"

This reverts commit b15b08913800c4a2fad6530becca55b896f66984.

This breaks "make distcheck". The header is distributed in the tarball,
and does not live in builddir.

15 years agoupdate NEWS
Kay Sievers [Tue, 10 Nov 2009 05:49:02 +0000 (06:49 +0100)]
update NEWS

15 years agogudev: fix out-of-tree build
Marco d'Itri [Tue, 10 Nov 2009 05:35:20 +0000 (06:35 +0100)]
gudev: fix out-of-tree build

15 years agogudev: fix pkg-config call to work with "make distcheck"
Kay Sievers [Tue, 10 Nov 2009 05:31:13 +0000 (06:31 +0100)]
gudev: fix pkg-config call to work with "make distcheck"

15 years agoRevert "sound: include ALSA sound card id in /dev/snd/by-id/ links"
Lennart Poettering [Mon, 9 Nov 2009 22:19:04 +0000 (23:19 +0100)]
Revert "sound: include ALSA sound card id in /dev/snd/by-id/ links"

This reverts commit 68bffc607f7f0414fee77fa481d9c133ce0798e9.

After discussing this with Kay we decided to drop this again as by-id
links only make sense for devices that have a unique serial id. If they
don't any attempts to make them unique have the side effect of
nourishing assumptions by users that cannot be met, as the by-id device
link of a device could differ depending on the history of simultaneously
plugged in device.

So, to make sure that all device nodes follow the same rules for by-id/
symlinks, drop this patch again.

15 years agogudev: Remove LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE from priv header
David Zeuthen [Mon, 9 Nov 2009 21:30:18 +0000 (16:30 -0500)]
gudev: Remove LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE from priv header

Since libudev is no longer unstable either.

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agosound: include ALSA sound card id in /dev/snd/by-id/ links
Lennart Poettering [Mon, 9 Nov 2009 21:11:29 +0000 (22:11 +0100)]
sound: include ALSA sound card id in /dev/snd/by-id/ links

If two USB sound cards that have the same serial number are plugged in
make sure the by-id/ device node symlink is unique at least during
runtime, by including the ALSA card id in the symlink name.

This is a followup to ed1b2d9fc7.

15 years agogudev: Fix up GUdevDeviceNumber
David Zeuthen [Sun, 8 Nov 2009 17:25:55 +0000 (12:25 -0500)]
gudev: Fix up GUdevDeviceNumber

Actually dev_t is an unsigned quad type (e.g. 64-bit even on 32-bit
x86) so defining it to be an integer is wrong and not future
proof. Thus, redefine it to actually be a dev_t (as originally wanted)
and instead add a work-around for GNOME bug #584517, see

https://bugzilla.gnome.org/show_bug.cgi?id=584517

for details. This way, GObject Introspection will still work.

This change is technically an API/ABI break but

 - all released GUdev versions requires the user to understand that
   the API/ABI is unstable by requiring the G_UDEV_API_IS_SUBJECT_TO_CHANGE
   symbols to be defined

 - functions using GUdevDeviceNumber are rarely used

so we don't bump the so number.

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agomodem-modeswitch: fix ZTE MF6xx rule
Martin Pitt [Thu, 5 Nov 2009 22:56:28 +0000 (23:56 +0100)]
modem-modeswitch: fix ZTE MF6xx rule

https://launchpad.net/bugs/281335

15 years agosound: include ALSA sound card id in ID_ID property
Lennart Poettering [Thu, 5 Nov 2009 03:32:41 +0000 (04:32 +0100)]
sound: include ALSA sound card id in ID_ID property

If two USB sound cards that have the same serial number are plugged in
make sure ID_ID is unique at least during runtime, by including the ALSA
card id in the ID_ID string.

Fixes issues like this one:
http://pulseaudio.org/ticket/661

15 years agoudevd: create /dev/.udev/rules.d/ before watching it wit inotify
Kay Sievers [Wed, 4 Nov 2009 16:06:52 +0000 (17:06 +0100)]
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.

15 years agoata_id: export more advanced ATA features
David Zeuthen [Wed, 4 Nov 2009 15:34:22 +0000 (16:34 +0100)]
ata_id: export more advanced ATA features

15 years agofix major fd leak in link handling
Martin Pitt [Mon, 2 Nov 2009 23:03:43 +0000 (00:03 +0100)]
fix major fd leak in link handling

link_find_prioritized(): Properly close directory handles to fix a major fd
leak which caused hotplugging to fail entirely in many cases due to having too
many open files.

https://launchpad.net/bugs/463347

15 years agoextras/keymap/README.keymap.txt: Fix bug report link
Martin Pitt [Mon, 2 Nov 2009 15:22:14 +0000 (16:22 +0100)]
extras/keymap/README.keymap.txt: Fix bug report link

udev-extras is gone, ask people to file bugs against udev.

15 years agounblock signals we might want to handle
Kay Sievers [Sat, 31 Oct 2009 10:53:41 +0000 (11:53 +0100)]
unblock signals we might want to handle

On Thu, Oct 29, 2009 at 19:15, Christian P. Schmidt <schmidt@digadd.de> wrote:
> After the getty replaces itself with login the pam module pam_mount
> calls mount. This in turn determines that the partition to be mounted is
> LUKS encrypted, and calls cryptsetup. Cryptsetup receives the password,
> unlocks the partition, and calls udevadm settle in order to avoid some
> problems in interaction with LVM.
>
> udevadm settle never returns.
>
> The problem here is that SIGUSR1 and SIGALRM are both blocked in oldmask
> already, and never reach udevadm. No care is ever taken to ensure those
> signals are not blocked.

15 years agoudevd: queue-export - remove retry loop
Alan Jenkins [Thu, 29 Oct 2009 18:02:33 +0000 (18:02 +0000)]
udevd: queue-export - remove retry loop

These retry loops are required where create_path() could race with
delete_path().  But only the main udevd process writes to the queue,
so no races will happen here.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
15 years agouse CLOEXEC flags instead of fcntl()
Kay Sievers [Fri, 30 Oct 2009 11:31:59 +0000 (12:31 +0100)]
use CLOEXEC flags instead of fcntl()

15 years agoMakefile.am: fix build with mawk
Martin Pitt [Fri, 30 Oct 2009 08:38:21 +0000 (09:38 +0100)]
Makefile.am: fix build with mawk

Don't use the [[:space:]] syntax in awk calls' regex, since that's GNU awk
specific. Thanks to Alan Jenkins for finding this.

15 years agogudev: remove G_UDEV_API_IS_SUBJECT_TO_CHANGE since API is now stable
David Zeuthen [Thu, 29 Oct 2009 17:44:58 +0000 (18:44 +0100)]
gudev: remove G_UDEV_API_IS_SUBJECT_TO_CHANGE since API is now stable

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agokeymap: add HP 2230s
Martin Pitt [Thu, 29 Oct 2009 12:23:14 +0000 (13:23 +0100)]
keymap: add HP 2230s

Taken from hal-info commit e6389d9fa.

http://bugs.freedesktop.org/show_bug.cgi?id=21527

15 years agokeymap: add HP Pavillion dv6315ea
Martin Pitt [Thu, 29 Oct 2009 12:21:07 +0000 (13:21 +0100)]
keymap: add HP Pavillion dv6315ea

Taken from hal-info commit eba65779.

15 years agoremove "last_rule" option
Kay Sievers [Wed, 28 Oct 2009 10:45:32 +0000 (11:45 +0100)]
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.

15 years agobreak loops if util_create_path() returns error
Kay Sievers [Wed, 28 Oct 2009 10:37:20 +0000 (11:37 +0100)]
break loops if util_create_path() returns error

Dangling symlinks in path components return -ENOENT. Do not retry
to create the file in a loop in such case.

15 years agorules: Gentoo update
Matthias Schwarzott [Tue, 20 Oct 2009 19:02:04 +0000 (04:02 +0900)]
rules: Gentoo update

15 years agolibudev: allow to store negative values in the udev database
Peter Rajnoha [Mon, 19 Oct 2009 21:55:42 +0000 (06:55 +0900)]
libudev: allow to store negative values in the udev database

15 years agokeymap: Add Logitech Wave cordless
Martin Pitt [Wed, 14 Oct 2009 22:13:17 +0000 (00:13 +0200)]
keymap: Add Logitech Wave cordless

https://launchpad.net/bugs/215035

15 years agokeymap: make USB keyboards really work
Martin Pitt [Sun, 11 Oct 2009 18:02:11 +0000 (20:02 +0200)]
keymap: make USB keyboards really work

Calling usb_id and GOTO in one rule did not make sense at all.

15 years agokeymap: fix usb_id invocation
Martin Pitt [Sun, 11 Oct 2009 16:18:43 +0000 (18:18 +0200)]
keymap: fix usb_id invocation

For deciding whether to call usb_id, test the property which we are actually
querying further down.

https://launchpad.net/215035

15 years agokeymap: add missing map file
Martin Pitt [Thu, 8 Oct 2009 19:45:09 +0000 (21:45 +0200)]
keymap: add missing map file

This fixes commit a05cd7ea3e582c9bf9680492e73687ea56cdd864

15 years agokeymap: Add Logitech Wave USB
Martin Pitt [Thu, 8 Oct 2009 19:43:38 +0000 (21:43 +0200)]
keymap: Add Logitech Wave USB

This introduces a new rules section for USB keyboards, too.

https://launchpad.net/bugs/215035

15 years agoudevd: serialize events for with the same major/minor
Kay Sievers [Wed, 7 Oct 2009 22:06:23 +0000 (00:06 +0200)]
udevd: serialize events for with the same major/minor

On Wed, Oct 7, 2009 at 21:46, Alan Jenkins <sourcejedi.lkml@googlemail.com> wrote:
> Udev would have avoided the race prior to
>
82c785e "udevd: remove check for dev_t, DEVPATH_OLD takes care of that"
>
> (the "check" removed here used to serialize events based on the device
> major:minor number).

On Wed, Oct 7, 2009 at 22:31, Michael Guntsche <mike@it-loops.com> wrote:
> add      /module/8250_pnp (module)
> remove /devices/platform/serial8250/tty/ttyS0 (tty)
> add      /devices/pnp0/00:05/tty/ttyS0 (tty)

15 years agokeymap for Acer Aspire 5720
Maxim Levitsky [Fri, 25 Sep 2009 23:19:43 +0000 (02:19 +0300)]
keymap for Acer Aspire 5720

15 years ago50-udev-default.rules: fix printer MODE
Martin Pitt [Mon, 5 Oct 2009 09:38:44 +0000 (11:38 +0200)]
50-udev-default.rules: fix printer MODE

Prefix with a 0 to be consistent with other rules.

https://launchpad.net/bugs/438114

15 years agomake raw USB printer devices world-readable again
Martin Pitt [Wed, 30 Sep 2009 09:10:24 +0000 (11:10 +0200)]
make raw USB printer devices world-readable again

Commit f61e72d8 made raw USB printers accessible for the lp group. However,
chmoding them to 0660 is a bit over-zealous, since by default raw USB devices
are world-readable. Not being so breaks lsusb unnecessarily. Now set
permissions to 0664.

15 years agoudev-acl: catch up with ConsoleKit 0.4.1
William Jon McCann [Sun, 27 Sep 2009 13:37:26 +0000 (06:37 -0700)]
udev-acl: catch up with ConsoleKit 0.4.1

15 years agogudev: gir-scanner workaround for out of tree builds
Marco d'Itri [Thu, 24 Sep 2009 17:55:55 +0000 (10:55 -0700)]
gudev: gir-scanner workaround for out of tree builds

Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=562885

15 years agofix wrong parameter size on ioctl FIONREAD
Andrew Church [Thu, 24 Sep 2009 17:51:12 +0000 (10:51 -0700)]
fix wrong parameter size on ioctl FIONREAD

On Wed, Sep 23, 2009 at 23:11, Matthias Schwarzott <zzam@gentoo.org> wrote:
> It is about ioctl failures on amd64:
>   http://bugs.gentoo.org/show_bug.cgi?id=286041
>
> A bad parameter type to an ioctl() call causes udev-146 to generate "error
> getting buffer for inotify" messages in syslog.  The offending code is
> roughly:
>
>    ssize_t nbytes, pos;
>    // ...
>    ioctl(fd, FIONREAD, &nbytes);
>
> where ssize_t is 64 bits on amd64, but the kernel code for FIONREAD (at least
> through gentoo-sources-2.6.31) uses type int:
>
>    p = (void __user *) arg;
>    switch (cmd) {
>    case FIONREAD:
>        // ...
>        ret = put_user(send_len, (int __user *) p);
>
> so the upper 32 bits of "nbytes" are left uninitialized, and the subsequent
> malloc(nbytes) fails unless those 32 bits happen to be zero (or the system has
> a LOT of memory).

15 years agoutil_run_program: *really* restore signal mask before executing event RUN commands
Scott James Remnant [Tue, 22 Sep 2009 21:39:23 +0000 (14:39 -0700)]
util_run_program: *really* restore signal mask before executing event RUN commands

The previous patch was almost, but not quite, correct.  Rather than
restoring the signal mask it actually tried to make an even more
restrictive signal mask (had SIGALRM been blocked when udevd started,
anyway).

Fix it harder.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
15 years agofix previous commit for CD detection
Martin Pitt [Sun, 20 Sep 2009 17:21:04 +0000 (19:21 +0200)]
fix previous commit for CD detection

Do not run blkid twice. *brown paperbag*

15 years agofix single-session CD detection
Martin Pitt [Sun, 20 Sep 2009 17:07:51 +0000 (19:07 +0200)]
fix single-session CD detection

ID_CDROM_MEDIA_SESSION_LAST_OFFSET is not set for CDs with only a single
session (i. e. for the vast majority of CDs out there). The previous rules ran
blkid with invalid arguments for these, causing CD detection to fail in
DK-disks and gvfs.

Now check whether we actually have ID_CDROM_MEDIA_SESSION_LAST_OFFSET, and if
not, call blkid without -O for specifying the offset.

Many thanks to Maxim Levitsky for tracking this down!

https://launchpad.net/bugs/431055

15 years agorules: Gentoo update
Matthias Schwarzott [Sat, 19 Sep 2009 17:19:15 +0000 (19:19 +0200)]
rules: Gentoo update

15 years agorename interfaces to <iface>_rename if rename fails
Harald Hoyer [Fri, 18 Sep 2009 11:14:30 +0000 (13:14 +0200)]
rename interfaces to <iface>_rename if rename fails

15 years agoscsi_id: prevent buffer overflow in check_fill_0x83_prespc3()
Harald Hoyer [Wed, 16 Sep 2009 15:42:15 +0000 (17:42 +0200)]
scsi_id: prevent buffer overflow in check_fill_0x83_prespc3()

see https://bugzilla.redhat.com/show_bug.cgi?id=516920

15 years agoupdate TODO, NEWS
Kay Sievers [Wed, 16 Sep 2009 18:27:30 +0000 (20:27 +0200)]
update TODO, NEWS

15 years agorules: drop almost all NAME= keys
Kay Sievers [Wed, 16 Sep 2009 18:08:50 +0000 (20:08 +0200)]
rules: drop almost all NAME= keys

The drivers in kernel 2.6.31 supply the names for custom node names if
needed.

15 years agorules: remove remaining NAME="%k"
Kay Sievers [Wed, 16 Sep 2009 17:41:09 +0000 (19:41 +0200)]
rules: remove remaining NAME="%k"

15 years agofix SYMLINK{} option parsing
Kay Sievers [Wed, 16 Sep 2009 16:14:03 +0000 (18:14 +0200)]
fix SYMLINK{} option parsing

15 years agoscsi_id: delete copy of bsg.h
Kay Sievers [Mon, 14 Sep 2009 12:33:26 +0000 (14:33 +0200)]
scsi_id: delete copy of bsg.h

It's provided by the kernel since 2.6.23.

15 years agoudevadm: control - remove compat code
Kay Sievers [Mon, 14 Sep 2009 12:29:05 +0000 (14:29 +0200)]
udevadm: control - remove compat code

15 years agoudevadmi: control = exit with rc=2 if there is some system error
Marco d'Itri [Mon, 14 Sep 2009 12:05:31 +0000 (14:05 +0200)]
udevadmi: control = exit with rc=2 if there is some system error

15 years agoudevadm: print all messages to stderr with priority higher or equal than LOG_ERR
Marco d'Itri [Mon, 14 Sep 2009 11:56:38 +0000 (13:56 +0200)]
udevadm: print all messages to stderr with priority higher or equal than LOG_ERR

It is needed to prevent errors in udev from going unnoticed (e.g.
when udevd is not running).

15 years agoput util_create_path() and file creastion in a retry loop
Kay Sievers [Thu, 10 Sep 2009 00:08:05 +0000 (02:08 +0200)]
put util_create_path() and file creastion in a retry loop

On 8/29/09, Florian Zumbiehl <florz@florz.de> wrote:
> Could it happen that > util_create_path() and util_delete_path()
> do run in parallel for > the same directory? After all, util_create_path()
> does handle > the case where creation of the directory happens in parallel
> to it running, so it doesn't seem all that unlikely to me ...

15 years agoreorder create_path() and node/link creation to be called in a direct sequence
Kay Sievers [Wed, 9 Sep 2009 23:35:48 +0000 (01:35 +0200)]
reorder create_path() and node/link creation to be called in a direct sequence

15 years agosound: recognize saa7134 TV card sound devices as TV cards
Lennart Poettering [Wed, 9 Sep 2009 21:11:40 +0000 (23:11 +0200)]
sound: recognize saa7134 TV card sound devices as TV cards

15 years agosimplify "symlink name stack"
Kay Sievers [Wed, 9 Sep 2009 16:18:17 +0000 (18:18 +0200)]
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.

15 years agoextras/keymap: Rename KEY_COFFEE to KEY_SCREENLOCK
Martin Pitt [Wed, 9 Sep 2009 13:22:48 +0000 (15:22 +0200)]
extras/keymap: Rename KEY_COFFEE to KEY_SCREENLOCK

Unfortunately KEY_COFFEE is the canonical name in linux/input.h, and the more
sensible KEY_SCREENLOCK is an alias. Manually override this particular case,
since it's better to have "screenlock" in keymaps.

However, we still keep the automatic filtering for the general case, to avoid
introducing this problem again when input.h changes.

15 years agoextras/keymap: fix hash table collisions
Martin Pitt [Wed, 9 Sep 2009 09:09:17 +0000 (11:09 +0200)]
extras/keymap: fix hash table collisions

More than one key name was mapped to the same key, due to linux/input.h
defining some aliases (in particular, KEY_HANGUEL, KEY_SCREENLOCK,
KEY_MIN_INTERESTING). These caused hash table collisions.

Changed the generation of the tables to ignore these aliases, and updated all
keymaps to use the canonical name.

This was detected by llvm-clang-analyzer. Thanks to Lennart Poettering for
doing these checks and pointing this out!

https://launchpad.net/bugs/426647

15 years agofix randonm findings from llvm-clang-analyzer
Kay Sievers [Tue, 8 Sep 2009 20:11:04 +0000 (22:11 +0200)]
fix randonm findings from llvm-clang-analyzer

Thanks to Lennart for the log file!

15 years agoutil_run_program(): fix possible buffer overflow #2
Florian Zumbiehl [Tue, 8 Sep 2009 19:42:21 +0000 (21:42 +0200)]
util_run_program(): fix possible buffer overflow #2

I'm not sure how likely it is for UTIL_PATH_SIZE to have an odd value
(maybe it has right now? :-), but I guess making this universally correct
doesn't hurt ...

15 years agorequire 2.6.27 for proper signalfd handling
Kay Sievers [Tue, 8 Sep 2009 12:57:42 +0000 (14:57 +0200)]
require 2.6.27 for proper signalfd handling

<zzam> kay: ping I found out why udev-145 fails on some
            systems with kernel 2.6.25 and 2.6.26
<zzam> kay: it is because glibc was compiled against linux-headers-2.6.27
            or newer and issues signalfd4 syscall which was introduced in
            kernel 2.6.27 and not older signalfd syscall

15 years agomodem-modeswitch rules: Match more devices
Martin Pitt [Mon, 7 Sep 2009 17:37:43 +0000 (19:37 +0200)]
modem-modeswitch rules: Match more devices

extras/modem-modeswitch/61-mobile-action.rules: Match on device class/subclass
"00" as well, some devices like the Vodafone K3565-Z have that.

https://launchpad.net/bugs/281335

15 years agofix whitespace
Kay Sievers [Mon, 7 Sep 2009 10:15:29 +0000 (12:15 +0200)]
fix whitespace

15 years agoutil_run_program(): skip multiple spaces in argv creation
Kay Sievers [Mon, 7 Sep 2009 10:12:55 +0000 (12:12 +0200)]
util_run_program(): skip multiple spaces in argv creation

15 years agoutil_run_program: restore signal mask before executing event RUN commands
Jeremy Kerr [Sat, 5 Sep 2009 07:48:23 +0000 (17:48 +1000)]
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>
15 years agoudev_queue_get_seqnum_sequence_is_finished(): fix possible file handle leak
Florian Zumbiehl [Sun, 6 Sep 2009 15:28:26 +0000 (17:28 +0200)]
udev_queue_get_seqnum_sequence_is_finished(): fix possible file handle leak

15 years agoudevadm: remove symlink support for old commands
Kay Sievers [Sun, 6 Sep 2009 15:24:26 +0000 (17:24 +0200)]
udevadm: remove symlink support for old commands

15 years agotest: catch possible bug in GOTO resolving
Kay Sievers [Sun, 6 Sep 2009 14:55:00 +0000 (16:55 +0200)]
test: catch possible bug in GOTO resolving

15 years agoRevert "udev-rules.c: remove 'first_token' variable"
Kay Sievers [Sun, 6 Sep 2009 14:53:14 +0000 (16:53 +0200)]
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 710fdac1e49276683abe927472fe1b336960edd8.

15 years agomake raw USB printer devices accessible for lp
Martin Pitt [Fri, 4 Sep 2009 15:12:28 +0000 (17:12 +0200)]
make raw USB printer devices accessible for lp

Starting from version 1.4, cups now uses libusb and printer USB devices instead
of the usblp generated /dev/usb/lpX ones. In order to not require the cups USB
backend to run as root now, change raw USB printer devices to be root:lp 0660,
similar to usblpX devices.

This might also enable the hplip backend to not run as root, since this has
always used raw device nodes.

https://launchpad.net/bugs/420015

15 years agoudev-rules.c: parse_file() - fix possible buffer overflow
Florian Zumbiehl [Tue, 1 Sep 2009 11:26:37 +0000 (13:26 +0200)]
udev-rules.c: parse_file() - fix possible buffer overflow

15 years agoudev-rules.c: remove 'first_token' variable
Kay Sievers [Tue, 1 Sep 2009 11:16:48 +0000 (13:16 +0200)]
udev-rules.c: remove 'first_token' variable

15 years agoudev_util_encode_string(): fix possible buffer overflow
Florian Zumbiehl [Tue, 1 Sep 2009 10:54:21 +0000 (12:54 +0200)]
udev_util_encode_string(): fix possible buffer overflow

15 years agolibudev-util.c: get_sys_link() - return error for empty link target
Kay Sievers [Tue, 1 Sep 2009 10:39:57 +0000 (12:39 +0200)]
libudev-util.c: get_sys_link() - return error for empty link target

15 years agoutil_resolve_sys_link(): fix possible buffer overflow
Florian Zumbiehl [Tue, 1 Sep 2009 10:38:16 +0000 (12:38 +0200)]
util_resolve_sys_link(): fix possible buffer overflow

15 years agoude_rules.c: fix possible NULL pointer dereference in get_key()
Florian Zumbiehl [Tue, 1 Sep 2009 10:15:54 +0000 (12:15 +0200)]
ude_rules.c: fix possible NULL pointer dereference in get_key()

15 years agorules: sound - do not use /usr/bin/env
Marco d'Itri [Tue, 1 Sep 2009 10:04:26 +0000 (12:04 +0200)]
rules: sound - do not use /usr/bin/env

The C version of path_id does not look at the environment anymore, so
there is no reason to empty it.

15 years agopci-db: make sure we actually read the pci.ids file instead of usb.ids
Lennart Poettering [Tue, 1 Sep 2009 02:47:16 +0000 (04:47 +0200)]
pci-db: make sure we actually read the pci.ids file instead of usb.ids

Since the recent Makefile.am rework both usb-db and pci-db were built to
read the usb.ids database file. This fix makes sure pci-db properly
reads pci.ids instead.

Originally pointed out by Marco d'Itri.

15 years agorules: suse - use NAME for mapper/control
Kay Sievers [Mon, 31 Aug 2009 14:05:52 +0000 (16:05 +0200)]
rules: suse - use NAME for mapper/control

15 years agoupdate README
Kay Sievers [Mon, 31 Aug 2009 08:19:40 +0000 (10:19 +0200)]
update README

15 years agouse nanosleep() instead of usleep()
Daniel Mierswa [Sun, 30 Aug 2009 21:58:57 +0000 (23:58 +0200)]
use nanosleep() instead of usleep()

POSIX.1-2001 declares usleep() function obsolete and POSIX.1-2008
removes it.

[Kay Sievers]
  - include time.h
  - use const for timespec
  - scsi_id: drop rand() in retry loop
  - modem-probe: rename msuspend() to msleep()

15 years agoupdate TODO
Kay Sievers [Sun, 30 Aug 2009 20:45:49 +0000 (22:45 +0200)]
update TODO

15 years agoutil_create_path(): fix possible out of bounds array access
Florian Zumbiehl [Sun, 30 Aug 2009 19:40:13 +0000 (21:40 +0200)]
util_create_path(): fix possible out of bounds array access

15 years agoinotify_add_watch(): do not store watch, if it failed
Kay Sievers [Sun, 30 Aug 2009 18:42:06 +0000 (20:42 +0200)]
inotify_add_watch(): do not store watch, if it failed

On Sun, Aug 30, 2009 at 04:36, Marco d'Itri<md@linux.it> wrote:
> inotify_add_watch may fail in udev_watch_begin, and then a link with
> name -1 is created.
> I do not know why, but it happened once on my system:
>
> lrwxrwxrwx 1 root root 27 Aug  4 11:27 -1 -> /devices/virtual/block/ram8

15 years agoutil_delete_path(): handle multiple leading slashes
Florian Zumbiehl [Sat, 29 Aug 2009 14:50:43 +0000 (16:50 +0200)]
util_delete_path(): handle multiple leading slashes

15 years agoutil_create_path(): fix errno usage
Kay Sievers [Sat, 29 Aug 2009 14:38:01 +0000 (16:38 +0200)]
util_create_path(): fix errno usage

Based on a patch from: Florian Zumbiehl <florz@florz.de>

15 years agoutil_lookup_group(): fix memory leak if realloc() fails
Florian Zumbiehl [Sat, 29 Aug 2009 14:25:47 +0000 (16:25 +0200)]
util_lookup_group(): fix memory leak if realloc() fails

15 years agoutil_delete_path(): use util_strscpy()
Florian Zumbiehl [Sat, 29 Aug 2009 14:17:54 +0000 (16:17 +0200)]
util_delete_path(): use util_strscpy()

15 years agoutil_unlink_secure(): chmod() before chown()
Kay Sievers [Sat, 29 Aug 2009 14:10:24 +0000 (16:10 +0200)]
util_unlink_secure(): chmod() before chown()

Suggested by Florian Zumbiehl <florz@florz.de>.

15 years agodoc: udevadm test *does* create nodes and links these days
Kay Sievers [Thu, 27 Aug 2009 01:56:32 +0000 (03:56 +0200)]
doc: udevadm test *does* create nodes and links these days

15 years agodoc: writing_udev_rules updated for the new command names
Marco d'Itri [Thu, 27 Aug 2009 01:55:44 +0000 (03:55 +0200)]
doc: writing_udev_rules updated for the new command names

15 years agoRevert "extras/keymap: Fix case matching for Micro-Star"
Martin Pitt [Wed, 26 Aug 2009 20:39:32 +0000 (22:39 +0200)]
Revert "extras/keymap: Fix case matching for Micro-Star"

This reverts commit 66bf63c05cdc4e9b09818aa5fab0b9d319a1c91c.

Further debugging in https://launchpad.net/bugs/178860 showed that for some
weird reason the correct key codes already come out of the "Video Bus" input
device, and the previous commit would cause them to appear a second time
through the standard keyboard device.

This is a kernel bug in the end, but let's not break working things
prematurely.

15 years agoextras/keymap: Fix case matching for Micro-Star
Martin Pitt [Wed, 26 Aug 2009 17:09:06 +0000 (19:09 +0200)]
extras/keymap: Fix case matching for Micro-Star

Some Micro-Star boards apparently have mixed case vendor, instead of all-caps.
Update the glob to catch all such cases.

https://launchpad.net/bugs/178860

15 years agoassign errno for getgrnam_r()/getpwnam_r()
Kay Sievers [Tue, 25 Aug 2009 19:06:35 +0000 (21:06 +0200)]
assign errno for getgrnam_r()/getpwnam_r()

On Mon, Aug 24, 2009 at 19:50, Lennart Poettering<lennart@poettering.net> wrote:
> One little comment here: on POSIX getrnam_r() doesn't touch
> errno. Instead it returns the error value as return value.

15 years agoextras/keymap: Fix hold key on Acer Aspire 6920
Martin Pitt [Mon, 24 Aug 2009 15:59:42 +0000 (17:59 +0200)]
extras/keymap: Fix hold key on Acer Aspire 6920

The Hold key locks the panel and is hardwired. It doesn't have a sensible
keycode to map to, and shouldn't be overloaded either.

15 years agoextras/modem-modeswitch: eject ZTE MF6xx fake CD-ROMs
Martin Pitt [Mon, 24 Aug 2009 10:02:07 +0000 (12:02 +0200)]
extras/modem-modeswitch: eject ZTE MF6xx fake CD-ROMs

modem-modeswitch does not fully work on ZTE MF6xx modems, their fake CD-ROMs
need to be properly ejected in order for the actual modem to appear. Add udev
rule for this device (19d2:2000 in CD-ROM mode).

https://launchpad.net/bugs/281335

15 years agoextras/keymap: Add Acer Aspire 6920
Martin Pitt [Mon, 24 Aug 2009 06:36:30 +0000 (08:36 +0200)]
extras/keymap: Add Acer Aspire 6920

https://launchpad.net/bugs/407940

15 years agohid2hci: remove superfluous bmAttributes match
Mario Limonciello [Thu, 20 Aug 2009 17:43:51 +0000 (19:43 +0200)]
hid2hci: remove superfluous bmAttributes match

For the retrigger of the device on remove we were trying to match bmAttributes
of self powered which is unnecessary.

15 years agochange database file names
Kay Sievers [Wed, 19 Aug 2009 18:49:49 +0000 (20:49 +0200)]
change database file names

With very deeply nested devices, We can not use a single file
name to carry an entire DEVPATH. Use <subsystem>:<sysname> as
the database filename, which should also simplify the handling
of devices moving around, as these values will not change but
still be unique.

For the name stack we use the <maj>:<min> now as the filename.

> On Tue, Aug 18, 2009 at 09:59:56AM -0400, Ric Wheeler wrote:
> The first is that udev grumbles during boot about "file name too long"
> like the following:
>
> Aug 17 06:49:58 megadeth udevd-event[20447]: unable to create db file
> '/dev/.udev/db/\x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2f0000:17:00.0\x2f0000:18:0a.0\x2f0000:1f:00.0\x2fhost11\x2fport-11:0\x2fexpander-11:0\x2fport-11:0:0\x2fexpander-11:1\x2fport-11:1:0\x2fexpander-11:2\x2fport-11:2:17\x2fexpander-11:3\x2fport-11:3:1\x2fend_device-11:3:1\x2fbsg\x2fend_device-11:3:1':
> File name too long

15 years agowarn about non-readable or empty rules file
Kay Sievers [Wed, 19 Aug 2009 05:34:07 +0000 (07:34 +0200)]
warn about non-readable or empty rules file