It seems that on priv-drop (independent to -x) it wants to keep privs for 
certain things.
Essentially ntp only if it binds, but cap_sys_time it wants always.

SYS_Linux_DropRoot(uid_t uid, gid_t gid)
{
  const char *cap_text;
  cap_t cap;

  if (prctl(PR_SET_KEEPCAPS, 1)) {
    LOG_FATAL("prctl() failed");
  }

  UTI_DropRoot(uid, gid);

  /* Keep CAP_NET_BIND_SERVICE only if NTP port can be opened */
  cap_text = CNF_GetNTPPort() ?
             "cap_net_bind_service,cap_sys_time=ep" : "cap_sys_time=ep";

  if ((cap = cap_from_text(cap_text)) == NULL) {
    LOG_FATAL("cap_from_text() failed");
  }

  if (cap_set_proc(cap)) {
    LOG_FATAL("cap_set_proc() failed");
  }


That is the failing part, we'd need to check if we can make the info of -x 
available so that it does not want cap_sys_time in that case.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1589780

Title:
  chrony.service doesn't start on LXD container

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/1589780/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to