Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915840 - net-misc/openssh-9.4_p1-r1: Breaks 9999999gentoo-security.conf permissions
Summary: net-misc/openssh-9.4_p1-r1: Breaks 9999999gentoo-security.conf permissions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-16 06:36 UTC by Massimo Burcheri
Modified: 2024-03-25 15:28 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 Massimo Burcheri 2023-10-16 06:36:49 UTC
net-misc/openssh-9.4_p1-r1 breaks 9999999gentoo-security.conf permissions:

$ ssh foo@bar
Bad owner or permissions on /etc/ssh/ssh_config.d/9999999gentoo-security.conf

$ ls -al /etc/ssh/ssh_config.d/9999999gentoo-security.conf
-rw-rw-r-- 1 root root 45 16. Okt 07:49 /etc/ssh/ssh_config.d/9999999gentoo-security.conf

And needs to be fixed like this:

$ chmod -v 644 /etc/ssh/ssh_config.d/9999999gentoo-security.conf
mode of '/etc/ssh/ssh_config.d/9999999gentoo-security.conf' changed from 0664 (rw-rw-r--) to 0644 (rw-r--r--)
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-16 06:37:09 UTC
Thanks.
Comment 2 Massimo Burcheri 2023-10-16 07:13:01 UTC
Same about /etc/ssh/ssh_config.d/9999999gentoo.conf
Comment 3 Massimo Burcheri 2024-03-25 14:09:24 UTC
The issue still happens regularly:
Bad owner or permissions on /etc/ssh/ssh_config.d/9999999gentoo-security.conf

And I need to fix regularly by
# chmod -v 644  /etc/ssh/ssh_config.d/*
mode of '/etc/ssh/ssh_config.d/0000010custom.conf' retained as 0644 (rw-r--r--)
mode of '/etc/ssh/ssh_config.d/9999999gentoo.conf' changed from 0664 (rw-rw-r--) to 0644 (rw-r--r--)
mode of '/etc/ssh/ssh_config.d/9999999gentoo-security.conf' changed from 0664 (rw-rw-r--) to 0644 (rw-r--r--)

Recent responsible update was
     Mon Mar 25 10:18:25 2024 >>> net-misc/openssh-9.6_p1-r3
Comment 4 Mike Gilbert gentoo-dev 2024-03-25 14:51:27 UTC
We should move the creation of these files from src_install to an earlier phase, and install them properly using the "doins" helper.

That will ensure they are installed with a consistent mode.
Comment 5 Larry the Git Cow gentoo-dev 2024-03-25 15:28:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6150ddac2b5cf1d8d1421afeaa1a9c3e9615d9e

commit b6150ddac2b5cf1d8d1421afeaa1a9c3e9615d9e
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2024-03-25 15:26:12 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2024-03-25 15:26:12 +0000

    net-misc/openssh: fix install mode for config dropins
    
    Closes: https://bugs.gentoo.org/906639
    Closes: https://bugs.gentoo.org/915840
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 ...nssh-9.7_p1.ebuild => openssh-9.7_p1-r1.ebuild} | 78 +++++++++++++---------
 1 file changed, 48 insertions(+), 30 deletions(-)