Bug#932384: libc6: utmp broken

Thorsten Glaser t.glaser at tarent.de
Thu Jul 18 16:56:12 BST 2019

reassign 932380 initscripts
found 932380 2.95-1
notfound 932380 2.93-8
retitle 932380 initscripts: /etc/init.d/bootmisc.sh: wrong /var/run/utmp permissions
severity 932380 important
unblock 932380 by 932384
block 932384 by 932380

On Thu, 18 Jul 2019, Thorsten Glaser wrote:

> After hitting #932380

I’ve had a look at what was recently updated, found initscripts
as something that matches a recursive grep for utmp in /etc, and
sure, the diff between 2.93-8 and 2.95-1 in etc/init.d/bootmisc.sh
contains this:

-               chmod 664 /var/run/utmp
+               chmod 644  "${utmp}" || log_warning_msg "failed to chmod ${utmp}"

So there we are.

Dmitry: please also move the chmod BELOW the chown, as chown
is known to sometimes reset permissions (in some documented
cases, not a bug):

tglase at tglase:~ $ diff -u /etc/init.d/bootmisc.sh bootmisc.sh
--- /etc/init.d/bootmisc.sh	2019-05-15 13:03:46.000000000 +0200
+++ bootmisc.sh	2019-07-18 17:51:51.887830376 +0200
@@ -33,8 +33,8 @@
 	readonly utmp='/var/run/utmp'
 	if > "${utmp}" ; then
-		chmod 644  "${utmp}" || log_warning_msg "failed to chmod ${utmp}"
 		chgrp utmp "${utmp}" || log_warning_msg "failed to chgrp ${utmp}"
+		chmod 664  "${utmp}" || log_warning_msg "failed to chmod ${utmp}"
 		return 0
 		log_failure_msg "failed to truncate ${utmp}"

XTaran: after “sudo chmod 664 /var/run/utmp” GNU screen works as
intended again, closing your bug.

glibc maintainers: unsure why screen works but not the example
code given that screen isn’t sgid… maybe you should have a look
at that, it still doesn’t work with the correct utmp permissions.

tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg


Mit der tarent Academy bieten wir auch Trainings und Schulungen in den
Bereichen Softwareentwicklung, Agiles Arbeiten und Zukunftstechnologien an.

Besuchen Sie uns auf www.tarent.de/academy. Wir freuen uns auf Ihren Kontakt.


More information about the Debian-init-diversity mailing list