Re: [PATCH] Whitelist libuuid clock file

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

 



Karel Zak wrote:

OK, seems better than my solution ;-) Thanks!
Actually, I found a very exotic failure of uuidd accessing clock.txt, which is not yet covered:

ls -al /var/lib/libuuid/clock.txt
-rw-rw---- 1 root root 56 Jan 25 11:48 /var/lib/libuuid/clock.txt
i. e. root owned clock.txt

It happens only if more conditions are met:
- /var/lib/libuuid exists
- uuidd is not running nor socket activated
- uuigden --time is called as root

If this happens, /var/lib/libuuid/clock.txt is written as root:root by the code in libuuid/src/gen_uuid.c:get_clock(). When uuidd is started later, it is unable to use clock.txt.

It happens only in very special cases:
- util-linux is reinstalled from --without-uuidd to --with-uuidd
- util-linux is just being installed, and daemon nor socket activation are active yet - start of uuidd fails for some exotic reason (out of memory, number of processes exhausted)

But if it happens, the problem stays forever.

So I think it should be addressed. But I am not sure how to fix it properly in the systemd service file.
ExecStartPre=-/usr/bin/chown uuidd:uuidd /var/lib/libuuid/clock.txt
does not work:
/usr/bin/chown: changing ownership of '/var/lib/libuuid/clock.txt': Operation not permitted

--
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                         e-mail: sbrabec@xxxxxxxx
Křižíkova 148/34 (Corso IIa)                    tel: +420 284 084 060
186 00 Praha 8-Karlín                          fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux