From nobody Tue Jan 18 06:30:46 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C7FEA196DD54 for ; Tue, 18 Jan 2022 06:30:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JdJn23Yfbz4X1Z for ; Tue, 18 Jan 2022 06:30:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A1A71C47F for ; Tue, 18 Jan 2022 06:30:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 20I6UkGS090441 for ; Tue, 18 Jan 2022 06:30:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 20I6UkIO090440 for bugs@FreeBSD.org; Tue, 18 Jan 2022 06:30:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 261298] ntpd: /var/db/ntpd.leap-seconds.list wrong permissions/owner Date: Tue, 18 Jan 2022 06:30:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: martin@waschbuesch.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642487446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zWJSc0++KYAayRvzEH5U03PWXyRVM+8R2Og8hNxvDcA=; b=EcuvYOLIpDiIHEP3AeQYtw3w49+1fM3hPsJV1as4a7SFg7JycLAD4BltTT3mEVmzVGE4X2 tUgoi6lK+Fst72sWjvTNlWu0xL6UtdjwOMv+17KegjbGtqe/a0eXlHS0aPjUPhpQGI/Jvi IaYC0h+g2ylxLXS3LmXGBZITbgJZdh6McpNwTr3+lLEOMHNMcZjv0P2fEYg2WZiAAwsB6X ZFgO8Q7CgDaGW23lKfaXJQ8dorUhw3Ryzbf/slRr51Gv6byeTLQurLHlZV/jWY1PwGGJuC xDXzzx2VypNV0KqwWC5GUAoNsN5BZCb4SGuR/x4MOH7Awg456HWmHaBIuUiJlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642487446; a=rsa-sha256; cv=none; b=IMHESVL9+fYrFoV1wzS27fJw96FnFy1ljnOtGu4P+lVH7ZsiEJpGfooQ2w4Szi/h1b//71 p84ml0xfz+duVqs+akv0bAU6qeCsDYeGEFF96Cp76ZLJ66bvkQKHzSU2xJg0v2ZYnctvcA YbmXYgIF1/lQRLy7kWwS73E0wg7vq2KSHLEYJwiMEsS1Vpo2DQS5hQZD0SMNd1yH/+847E FniYd5tYPJCHPCLRsszVnXXTppkwD/zHTMtMCdDECHPPVgkudsx+9Q8fiZSh99TqnS9v9W 6ahhjS20gDwA8FDsZocinLTu8yw+6RLo0cB8t68fG90cz0T3TxxyiPj7Yqdqaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261298 Bug ID: 261298 Summary: ntpd: /var/db/ntpd.leap-seconds.list wrong permissions/owner Product: Base System Version: 13.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: conf Assignee: bugs@FreeBSD.org Reporter: martin@waschbuesch.de Regularly, /var/db/ntpd.leap-seconds.list ends up being owned by root and permissions of 640. On restart of ntpd this leads to: Jan 18 06:14:56 ns00 ntpd[30173]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): open failed: Permission denied The file should either be owned by ntpd (which ntpd runs as) or have permissions of 644. This happens because a) the file is owned by root:wheel and=20 b) I changed umask in /etc/login.conf to 027 ntpd settings in rc.conf are: ntpd_enable=3D"YES" ntpd_sync_on_start=3D"YES" ntpd leapfile is checked and fetched daily as specified in /etc/periodic/daily/480.leapfile-ntpd the logic is contained in the ntpd_fetch_leapfile() function within /etc/rc.d/ntpd That function should take care of correct ownership of the file, so I propo= se to fix ownership to ntpd:ntpd there. However, there may be reasons why ownership root:wheel and permissions 644 is a better idea for some reason I have missed, thus I am not providing a patch. --=20 You are receiving this mail because: You are the assignee for the bug.=