-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New chown
likely not working as expected.
#7781
Comments
Thank you, @adelton.
JFTR: it's not part of sssd-2.10.1 (PR #7774) and not shipped in Fedora yet (but shipped in C10S)
I'm confused with "... every symbolic link to a directory encountered". |
Since the options are about traversing, meaning continuing the |
Addressing C /etc/sssd Related to SSSD/sssd#7781.
But we still don't want to follow links to files within '/etc/sssd'. So both '-h' and '-H'..? |
Addressing C /etc/sssd Related to SSSD/sssd#7781.
But that's the default behaviour:
You'd have to use
(I'm not sure why you don't want to follow symlinks to files -- I'd consider the permissions and ownership of the files to be important no matter if you get to them through symlinks or not.) |
Your example is with 'chmod', and worry here is about 'chown'.
For 'chown' man page says:
Because of item (6) of https://www.openwall.com/lists/oss-security/2024/12/19/1 |
AFAICS, the default
It says (among others):
In those Hence a |
Also, the next paragraph in the item (6) in that report proposes not doing this type of automatic permission “fixes” in |
My initial comment
is wrong. It should apply to the first two commands that have
For the next ones, |
Right, we would also prefer to avoid this. But users want things to work smoothly at upgrade, they don't want to run additional scripts or follow instructions manually, so we had a number of Fedora BZs in this area after initial rebase onto sssd-2.10-beta. This is especially annoying for rpm-ostree based systems, where update doesn't propogate spec-file changes to /etc and /var |
Could it be a |
We have it - Line 1136 in ae6a0ff
|
…1 as well. Addressing C /etc/sssd Related to SSSD/sssd#7781. (cherry picked from commit ddc61c6)
I've been investigating the behaviour of SSSD in FreeIPA container where
/etc/sssd
is a symlink to/data/etc/sssd
. The recent changes in thesssd.service
definition, the runtimeExecStartPre
chown
s/chmod
s were of interest to me.I came across a20fa0f and I don't think it is doing what the commit message "avoid following accidential symbolic links in those dirs" suggests it does.
Since the
ExecStartPre=+-/bin/chown -f -R root:@SSSD_USER@ @sssdconfdir@
uses-R
, the behaviour "in those dirs" is governed by the-L
or-P
(the default) options. To avoid dereferencing within those directories, the default-P
is sufficient. The-h
actually prevents even entering the target directory when/etc/sssd
itself is a symlink.I believe that the intended option might actually be
-H
to all those commands, to explicitly traverse the command line symlink parameters, while keeping the no-dereference default for the inner directories..The text was updated successfully, but these errors were encountered: