Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1230094

Bug#1094078: polkitd: Error opening directory /run/polkit-1/rules.d and /usr/local/share/polkit-1/rules.d

From Simon McVittie <smcv@debian.org>
Newsgroups linux.debian.bugs.dist
Subject Bug#1094078: polkitd: Error opening directory /run/polkit-1/rules.d and /usr/local/share/polkit-1/rules.d
Date 2025-01-24 23:30 +0100
Message-ID <K8Alz-bBpw-3@gated-at.bofh.it> (permalink)
References <K8yDi-bAgG-135@gated-at.bofh.it> <K8yDi-bAgG-135@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 24 Jan 2025 at 20:17:02 +0000, Andrew Sayers wrote:
> Observed:
> Error opening rules directory: Error opening directory
> ā€œ/usr/local/share/polkit-1/rules.dā€: No such file or directory (g-file-error-
> quark, 4)
> Error opening rules directory: Error opening directory ā€œ/run/polkit-1/rules.dā€:
> No such file or directory (g-file-error-quark, 4)

I think polkitd should probably special-case G_FILE_ERROR_NOENT and silence
these messages: it seems legitimate for some of the rules directories
that are searched to not exist. I suspect this was an oversight while
implementing the longer search path.

> I have an upstream PR awaiting review to change these to priority 4 (warning):
> https://github.com/polkit-org/polkit/pull/536

I personally think that's the wrong direction. Any other error opening these
directories (for example permissions problems) should be a warning, yes,
but I don't think G_FILE_ERROR_NOENT should be.

> /run/polkit-1/rules.d is in a tmpfs, so can't be created at install-time.
> Adding this to the [Service] section of /usr/lib/systemd/system/polkit.service
> would solve the problem, and I would argue is the right solution:
> 
>     RuntimeDirectory=polkit-1
>     ExecStartPre=/bin/mkdir ${RUNTIME_DIRECTORY}/rules.d

A tmpfiles.d snippet would probably be better (certainly simpler). But
it might be better to not create it at all until it's needed, and just
silence the warning.

> /usr/local/share/polkit-1/rules.d is in /usr/local, so Debian should ignore it.
> #1010228 suggests that directory should still be supported in Debian,
> so should upstream create the directory somehow?

Maintainer scripts are allowed to create directories in /usr/local,
but it would perhaps be better to silence the warning instead.

    smcv

Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#1094078: polkitd: Error opening directory /run/polkit-1/rules.d and /usr/local/share/polkit-1/rules.d Andrew Sayers <2025-bugs.debian.org@pileofstuff.org> - 2025-01-24 21:40 +0100
  Bug#1094078: polkitd: Error opening directory /run/polkit-1/rules.d and /usr/local/share/polkit-1/rules.d Simon McVittie <smcv@debian.org> - 2025-01-24 23:30 +0100
    Bug#1094078: polkitd: Error opening directory /run/polkit-1/rules.d and /usr/local/share/polkit-1/rules.d Andrew Sayers <2025-bugs.debian.org@pileofstuff.org> - 2025-01-25 01:00 +0100
      Bug#1094078: polkitd: Error opening directory /run/polkit-1/rules.d and /usr/local/share/polkit-1/rules.d Andrew Sayers <2025-bugs.debian.org@pileofstuff.org> - 2025-02-06 13:40 +0100

csiph-web