udev - TODO update
Here a few questions about my favorite file in the tree :)
- better partition support (it's a hack right now, maybe new libsysfs changes can help out a lot here.)
It's done with Ananth's patches, right?
- option to always add all partitions. This is needed to properly handle devices with removable media.
Sounds soooo... ugly, but seems we should do it. Any idea which direction?
- allow database to be queried by other programs
Is udevinfo enough, or do we need something more?
- split program into two pieces (daemon and helper that sends events to it). This will allow us to keep track of sequences, and lots of other needed stuff.
It's done, I think :)
- keep track of current permissions on devices when daemon shuts down.
Hmm, what is this?
- better permission handling
What is missing here?
thanks,
Kay
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Kay Sievers
Here a few questions about my favorite file in the tree :)
- better partition support (it's a hack right now, maybe new libsysfs changes can help out a lot here.)
It's done with Ananth's patches, right?
I think so, yes.
Quoted 4 lines
- option to always add all partitions. This is needed to properly handle devices with removable media.
Sounds soooo... ugly, but seems we should do it. Any idea which direction?
I think a config option. If set, we ignore the partition devices, and just create every possible partition when we see the "main" block device. This is needed for removable media devices.
I agree it is ugly, but if anyone else can come up with an idea?
Quoted 3 lines
- allow database to be queried by other programs
Is udevinfo enough, or do we need something more?
I think udevinfo is enough for now. Anyone else feel a need for more?
Quoted 5 lines
- split program into two pieces (daemon and helper that sends events to it). This will allow us to keep track of sequences, and lots of other needed stuff.
It's done, I think :)
Heh, yes, thanks a lot.
Quoted 3 lines
- keep track of current permissions on devices when daemon shuts down.
Hmm, what is this?
When the /etc/init.d/udev script shuts down we need to save any permission changes that have been done to the device nodes. That way a user can do:
chmod 666 /dev/ttyUSB1
and we will pick this change up the next time we boot up.
Perhaps just a wrapper script:
udevinfo chmod 666 /dev/ttyUSB1
that could also catch the change and write it to the permissions file. But I don't think people will really go for that one.
It would be good to see how Gentoo handles this as I think they tar up everything right now on system shutdown. I'm trying to install it on a spare laptop and stuck in build hell right now, so it will probably be a few days...
Quoted 3 lines
- better permission handling
What is missing here?
I don't know for sure. Just a vague feeling that the way we currently handle permissions is pretty lousy. Anyone else feel this way too?
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · Greg KH
Quoted 6 lines · Kay Sievers
Here a few questions about my favorite file in the tree :)
- option to always add all partitions. This is needed to properly handle devices with removable media.
Quoted 7 lines
Quoted 1 line
Sounds soooo... ugly, but seems we should do it. Any idea which direction?
I think a config option. If set, we ignore the partition devices, and just create every possible partition when we see the "main" block device. This is needed for removable media devices.
I agree it is ugly, but if anyone else can come up with an idea?
I don't expect a better idea :)
I will try someting during the next few days.
Quoted 9 lines
Quoted 3 lines
- keep track of current permissions on devices when daemon shuts down.
Hmm, what is this?
When the
/etc/init.d/udevscript shuts down we need to save any permission changes that have been done to the device nodes. That way a user can do:chmod 666 /dev/ttyUSB1and we will pick this change up the next time we boot up.
Sounds a bit fragile and is it really needed?
We can't preserve the node permissions on simple device disconnect/connect cycle this way, but want to do it during reboot?
thanks,
Kay
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Hi,
Quoted 4 lines · Greg KH
It would be good to see how Gentoo handles this as I think they tar up everything right now on system shutdown. I'm trying to install it on a spare laptop and stuck in build hell right now, so it will probably be a few days...
Yes, the default behaviour creates a devices.tar.bz2 on shutdown and restores it on bootup. As far as I understand it, thats only a temporary thing, implemented before udev was creating so many nodes by default.
There is some discussion here to remove this behaviour,
http://bugs.gentoo.org/show_bug.cgi?id8587
There's also a forum thread kicking about, suggesting that people comment out the lines causing the creation/restoration of the devices.tar.bz2 file. Thats how I run and and its working great (as long as i modprobe nvidia before starting X..)
Daniel
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 10 lines · Kay Sievers
Quoted 9 lines · Greg KH
Quoted 7 lines · Kay Sievers
Here a few questions about my favorite file in the tree :)
- option to always add all partitions. This is needed to properly handle devices with removable media.
Sounds soooo... ugly, but seems we should do it. Any idea which direction?
Quoted 8 lines
Quoted 5 lines
I think a config option. If set, we ignore the partition devices, and just create every possible partition when we see the "main" block device. This is needed for removable media devices.
I agree it is ugly, but if anyone else can come up with an idea?
I don't expect a better idea :)
I will try someting during the next few days.
Oh my!
Implement a sane polling method for the devices who need it.
Signature · 14 lines
USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Daniel Drake
Yes, the default behaviour creates a devices.tar.bz2 on shutdown and restores it on bootup. As far as I understand it, thats only a temporary thing, implemented before udev was creating so many nodes by default.
There is some discussion here to remove this behaviour,
http://bugs.gentoo.org/show_bug.cgi?id=38587
i've stopped doing this on my boxes just to see how far along udev has come (and boy, it's almost there for everything i need it for :D) ...
i noticed that on my machines that use framebuffer devices, fbX wasnt being created, and on my ppc laptop, some adb related-nodes werent being created, so the way i've worked around it is to change the init scripts to run /etc/udev/udev.local instead of untaring the devices.tar.bz2 ... this script just creates a bunch of machine specific nodes via mknod and sets their perms correctly
i'm just glad udev is arch independent so i havent been forced back into devfs on some of my machine ;)
-mike
Quoted 7 lines · Greg KH
Quoted 3 lines · Kay Sievers
- allow database to be queried by other programs
Is udevinfo enough, or do we need something more?
I think udevinfo is enough for now. Anyone else feel a need for more?
The original intent for querying udev's db was:
1) API for applications to query what devices were currently configured on the system. This really shouldn't be done within udev, but could be done externally hooking into udev through callout or DBUS events.
2) API for querying a device's name and its node, or the other way around. This too could be done externally to udev. Or, it may not be needed at all.
Either way, I think udevinfo is good enough for now.
Thanks,
Dan
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&opÌk
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 11 lines · Kay Sievers
Quoted 9 lines
Quoted 3 lines
- keep track of current permissions on devices when daemon shuts down.
Hmm, what is this?
When the
/etc/init.d/udevscript shuts down we need to save any permission changes that have been done to the device nodes. That way a user can do:chmod 666 /dev/ttyUSB1and we will pick this change up the next time we boot up.
Sounds a bit fragile and is it really needed?
I don't really know, but some people thought it was a long time ago.
Quoted 2 lines
We can't preserve the node permissions on simple device disconnect/connect cycle this way, but want to do it during reboot?
Maybe we should do something on disconnect?
Anyone really want this?
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 11 lines · Mike Frysinger
Quoted 6 lines · Daniel Drake
Yes, the default behaviour creates a devices.tar.bz2 on shutdown and restores it on bootup. As far as I understand it, thats only a temporary thing, implemented before udev was creating so many nodes by default.
There is some discussion here to remove this behaviour,
http://bugs.gentoo.org/show_bug.cgi?id8587i've stopped doing this on my boxes just to see how far along udev has come (and boy, it's almost there for everything i need it for :D) ...
Quoted 6 lines
i noticed that on my machines that use framebuffer devices, fbX wasnt being created, and on my ppc laptop, some adb related-nodes werent being created, so the way i've worked around it is to change the init scripts to run
/etc/udev/udev.localinstead of untaring the devices.tar.bz2 ... this script just creates a bunch of machine specific nodes via mknod and sets their perms correctly
Where is the startup script in gentoo that does this? I couldn't seem to find it.
But I was able to blow away my whole /dev directory and reboot and have udev create all of the nodes that I needed to startup. That was impressive. Hm, Gentoo seems kinda nice now... :)
Quoted 2 lines
i'm just glad udev is arch independent so i havent been forced back into devfs on some of my machine ;)
If udev ever gets any non-arch-independant code, please let me know, I do not want this to happen.
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Greg KH
Where is the startup script in gentoo that does this? I couldn't seem to find it.
/sbin/rc
search for 'udev-state' and you should find it ...
Quoted 3 lines
But I was able to blow away my whole /dev directory and reboot and have udev create all of the nodes that I needed to startup. That was impressive. Hm, Gentoo seems kinda nice now... :)
one of the very reasons i'll probably never leave Gentoo ... no other distrubition lets you use the _very latest_ tools so easily :)
Quoted 2 lines
If udev ever gets any non-arch-independant code, please let me know, I do not want this to happen.
i'll keep that in mind ... for now i'll just keep bugging you with gcc-2.x patches ;)
-mike
Quoted 9 lines · Greg KH
Quoted 5 lines · Kay Sievers
Here a few questions about my favorite file in the tree :)
- better permission handlingWhat is missing here?
I don't know for sure. Just a vague feeling that the way we currently handle permissions is pretty lousy. Anyone else feel this way too?
Seems that nobody cares and perhaps the recent klibc permission changes and the multiple file config directory are enough to kill these lines? :)
thanks,
Kay
===== TODO 1.16 vs edited =====
TODO +0 -2
@@ -10,8 +10,6 @@ - install the proper init.d script based on the distro we are running on. - persuade the distro packagers to submit their changes (or just steal them if we can find them...) -- keep track of current permissions on devices when daemon shuts down. -- better permission handling - create kernel name to devfs name config file so that all of the devfs users will have an upgrade path. - do early boot logic (putting udev into initramfs, handle pivot-root,
Quoted 2 lines · Kay Sievers
Seems that nobody cares and perhaps the recent klibc permission changes and the multiple file config directory are enough to kill these lines? :)
One thing I would like is the ability to put an identifier in the config file, say $local, and have the device node's permission set to that of the current local user.
Robert Love
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Robert Love
Quoted 2 lines · Kay Sievers
Seems that nobody cares and perhaps the recent klibc permission changes and the multiple file config directory are enough to kill these lines? :)
One thing I would like is the ability to put an identifier in the config file, say $local, and have the device node's permission set to that of the current local user.
And how does a program determine the "current local user"?
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 11 lines · Greg KH
Quoted 8 lines · Robert Love
Quoted 3 lines · Kay Sievers
Seems that nobody cares and perhaps the recent klibc permission changes and the multiple file config directory are enough to kill these lines? :)
One thing I would like is the ability to put an identifier in the config file, say $local, and have the device node's permission set to that of the current local user.
And how does a program determine the "current local user"?
seems more like the domain of pam or similar authentication services ... once a 'local' user has logged in, the permissions are setup accordingly -mike
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Greg KH wrote:
| On Thu, Feb 26, 2004 at 07:49:22PM -0500, Robert Love wrote: | |>On Thu, 2004-02-26 at 19:41, Kay Sievers wrote: |> |> |>>Seems that nobody cares and perhaps the recent klibc permission changes |>>and the multiple file config directory are enough to kill these lines? :) |> |>One thing I would like is the ability to put an identifier in the config |>file, say $local, and have the device node's permission set to that of |>the current local user. | | | And how does a program determine the "current local user"? |
How about:
w | awk '$2=":0" {print $1}'
? Maybe even better would be $TTY{:0} ?
- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice
mailto: [email protected]
http://www.sun.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: The opinions expressed in this email are held by me, and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAPpwgdQs4kOxk3/MRArHBAJ9IpVu1wmaVSFieJS3Q2UHo887SzgCfTTR4 Z2F92AW28iqxpqA3fkfKs98=qJ90
-----END PGP SIGNATURE-----
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line · Greg KH
And how does a program determine the "current local user"?
utmp.
Robert Love
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · Robert Love
Quoted 1 line · Greg KH
And how does a program determine the "current local user"?
utmp.
Here is an example. Just stick this code where we do the chmod(), and invoke it if the user is $local or whatever.
The purpose being we want certain devices to be owned by the local user. Obviously we also need to do some stuff on login/logout, but consolehelper will do that for us.
Robert Love
/*
* detect the local user
*
* [email protected]
*/
#include <stdio.h>
#include <string.h>
#include <utmp.h>
int main()
{
struct utmp *u;
char user[UT_NAMESIZE] = "root";
time_t recent = 0;
setutent();
while ((u = getutent())) {
/* is this a user login ? */
if (u->ut_type != USER_PROCESS)
continue;
/* XXX: should probably check if the pid is stale */
/* is this a local login ? */
if (strcmp(u->ut_host, ""))
continue;
if (u->ut_time > recent) {
recent = u->ut_time;
strcpy(user, u->ut_user);
}
}
endutent();
printf("%s\n", user);
return 0;
}Quoted 6 lines · Robert Love
Here is an example. Just stick this code where we do the
chmod(), and invoke it if the user is $local or whatever.The purpose being we want certain devices to be owned by the local user. Obviously we also need to do some stuff on login/logout, but consolehelper will do that for us.
Although, if you're using pam_console, you can certainly key off the same keys it's using, yes?
Bill
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Robert Love
One thing I would like is the ability to put an identifier in the config file, say $local, and have the device node's permission set to that of the current local user.
In devfsd.conf you were able to put a '-1' in for the for the current local user when setting PERMISSIONS, and it worked great [1]. I wonder what people used this for though.
[1] I originally used it to make $local.wheel own pts/*, so that the wheel group could steal away other people's screens from their xterms (I should have just added the trusted users to the tty group though, I guess).
Signature · 13 lines
Robert McMeekin <[email protected]> ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 9 lines · Robert McMeekin
Quoted 3 lines · Robert Love
One thing I would like is the ability to put an identifier in the config file, say $local, and have the device node's permission set to that of the current local user.
In devfsd.conf you were able to put a '-1' in for the for the current local user when setting PERMISSIONS, and it worked great [1]. I wonder what people used this for though.
Are you really sure?
A -1 as the uid or gid means, that it shouldn't changed when chmod() is called. I don't think, that it means anything like a local user.
Kay
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 17 lines · Mike Waychison
Greg KH wrote:
| On Thu, Feb 26, 2004 at 07:49:22PM -0500, Robert Love wrote: | |>On Thu, 2004-02-26 at 19:41, Kay Sievers wrote: |> |> |>>Seems that nobody cares and perhaps the recent klibc permission changes |>>and the multiple file config directory are enough to kill these lines? :) |> |>One thing I would like is the ability to put an identifier in the config |>file, say $local, and have the device node's permission set to that of |>the current local user. | | | And how does a program determine the "current local user"? |
Quoted 3 lines
How about:
w | awk '$2=":0" {print $1}'
Sure doesn't work for me on any of my boxes.
And remember, udev doesn't want to have to call w and awk :)
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 9 lines · Robert Love
Quoted 5 lines · Robert Love
Quoted 1 line · Greg KH
And how does a program determine the "current local user"?
utmp.
Here is an example. Just stick this code where we do the
chmod(), and invoke it if the user is $local or whatever.
Oh come on. You are so close to actually writing a patch that we can use for udev that it's not even funny :)
Care to?
Quoted 3 lines
The purpose being we want certain devices to be owned by the local user. Obviously we also need to do some stuff on login/logout, but consolehelper will do that for us.
Oh I agree it's something that distros will want to use. And how does pam come into play here? Doesn't it allow us to do some of this for us?
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Greg KH wrote:
| On Thu, Feb 26, 2004 at 08:23:44PM -0500, Mike Waychison wrote:
|
|>Greg KH wrote:
|>| On Thu, Feb 26, 2004 at 07:49:22PM -0500, Robert Love wrote:
|>|
|>|>On Thu, 2004-02-26 at 19:41, Kay Sievers wrote:
|>|>
|>|>
|>|>>Seems that nobody cares and perhaps the recent klibc permission changes
|>|>>and the multiple file config directory are enough to kill these
lines? :)
|>|>
|>|>One thing I would like is the ability to put an identifier in the config
|>|>file, say $local, and have the device node's permission set to that of
|>|>the current local user.
|>|
|>|
|>| And how does a program determine the "current local user"?
|>|
|>
|>How about:
|>
|>w | awk '$2=":0" {print $1}'
|
|
| Sure doesn't work for me on any of my boxes.
|Hmm, maybe we have different procps versions (2.0.13 here). Either way, this is a variation on the utmp approach.
| And remember, udev doesn't want to have to call w and awk :)
Understood, this could be done some other way just as easily as Robert Love demonstrated :)
I thought the /usr/* thing was solely an early initscript limitation. I guess it's also a limitation on embedded platforms (who wouldn't use $local anyway).
- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice
mailto: [email protected]
http://www.sun.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: The opinions expressed in this email are held by me, and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAP4eYdQs4kOxk3/MRAtjgAJ9vek2K4QTAacgfkKzL8KG5aiIavACfTRIU mx2MEyoeNkEDtjdic3kFBd0=Gj6V
-----END PGP SIGNATURE-----
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Greg KH
Quoted 3 lines
The purpose being we want certain devices to be owned by the local user. Obviously we also need to do some stuff on login/logout, but consolehelper will do that for us.
Oh I agree it's something that distros will want to use. And how does pam come into play here? Doesn't it allow us to do some of this for us?
The pam_console module RH ships does this, based on a config file that has device names in it. Obviously, the fact that the config file lists device names could run afoul of udev.
As for logout, udev removing the device node does avoid the chmod problem. Of course, we need revoke() to really do it right... :)
Bill
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 4 lines · Greg KH
Oh come on. You are so close to actually writing a patch that we can use for udev that it's not even funny :)
Care to?
Yah, when I find the time. ;-)
I started doing it (and wrote the previous snippet of code) around the time of the "great daemonization" so I ended up holding off. I recall I was also worried that, depending on when the permissions were parsed once we moved to a daemon, they could be a race.
Quoted 2 lines
Oh I agree it's something that distros will want to use. And how does pam come into play here? Doesn't it allow us to do some of this for us?
Pam's consolehelper stuff, which RH uses, can set the permissions on login. That works for preexisting devices - using a $local type thing will work for newly hotplugged devices.
And hotplugged devices are an important use case: my camera should only be readable by me, for example.
Robert Love
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Bill Nottingham
The
pam_consolemodule RH ships does this, based on a config file that has device names in it. Obviously, the fact that the config file lists device names could run afoul of udev.
Yah, we need some solution here to deal with udev's dynamic names vs. the static names pam_console expects.
Robert Love
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Greg KH
AppliedQuoted 6 lines · Kay Sievers
Quoted 5 lines · Greg KH
Quoted 4 lines · Kay Sievers
Here a few questions about my favorite file in the tree :)
- better permission handling
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
What is missing here?
I don't know for sure. Just a vague feeling that the way we currently handle permissions is pretty lousy. Anyone else feel this way too?
Seems that nobody cares and perhaps the recent klibc permission changes and the multiple file config directory are enough to kill these lines? :)
Applied, thanks.
I added something about local user permissions to this file instead.
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Robert Love
Quoted 3 lines · Bill Nottingham
The
pam_consolemodule RH ships does this, based on a config file that has device names in it. Obviously, the fact that the config file lists device names could run afoul of udev.Yah, we need some solution here to deal with udev's dynamic names vs. the static names
pam_consoleexpects.
Would it be sufficient to invoke /sbin/pam_console_apply from hotplug?
Regards,
Erik
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line · Erik van Konijnenburg
Would it be sufficient to invoke
/sbin/pam_console_applyfrom hotplug?
Probably overkill, but, actually, yes. I had not thought of that.
We would still need a way to teach pam_console about udev device nodes, which I actually see no easy way of doing.
Robert Love
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Robert Love
Quoted 4 lines · Greg KH
Oh come on. You are so close to actually writing a patch that we can use for udev that it's not even funny :)
Care to?
Yah, when I find the time. ;-)
I did it :)
Please have a look. If this is what you want, I will solve the klibc beast. We don't need the same for the group ownership, or do we?
Quoted 4 lines
I started doing it (and wrote the previous snippet of code) around the time of the "great daemonization" so I ended up holding off. I recall I was also worried that, depending on when the permissions were parsed once we moved to a daemon, they could be a race.
Oh, I don't think that we still want the to implement daemon. udevd simply calls our normal udev now and this seems to work well.
Or do I miss something? Greg?
thanks,
Kay
===== udev-add.c 1.53 vs edited =====
udev-add.c +37 -0
@@ -32,6 +32,7 @@#include <grp.h> #ifndef __KLIBC__#include <pwd.h> +#include <utmp.h> #endif #include "libsysfs/sysfs/libsysfs.h"
@@ -44,6 +45,8 @@#include "udevdb.h" #include "klibc_fixups.h" +#define LOCAL_USER "$local" +/* * Right now the major/minor of a device is stored in a file called * "dev" in sysfs.
@@ -132,6 +135,37 @@return 0 ; } +/* get the local logged in user */ +static void set_to_local_user (char *user) +{ +struct utmp *u; +time_t recent =0 ; + +strnfieldcpy (user, default_owner_str,OWNER_SIZE ); +setutent (); +while (1 ) { + u =getutent (); +if (u ==NULL ) +break ; + +/* is this a user login ? */ +if (u->ut_type !=USER_PROCESS ) +continue ; + +/* is this a local login ? */ +if (strcmp (u->ut_host,"" )) +continue ; + +if (u->ut_time > recent) { + recent = u->ut_time; +strfieldcpy (user, u->ut_user); +dbg ("set to local user '%s'" , user); +break ; + } + } +endutent (); +} +static int create_node (struct udevice *dev,int fake) {struct stat stats;
@@ -175,6 +209,9 @@if (endptr[0 ] =='\0' ) uid = (uid_t ) id;else { +if (strncmp (dev->owner,LOCAL_USER ,sizeof (LOCAL_USER )) ==0 ) +set_to_local_user (dev->owner); +struct passwd *pw =getpwnam (dev->owner);if (pw ==NULL )dbg ("specified user unknown '%s'" , dev->owner);
Quoted 3 lines · Kay Sievers
I did it :)
Please have a look. If this is what you want, I will solve the klibc beast.
You are incredible, Kay. This is exactly what I was planning.
Adding utmp parsing to klibc cannot be fun, though.. ;)
Quoted 1 line
We don't need the same for the group ownership, or do we?
Probably not, although I guess I could see wanting to make the node also owned by the user's primary group. That would be ultra trivial - it is just the fourth field in the user's line in passwd.
Quoted 3 lines
Oh, I don't think that we still want the to implement daemon. udevd simply calls our normal udev now and this seems to work well.
Or do I miss something? Greg?
No, the current implementation of the daemon does not have any issues. I was just worried at the time. As long as we parse the permissions file on each node creation, we are fine.
Robert Love
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · Robert Love
Quoted 3 lines · Kay Sievers
I did it :)
Please have a look. If this is what you want, I will solve the klibc beast.You are incredible, Kay. This is exactly what I was planning.
And this is exactly what I want to hear :)
Quoted 1 line
Adding utmp parsing to klibc cannot be fun, though.. ;)
Oh, it's only list of a static record in a file. So here is the first try.
thanks,
Kay
===== klibc_fixups.c 1.5 vs edited =====
klibc_fixups.c +37 -0
@@ -25,6 +25,7 @@#include <stdio.h> #include <string.h> #include <ctype.h> +#include <fcntl.h> #include <sys/types.h> #include "klibc_fixups.h"
@@ -32,6 +33,8 @@#define PW_FILE "/etc/passwd"#define GR_FILE "/etc/group" +#define UTMP_FILE "/var/run/utmp" +/* return the id of a passwd style line, selected by the users name */ static unsigned long get_id_by_name (const char *uname,const char *dbfile)
@@ -105,6 +108,40 @@return NULL ; else return &gr; +} + + +int ufd =-1 ; + +void setutent () +{ +if (ufd <0 ) + ufd =open (UTMP_FILE ,O_RDONLY ); +fcntl (ufd,F_SETFD ,FD_CLOEXEC ); +lseek (ufd,0 ,SEEK_SET ); +} + +void endutent () { +if (ufd <0 ) +return ; +close (ufd); + ufd =-1 ; +} + +struct utmp *getutent (void ) +{ +static struct utmp utmp; +int retval; + +if (ufd <0 ) { +setutent (); +if (ufd <0 ) +return NULL ; + } + retval =read (ufd, &utmp,sizeof (struct utmp )); +if (retval <1 ) +return NULL ; +return &utmp; }#endif
===== klibc_fixups.h 1.5 vs edited =====
klibc_fixups.h +45 -2
58 lines not on this page · raw message
===== udev-add.c 1.53 vs edited =====
udev-add.c +37 -0
@@ -32,6 +32,7 @@#include <grp.h> #ifndef __KLIBC__#include <pwd.h> +#include <utmp.h> #endif #include "libsysfs/sysfs/libsysfs.h"
@@ -44,6 +45,8 @@#include "udevdb.h" #include "klibc_fixups.h" +#define LOCAL_USER "$local" +/* * Right now the major/minor of a device is stored in a file called * "dev" in sysfs.
@@ -132,6 +135,37 @@return 0 ; } +/* get the local logged in user */ +static void set_to_local_user (char *user) +{ +struct utmp *u; +time_t recent =0 ; + +strnfieldcpy (user, default_owner_str,OWNER_SIZE ); +setutent (); +while (1 ) { + u =getutent (); +if (u ==NULL ) +break ; + +/* is this a user login ? */ +if (u->ut_type !=USER_PROCESS ) +continue ; + +/* is this a local login ? */ +if (strcmp (u->ut_host,"" )) +continue ; + +if (u->ut_time > recent) { + recent = u->ut_time; +strfieldcpy (user, u->ut_user); +dbg ("local user is '%s'" , user); +break ; + } + } +endutent (); +} +static int create_node (struct udevice *dev,int fake) {struct stat stats;
@@ -175,6 +209,9 @@if (endptr[0 ] =='\0' ) uid = (uid_t ) id;else { +if (strncmp (dev->owner,LOCAL_USER ,sizeof (LOCAL_USER )) ==0 ) +set_to_local_user (dev->owner); +struct passwd *pw =getpwnam (dev->owner);if (pw ==NULL )dbg ("specified user unknown '%s'" , dev->owner);
Quoted 7 lines · Kay Sievers
Quoted 6 lines · Robert Love
Quoted 3 lines · Kay Sievers
I did it :)
Please have a look. If this is what you want, I will solve the klibc beast.
Quoted 7 lines
Quoted 1 line
You are incredible, Kay. This is exactly what I was planning.
And this is exactly what I want to hear :)
Quoted 1 line
Adding utmp parsing to klibc cannot be fun, though.. ;)
Oh, it's only list of a static record in a file. So here is the first try.
Sweet, this looks nice. I've applied this, care to update the documentation too?
Hm, that should be Robert's job actually, he should do something for real... :)
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Greg KH
Hm, that should be Robert's job actually, he should do something for real... :)
Hey, I wrote the nifty local user detection snippet - but, I owe Kay, so here is an updated man page.
Robert Love
udev.8 | 11 +++++++++++ 1 files changed, 11 insertions(+)
udev.8 +11 -0
@@ -288,6 +288,17 @@ dsp1:::0666 .fi .P +The value +.I $local +can be substituted for a specific username. In that case, udev will determine +the current local user at the time of device node creation and substitute +that username as the owner of the new device node. This is useful, for +example, to let hot-plugged devices, such as cameras, be owned by the user at +the current console. Note that if no user is currently logged in, or if udev +otherwise fails to determine a current user, the +.I default_owner +value is used in lieu. +.P A number of different fields in the above configuration files support a simple form of shell style pattern matching. It supports the following pattern characters: .TP
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · Robert Love
Quoted 2 lines · Greg KH
Hm, that should be Robert's job actually, he should do something for real... :)
Hey, I wrote the nifty local user detection snippet - but, I owe Kay, so here is an updated man page.
Heh, thanks. I've applied this.
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 14 lines · Greg KH
Quoted 13 lines · Kay Sievers
Quoted 7 lines · Robert Love
Quoted 3 lines · Kay Sievers
I did it :)
Please have a look. If this is what you want, I will solve the klibc beast.You are incredible, Kay. This is exactly what I was planning.
And this is exactly what I want to hear :)
Quoted 1 line
Adding utmp parsing to klibc cannot be fun, though.. ;)
Quoted 7 lines
Quoted 1 line
Oh, it's only list of a static record in a file. So here is the first try.
Sweet, this looks nice. I've applied this, care to update the documentation too?
Hm, that should be Robert's job actually, he should do something for real... :)
I promise, that I will not take every item you put in the TODO list :)
Kay
===== TODO 1.18 vs edited =====
TODO +0 -1
@@ -7,7 +7,6 @@ - more documentation (can never have too much.) -- create way to set permission to the local user. - install the proper init.d script based on the distro we are running on. - persuade the distro packagers to submit their changes (or just steal them if we can find them...)
Greg KH
AppliedQuoted 17 lines · Kay Sievers
Quoted 16 lines · Greg KH
Quoted 14 lines · Kay Sievers
Quoted 7 lines · Robert Love
Quoted 3 lines · Kay Sievers
I did it :)
Please have a look. If this is what you want, I will solve the klibc beast.You are incredible, Kay. This is exactly what I was planning.
And this is exactly what I want to hear :)
Quoted 1 line
Adding utmp parsing to klibc cannot be fun, though.. ;)
Oh, it's only list of a static record in a file. So here is the first try.
Quoted 7 lines
Quoted 5 lines
Sweet, this looks nice. I've applied this, care to update the documentation too?
Hm, that should be Robert's job actually, he should do something for real... :)
I promise, that I will not take every item you put in the TODO list :)
Heh, yeah, right...
applied.
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Friday at 14:19, Robert Love ponderously produced:
Quoted 10 lines · Greg KH
Quoted 2 lines
Oh I agree it's something that distros will want to use. And how does pam come into play here? Doesn't it allow us to do some of this for us?
Pam's consolehelper stuff, which RH uses, can set the permissions on login. That works for preexisting devices - using a $local type thing will work for newly hotplugged devices.
And hotplugged devices are an important use case: my camera should only be readable by me, for example.
So we can safely assume that whoever owns /dev/console is the actual user who plugged in the device?
Why not just copy the permissions from that file then? It will save having to parse through all of utmp...
For comparison, this is what I do in my silly hotplug script. It's sh, and tries to be robust. Of course, this is three lines of C, left as an exercise to the reader :)
------
CONSOLEUSER=stat -c%U /dev/console 2>/dev/null if [ -z "$CONSOLEUSER" ]
then
set ls -l /dev/console CONSOLEUSER=$3
fi
[ -n "$CONSOLEUSER" ] || CONSOLEUSER=root
------
Wout.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Sunday at 05:01, Kay Sievers ponderously produced:
Quoted 7 lines · Robert Love
Quoted 6 lines · Kay Sievers
Quoted 4 lines
I did it :)
Please have a look. If this is what you want, I will solve the klibc beast.
Quoted 7 lines
Quoted 1 line
You are incredible, Kay. This is exactly what I was planning.
And this is exactly what I want to hear :)
Quoted 1 line
Adding utmp parsing to klibc cannot be fun, though.. ;)
Oh, it's only list of a static record in a file. So here is the first try.
Uhm, actually, you should use getpwuid() on a real system. /etc/group is just some old file. /etc/nsswitch.conf tells you where to find the real information, which could be on LDAP or whatnot. getent() does this for you.
Of course, klibc probably doesn't have getpwuid(). So for early userspace your implementation may be correct.
But consider my previous post: Why not just copy the permissions from /dev/console?
Cheers,
Wout.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 22 lines · Wout Mertens
Sunday at 05:01, Kay Sievers ponderously produced:
Quoted 7 lines · Robert Love
Quoted 6 lines · Kay Sievers
Quoted 4 lines
I did it :)
Please have a look. If this is what you want, I will solve the klibc beast.Quoted 7 lines
Quoted 1 line
You are incredible, Kay. This is exactly what I was planning.
And this is exactly what I want to hear :)
Quoted 1 line
Adding utmp parsing to klibc cannot be fun, though.. ;)
Oh, it's only list of a static record in a file. So here is the first try.
Uhm, actually, you should use
getpwuid()on a real system./etc/groupis just some old file./etc/nsswitch.conftells you where to find the real information, which could be on LDAP or whatnot.getent()does this for you.
Quoted 5 lines
Of course, klibc probably doesn't have
getpwuid(). So for early userspace your implementation may be correct.But consider my previous post: Why not just copy the permissions from
/dev/console?
Because udev creates /dev/console :)
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
It was 12:15, Today, when Greg KH proclaimed:
Quoted 5 lines · Wout Mertens
Quoted 2 lines
But consider my previous post: Why not just copy the permissions from
/dev/console?Because udev creates
/dev/console:)
Sure, at a time that no user is logged in. So that gets root:root. But once a user logs in, pam_consolehelper will set all devices according to the local rules.
_After_ a user logs in, any devices that are created can be assigned to $local, and /dev/console will already be owned by that same user.
You don't need to walk through a potentially largish utmp for each device that gets created, and the superuser has more control over the situation.
And consider the case where there is no pam_consolehelper. In that case, any user that logs in will not have access to cdwriters, audio, dri devices, _unless_ they are already set to his/her userid.
That is a static setup, and can just as easily be covered by udev rules.
So in both setups, there doesn't seem to be a need for complicated things with utmp. (I'm simpleminded :) )
Of course, it's already written, but I think it's likely more errorprone. Just my 2 cents...
Wout.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel