Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 892517

Summary: sys-apps/systemd-utils-252.4 changed /run/lock rights
Product: Gentoo Linux Reporter: Xavier Miller <xavier.miller>
Component: Current packagesAssignee: Gentoo systemd Team <systemd>
Status: RESOLVED FIXED    
Severity: normal CC: openrc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=416439
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: files/legacy.conf change request

Description Xavier Miller 2023-01-29 18:37:45 UTC
before sys-apps/systemd-utils-252.4:, /run/lock was
    drwxrwxr-x  2 root   uucp    80

since thenm it is
    	drwxr-xr-x  2 root   root    80

This lock folder is used by serial ports users (java), which are in uucp group.

With this new right, they cannot use a serial port anymore.

These rights are pushed by files/legacy.conf installed in /usr/lib/tmpfiles.d

Could it possible to change files/legacy.conf so that it was before?


Reproducible: Always

Actual Results:  
java apps cannot use serial port anymore

Expected Results:  
java apps should be able to use serial ports
Comment 1 Xavier Miller 2023-01-29 18:38:17 UTC
Created attachment 849405 [details, diff]
files/legacy.conf change request
Comment 2 Mike Gilbert gentoo-dev 2023-01-29 19:35:45 UTC
This was changed intentionally by systemd upstream.

Notably, they never used the "uucp" group, and instead used a dedicated "lock" group. 

https://github.com/systemd/systemd/commit/e1ab991283ca1072d29e21d8af76e992b663ad9b

However, that too has since been removed.

https://github.com/systemd/systemd/commit/61f32bff6130a44d077886d38cff89ad161bf177

If you really want the old behavior, you can create your own "legacy.conf" file in /etc/tmpfiles.d.
Comment 3 Mike Gilbert gentoo-dev 2023-01-29 19:44:35 UTC
> Expected Results:  
> java apps should be able to use serial ports

What java apps are you referring to? The modern way to reserve a serial port is using flock(), so maybe your apps just need an update.
Comment 4 Larry the Git Cow gentoo-dev 2023-01-29 20:00:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=534831a8a15fd0823e73436c765c44fe58128ca3

commit 534831a8a15fd0823e73436c765c44fe58128ca3
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-01-29 19:57:23 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-01-29 19:57:23 +0000

    sys-apps/systemd-utils: use default permissions for /run/lock
    
    If /run/lock does not exist, it will be created with owner root:root and
    mode 0755.
    
    If /run/lock already exists, its permissions will not be altered.
    
    Closes: https://bugs.gentoo.org/892517
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/systemd-utils/files/legacy.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Xavier Miller 2023-01-30 07:59:22 UTC
(In reply to Mike Gilbert from comment #3)
> > Expected Results:  
> > java apps should be able to use serial ports
> 
> What java apps are you referring to? The modern way to reserve a serial port
> is using flock(), so maybe your apps just need an update.

Hi, this is OpenHab, connected with 2 serial ports.

With the version you pushed, I could overwrite /run/lock with my "non-standard" config based on /etc/tmpfiles.d

Thank you very much!