pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: DBUS home fouled up



Richard PALO <richard%netbsd.org@localhost> writes:

> Came to notice that there were some inconsistencies in dbus concerning
> the 'home' directory which was partially in ${VARBASE}/db/dbus but also
> in places ${VARBASE}/run/dbus.  Actually after reboot on SunOS it blew!
>
> So, first I set up the following:
> DBUS_HOME?=   ${VARBASE}/db/${DBUS_USER}
> allowing, if wished, to override with old ${VARBASE}/run/dbus behaviour
>
> I specifically avoid using ${VARBASE}/run which is a volatile directory
> (which happens to be tmpfs on SunOS). Too, it is tedious to use
> non-privileged daemons since ${VARBASE}/run is strictly reserved for root.
>
> Therefore the PIDFILE and SYSTEM_BUS_SOCKET are specifically set in the
> DBUS_HOME directory, and the rc/smf files updated accordingly.
> (I left the MKDIR/CHMOD bits in the rc just in case ${VARBASE}/run was
> specified overriding DBUS_HOME)
>
> here is the proposed patch for any coments prior to committing:
> http://www.netbsd.org/~richard/0001-clean-up-dbus-home-for-non-privileged-use-avoiding-v.patch

So the real questions are:

  1) Are the files being written system-level files (pertaining to the
  system-wide invocation of dbus)?  Presumably the dbus invocations of
  any user will be in the user's homedir.

  2) You chose db vs run.  So are (at least some of) these files intended
  to persist across reboots? If so, that's appropriate.   If not, they
  arguably belong in run.

  3) I don't understand how "unprivileged" is related to run.   /var/run
  and /var/db (on NetBSD)  are both root-owned and 755.  So using them
  for anything not root involves a subdirectory which is created by root
  and then set to the the non-root user.  This seems to apply to both
  run and db.   With db, it can be created at package install time.
  With run, it should be done by the rc.d script (or smf).

  4) Why do you think all dbus things necessarily belong in one of db or
  run?  It seems reasonable that a daemon might have files that are in
  each category.   dbus seems to have a persistent id, a socket, and a
  pidfile:

    /var/db/dbus:
    total 2
    -rw-r--r--  1 root  dbus  33 Oct  4  2008 machine-id

    /var/run/dbus:
    total 2
    -rw-r--r--  1 root  dbus  4 Aug 29 14:05 pid
    srwxrwxrwx  1 root  dbus  0 Aug 29 14:05 system_bus_socket

  So it seems that machine-id is in /var/db/dbus, and the pid and socket
  are in /var/run.   /etc/rc.d/dbus creates and chmods /var/run/dbus.

  So this does not look broken to me.


Can you explain more precisely what you think is wrong and why?

Attachment: pgpf1vpDr1Quv.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index