Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 485118 - dev-libs/lockdev-1.0.3.1.2-r1 with sys-apps/systemd-204 - non-root users cannot record lock on serial device
Summary: dev-libs/lockdev-1.0.3.1.2-r1 with sys-apps/systemd-204 - non-root users cann...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-16 18:27 UTC by Chris Mayo
Modified: 2016-05-25 19:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Mayo 2013-09-16 18:27:28 UTC
Experienced with dev-libs/libcec-2.1.3 which uses lockdev to record lock in /var/lock but systemd creates /var/lock as root:root 0755 from /usr/lib/tmpfiles.d/gentoo-run.conf.

lockdev modified by Arch and Fedora to use /run/lock/lockdev

https://bugs.archlinux.org/task/31614
https://projects.archlinux.org/svntogit/community.git/commit/trunk?h=packages/lockdev&id=4c0c0c25eb1a5c77bd9f938886e9e582384ef119
(N.B. further modified in:
https://projects.archlinux.org/svntogit/community.git/commit/trunk?h=packages/lockdev&id=d0796630d702e5e3951e17515a2dcf5934c2078c
)

I have worked around by creating /etc/tmpfiles.d/gentoo-run.conf:
d /run/lock 0775 root dialout -
Comment 1 Pacho Ramos gentoo-dev 2013-10-18 17:06:50 UTC
Maintainer, are you ok with that change?
Comment 2 Jonathan Callen (RETIRED) gentoo-dev 2013-10-19 00:58:32 UTC
Until we enable whatever option is required to make systemd install its /usr/lib/tmpfiles.d/legacy.conf, this won't work properly.  It looks like in order for systemd to install that file, you must tell systemd that you have the full legacy rc?.d setup just like Fedora/Red Hat used to.
Comment 3 Pacho Ramos gentoo-dev 2013-10-19 07:17:52 UTC
Well, the Arch change should work as they are neither having the rc.d compat in their systemd package
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-19 07:50:28 UTC
/run/lock is created by the Gentoo rules, so we can fix the permissions ourselves if they're wrong.
Comment 5 Pacho Ramos gentoo-dev 2013-10-19 08:09:09 UTC
The problem is that I am not sure if they are wrong :/, should /var/lock be changed to more relaxed permissions or lockdev should have its own subdir? I say that because looks like other distributions are also having that restrict permissions for /var/lock
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-21 11:14:51 UTC
What does OpenRC do here?
Comment 7 Pacho Ramos gentoo-dev 2015-09-07 17:58:15 UTC
@openrc, any idea about how to deal with this? Thanks
Comment 8 Chris Mayo 2015-09-27 10:44:47 UTC
Now (sys-apps/systemd-224-r1) using uucp group instead of dialout.
Comment 9 Chris Mayo 2015-11-30 19:27:40 UTC
(In reply to Chris Mayo from comment #8)
> Now (sys-apps/systemd-224-r1) using uucp group instead of dialout.

Changed to uucp in systemd-208-r3 for bug #463376
Comment 10 Pacho Ramos gentoo-dev 2016-05-23 20:56:51 UTC
What is the status of this with current systemd versions?
Comment 11 Chris Mayo 2016-05-25 19:12:36 UTC
With sys-apps/systemd-226-r2:
$ ls -ld /run/lock/
drwxr-xr-x 2 root root 60 May 25 19:44 /run/lock/

Not a problem for me any more as libcec-3.1.0 doesn't use lockdev.
Apart from earlier versions of libcec, other user is USE="serial" media-libs/libgphoto2.