[patch] Auth method for console users
Kay Sievers
kay.sievers at vrfy.org
Mon Sep 27 14:02:31 UTC 2004
On Mon, 2004-09-27 at 09:23 -0400, Colin Walters wrote:
> On Mon, 2004-09-27 at 14:38 +0200, David Zeuthen wrote:
> > Hi,
> >
> > How about exposing the _dbus_user_at_console in dbus-sysdeps.h as
> >
> > dbus_bus_is_at_console (DBusConnection *connection,
> > const char *service_name,
> > DBusError *error);
>
> I think the issue here is that not all platforms have the idea of a
> "console user". In fact I'm not sure anything besides basically
> pure Red Hat/Fedora clones have it. For example, to my knowledge SuSE
> doesn't, nor does Debian.
Seems right, I can't find /var/run/console/ on any other system. That
means _dbus_user_at_console() will always fail on other systems than RH.
What about renaming it to _dbus_user_local_user() and search the logins
with getutent(). If host = "", it should be a local user :)
Sure, it's not nice, but may work on much more systems.
We do a similar hack in udev, look for:
set_to_local_user(char *user) in
http://linuxusb.bkbits.net:8080/udev/anno/udev-add.c@1.73?nav=index.html|src/
Thanks,
Kay
More information about the dbus
mailing list