Bug#357055: udev: creates fd0, but does not create fd0u* (eg fd0u1722)
In case we can persuade you, the attached patch will be needed - it protects create_floppy_devices against an incorrect array bound check and against possible buffer overflow resulting from the sysadmin specifying too long a pathname for /dev. This could be done better with perl as for write_cd_rules, if only Mknod.pm were a standard shipped module ... Nick --- create_floppy_devices.c.orig2006-05-29 10:18:16.0 +0100 +++ create_floppy_devices.c 2006-06-30 12:10:04.0 +0100 @@ -102,7 +102,7 @@ return 1; } - if (type < 0 || type > (int) sizeof(table)) { + if (type < 0 || type >= (int) (sizeof(table_sup) / sizeof(table_sup[0])) ) { fprintf(stderr,"Invalid CMOS type %d\n", type); return 1; } @@ -112,7 +112,11 @@ i = 0; while (table_sup[type][i]) { - sprintf(node, "%s%s",dev, table[table_sup[type][i]]); + if (snprintf(node, sizeof(node), "%s%s",dev, table[table_sup[type][i]]) >= sizeof(node)) { + fprintf(stderr,"Generated device name longer than %d\n", sizeof(node)); + return 1; + + }; minor = (table_sup[type][i] << 2) + fdnum; if (print_nodes) printf("%s b %d %d %d\n", node, mode, major, minor);
Bug#357055: udev: creates fd0, but does not create fd0u* (eg fd0u1722)
I know there may not be many of us using floppies any more, but I'm adding my name to the list for this bug. You probably won't get that many complaints until a recent udev hits stable. I've only just found the problem because I've only recently upgraded to udev 0.093. Floppies are not yet obsolete - they're often needed for flashing BIOS. And fdformat(1) from util-linux absolutely requires the special names, it has no other way to specify the density to which it should format the floppy. I'm quite happy for these little used devices not to be created by default. But for the sake of all those people upgrading from Sarge later this year, at least some of whom are going to have scripted floppy access, I don't think it would hurt to ship an optional config file to create them, with News.debian advising people what to do if they need them. Nick -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#357055: udev: creates fd0, but does not create fd0u* (eg fd0u1722)
On Mar 17, Jeffrey Sheinberg <[EMAIL PROTECTED]> wrote: > No such file in udev_0.087-2 source package, It's a DBS package, you need to unpack the source. > and if such a file did exist, I would expect it to be included as > a compiled, runnable binary in the udev *.deb. You are exactly the second person asking about the obsolete devices, I consider this a good enough proof that they are not useful. -- ciao, Marco signature.asc Description: Digital signature
Bug#357055: udev: creates fd0, but does not create fd0u* (eg fd0u1722)
Marco d'Itri writes: > On Mar 15, Jeffrey Sheinberg <[EMAIL PROTECTED]> wrote: > > > I have a single floppy drive, connected to the motherboard FDC. > > It works great with udev, I can acess it as 'dev/fd0', > > > > $ ls -l /dev/fd0* > > brw-rw 1 root adm 2, 0 Mar 15 09:16 /dev/fd0 > > > > The problem is that the devices for the alternate format types > > (/dev/fd0u*) are not being created. > They are obsolete, udev does not provide them. > If you really care, you can use the > extras/floppy/create_floppy_devices.c program from the source package. ^ Okay, I got it from the upstream/tarballs/udev-087.tar.bz file. Thanks, -- Jeffrey Sheinberg -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#357055: udev: creates fd0, but does not create fd0u* (eg fd0u1722)
Marco d'Itri writes: > On Mar 15, Jeffrey Sheinberg <[EMAIL PROTECTED]> wrote: > > > I have a single floppy drive, connected to the motherboard FDC. > > It works great with udev, I can acess it as 'dev/fd0', > > > > $ ls -l /dev/fd0* > > brw-rw 1 root adm 2, 0 Mar 15 09:16 /dev/fd0 > > > > The problem is that the devices for the alternate format types > > (/dev/fd0u*) are not being created. > They are obsolete, udev does not provide them. > If you really care, you can use the > extras/floppy/create_floppy_devices.c program from the source package. ^ No such file in udev_0.087-2 source package, $ find udev/extra/ | wc 25 25 613 $ find udev/extra/ | grep -i floppy --> exit status 1 $ find udev/extra/ | grep -i '.c$' --> exit status 1 $ find udev/ | grep -i '.c$' --> exit status 1 and if such a file did exist, I would expect it to be included as a compiled, runnable binary in the udev *.deb. Thanks, -- Jeffrey Sheinberg -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#357055: udev: creates fd0, but does not create fd0u* (eg fd0u1722)
On Mar 16, Jeffrey Sheinberg <[EMAIL PROTECTED]> wrote: > > If you really care, you can use the > > extras/floppy/create_floppy_devices.c program from the source package. > Yes, I really do care, but since they are obsolete, would you care > to please tell me how to access their functionality as intended by > the as released udev binary .deb? You don't. You need to manually compile and install that program. -- ciao, Marco signature.asc Description: Digital signature
Bug#357055: udev: creates fd0, but does not create fd0u* (eg fd0u1722)
Marco d'Itri writes: > On Mar 15, Jeffrey Sheinberg <[EMAIL PROTECTED]> wrote: > > > I have a single floppy drive, connected to the motherboard FDC. > > It works great with udev, I can acess it as 'dev/fd0', > > > > $ ls -l /dev/fd0* > > brw-rw 1 root adm 2, 0 Mar 15 09:16 /dev/fd0 > > > > The problem is that the devices for the alternate format types > > (/dev/fd0u*) are not being created. > They are obsolete, udev does not provide them. > If you really care, you can use the > extras/floppy/create_floppy_devices.c program from the source package. Hi Marco, Yes, I really do care, but since they are obsolete, would you care to please tell me how to access their functionality as intended by the as released udev binary .deb? Thanks, -- Jeffrey Sheinberg -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#357055: udev: creates fd0, but does not create fd0u* (eg fd0u1722)
Package: udev Version: 0.085-1 Severity: normal Hi, I have a single floppy drive, connected to the motherboard FDC. It works great with udev, I can acess it as 'dev/fd0', $ ls -l /dev/fd0* brw-rw 1 root adm 2, 0 Mar 15 09:16 /dev/fd0 The problem is that the devices for the alternate format types (/dev/fd0u*) are not being created. Thanks, -- Jeffrey Sheinberg -- Package-specific info: -- /etc/udev/rules.d/: /etc/udev/rules.d/: total 0 lrwxrwxrwx 1 root root 20 Feb 17 13:05 020_permissions.rules -> ../permissions.rules lrwxrwxrwx 1 root root 19 Feb 17 13:05 cd-aliases.rules -> ../cd-aliases.rules lrwxrwxrwx 1 root root 13 Feb 17 13:05 udev.rules -> ../udev.rules lrwxrwxrwx 1 root root 19 Feb 17 13:05 z20_persistent.rules -> ../persistent.rules lrwxrwxrwx 1 root root 12 Feb 17 13:05 z50_run.rules -> ../run.rules lrwxrwxrwx 1 root root 16 Feb 17 13:05 z55_hotplug.rules -> ../hotplug.rules lrwxrwxrwx 1 root root 15 Jan 21 16:35 z60_hdparm.rules -> ../hdparm.rules lrwxrwxrwx 1 root root 17 Feb 17 13:05 z70_hotplugd.rules -> ../hotplugd.rules -- /sys/: /sys/block/fd0/dev /sys/block/hda/dev /sys/block/hda/hda1/dev /sys/block/hda/hda2/dev /sys/block/hda/hda3/dev /sys/block/hda/hda4/dev /sys/block/hda/hda5/dev /sys/block/hda/hda6/dev /sys/block/hda/hda7/dev /sys/block/ram0/dev /sys/block/ram1/dev /sys/block/ram10/dev /sys/block/ram11/dev /sys/block/ram12/dev /sys/block/ram13/dev /sys/block/ram14/dev /sys/block/ram15/dev /sys/block/ram2/dev /sys/block/ram3/dev /sys/block/ram4/dev /sys/block/ram5/dev /sys/block/ram6/dev /sys/block/ram7/dev /sys/block/ram8/dev /sys/block/ram9/dev /sys/block/sda/dev /sys/block/sda/sda2/dev /sys/block/sdb/dev /sys/block/sdb/sdb1/dev /sys/block/sdb/sdb2/dev /sys/block/sdb/sdb3/dev /sys/block/sr0/dev /sys/class/input/input0/event0/dev /sys/class/input/input1/event1/dev /sys/class/input/input2/event2/dev /sys/class/input/input2/mouse0/dev /sys/class/input/mice/dev /sys/class/misc/agpgart/dev /sys/class/misc/hpet/dev /sys/class/misc/psaux/dev /sys/class/misc/rtc/dev /sys/class/ppp/ppp/dev /sys/class/usb_device/usbdev1.1/dev -- Kernel configuration: -- System Information: Debian Release: testing/etch APT prefers testing APT policy: (990, 'testing') Architecture: i386 (i586) Shell: /bin/sh linked to /bin/dash Kernel: Linux 2.6.15-1-486 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages udev depends on: ii initscripts 2.86.ds1-12 Scripts for initializing and shutt ii libc62.3.5-13GNU C Library: Shared libraries an ii libselinux1 1.28-4 SELinux shared libraries ii lsb-base 3.0-15 Linux Standard Base 3.0 init scrip ii makedev 2.3.1-80creates device files in /dev ii sed 4.1.4-5 The GNU sed stream editor udev recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]