Re: [chrony-users] Chrony as non-root user (again) |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: chrony-users@xxxxxxxxxxxxxxxxxxxx, Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Subject: Re: [chrony-users] Chrony as non-root user (again)
- From: Kevin <kevincox@xxxxxxxxxxx>
- Date: Mon, 14 Sep 2020 19:59:23 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kevincox.ca; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=5+ITirWTWMrh9KRx8xxfKTOtC19TjE87dZFGQWBz7Ic=; b=bNAHKla4zzT8AZvprTm/Pd1OuMWh0Q1ODOPLIr5Mn8HAIYrZRr8jhMeUXNYhmMaFoz u85tOhFDD6+IwUWaLq+MWLvoLJCzhatV7H6JaG52mBElA1a6XU6dG6Z6EBJFGj+oinDr tXazdSryYfkXM7wo7o0kjyE3T6cSVPDSwmg/Ixp9c1UrbRh85kHHWKKbrqC3X0aWoMl8 J3Mb5j012HDen6mh0Zbs3SSyYDzvEzcEWilljY0c1VAn2sHoH/0i9OgNcMrhkY8TSbui LwQgf5Koj90loVn/dLwL03cOYVjL/NgOUD28rlbz8ygHCuwZamuZFpG8UHM0UNCjGH8m 9ahw==
On 9/14/20 6:03 AM, Miroslav Lichvar wrote:
On Thu, Sep 10, 2020 at 07:28:23PM -0400, Kevin wrote:
I know it has been discussed a number of times before on this list (ex:
https://www.mail-archive.com/chrony-users@xxxxxxxxxxxxxxxxxxxx/msg01751.html)
however it seems like it was dismissed too quickly.
Maybe this mail has more details:
https://www.mail-archive.com/chrony-dev@xxxxxxxxxxxxxxxxxxxx/msg01731.html
I have read that discussion but don't see what points you are referring to.
However it seems to me that all of these (except maybe for HW timestamping,
I am not familiar) can be managed by more fine grained permissions such as
chaining the group or ACL of the device node, creating the directories
beforehand or via process capabilities.
There are devices that chronyd may need to open in some configurations
and there are also capabilities that chronyd may need. Without parsing
the configuration file we don't know in advance. I don't think
requiring the admin to modify those permissions and capabilities per
configuration would be acceptable. Setting the permissions for all
devices that chronyd might ever need and allowing all the capabilities
would weaken the security.
This is what I mean. As the admin I know what devices I will need for
the selected chrony features and I can provide access to just those devices.
Would it be possible to enable running chrony as a non-privileged user?
Removing that check is easy. My concern is that it would lead to some
distributions switching their default service, which would either
break some features or give the chrony user too many privileges that
it doesn't usually need to have.
I see your concern. However as the admin in this case it does limit what
I have available in order to force distribution maintainers to behave. I
think that at the end of the day it is probably best to leave this to
package maintainers and admins to decide what is best for their users.
As for breaking features I don't think this will be a major concern as
the failure will be obvious. As I understand it after reading the config
chrony opens all of the files it needs (before dropping privledges) so
it would be easy to produce an obvious error "Can not access $thing,
your admin or package maintainer has made a mistake, do not report this
issue to chrony developers."
Of course it isn't easy to detect the case where more than what is
required has been opened up. However possibly with suitable
documentation this is not a major issue?
On systems where configuration is fixed, or can be modified only in a
small extent (e.g. change NTP servers), this would make more sense,
but I think the developers can patch that out if needed.
What do you suggest?
I am definitely capable of patching the code if this is the recommended
course of action. However as a minimum it would be nice to have
something more endorsed and less brittle. Even putting the code behind a
build option would be nice. That way the patches (or sed commands) don't
stop working if it is reformatted slightly.
--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.