Subject: bug#348: libpam-ck-connector: pam_ck_connector logs cannot determine display-device when non-interactive

From: Arne Wichmann <[email-masked]>
Date: Thu, 29 Aug 2019 15:09:20 +0200

Package: libpam-ck-connector
Version: 1.2.1-4
Severity: normal

Good day to you.

When doing as root:
  echo 'su $USER ls'|at now
auth.log logs
  [...] su: pam_ck_connector(su:session): cannot determine display-device

I presume that is because there rightfully is none.

If this is not a more general bug, it should at least be possible to
silence the logging as it spams (at least my) log files.

Thank you for your effords!

AW

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux ascii
Release:	9
Codename:	n/a
Architecture: x86_64

Kernel: Linux 5.2.7 (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=en_GB.iso885915, LC_CTYPE=en_GB.iso885915 (charmap=ISO-8859-15), LANGUAGE=en_GB.iso885915 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages libpam-ck-connector depends on:
ii  libc6             2.28-10
ii  libck-connector0  1.2.1-4
ii  libdbus-1-3       1.10.28-0+deb9u1+devuan2
ii  libpam-runtime    1.1.8-3.6
ii  libpam0g          1.3.1-5

libpam-ck-connector recommends no packages.

libpam-ck-connector suggests no packages.

-- no debconf information

---

From: Mark Hindley <[email-masked]>
Date: Wed, 1 Apr 2020 16:52:49 +0100

Arne,

Control: tags -1 moreinfo

Thanks for this and sorry about the slow reply.

> I presume that is because there rightfully is none.

I have just tried this in a beowulf VM and cannot reproduce it.

The current version is 1.2.1-8 although I can't immediately see anything in the
changelog that might have fixed it.

Please can you verify it is still present and give instructions to reproduce.

Thanks

Mark

---

From: Mark Hindley <[email-masked]>
Date: Thu, 2 Apr 2020 09:59:41 +0100

tags 348 +moreinfo

---

From: Mark Hindley <[email-masked]>
Date: Thu, 2 Apr 2020 11:52:30 +0100

Control: tags -1 -moreinfo

Arne,

> I have just tried this in a beowulf VM and cannot reproduce it.

I have managed to reproduce this.

I can't immediately see there is a bug in what consolekit is doing. As you say,
there is no display device.

If you want to avoid the messages appearing in your logs, then I suggest the
following rsyslog configuration (or something similar to your taste).

% cat /etc/rsyslog.d/10-local.conf
:msg, contains, "cannot determine display-device" ~

That filters the messages for me.

Is that a solution for you?

Thanks

Mark

---

From: Arne Wichmann <[email-masked]>
Date: Thu, 2 Apr 2020 13:12:14 +0200

Hi, and thanks for taking the time.

> :msg, contains, "cannot determine display-device" ~

I should note that.

> Is that a solution for you?

Well - the bug is mostly logging as an error which is at most an info: not
having a display device should be considered a normal case, it can happen
for quite a number of reasons.

I surely can make the message go away.

cu

AW
-- 
[...] If you don't want to be restricted, don't agree to it. If you are
coerced, comply as much as you must to protect yourself, just don't support
it. Noone can free you but yourself. (crag, on Debian Planet)
Arne Wichmann ([email-masked])

---

From: Mark Hindley <[email-masked]>
Date: Thu, 2 Apr 2020 13:47:42 +0100

> I surely can make the message go away.

Ah, I see. We can lower the syslog level to warning for this case.

The problem with lowering it further is that in some cases it is a problem. I'll
take a look to see if there is a way of disentangling those.

Thanks.

Mark

---

From: Arne Wichmann <[email-masked]>
Date: Thu, 2 Apr 2020 15:06:29 +0200

begin  quotation  from Mark Hindley (in <[email-masked]>):
> The problem with lowering it further is that in some cases it is a
> problem. I'll take a look to see if there is a way of disentangling
> those.

Really understanding (and possibly documenting - at least in the code) the
problematic interactions is of course "the kings way" (as we might say in
german).

Again - thank you for caring! Even though I now see the problem is minor.

cu

AW