[systemd-devel] systemd-timesyncd - use unprivileged ports

Lennart Poettering lennart at poettering.net
Tue Mar 31 14:57:48 UTC 2020


On Mi, 11.03.20 17:34, Jędrzej Dudkiewicz (jedrzej.dudkiewicz at gmail.com) wrote:

> Hi,
>
> I have quite a few devices running Linux in client's network - so I
> have no control over it. It seems that all privileged UDP ports are
> blocked I have to use unprivileged port. I'd like to use
> systemd-timesyncd to synchronize time, thought I can't find a way to
> force it to use unprivileged port. Is there any way to do it?

There's not, currently, the port nr is hardcoded. It might be OK to
make the port nr configurable though, via an env var. You could then
set the env var via a drop-in for systemd-timesyncd.service that uses
Environment=. Patch should be simple, look for resolve_getaddrinfo()
in timesyncd-manager.c. Consider prepping a patch and posting as
github PR, we'll the review/merge it.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list