]> granicus.if.org Git - shadow/commit
usermod: Guard against unsafe change of ownership of home directory content
authorTomas Mraz <tmraz@fedoraproject.org>
Tue, 18 Dec 2018 15:32:13 +0000 (16:32 +0100)
committerTomas Mraz <tmraz@fedoraproject.org>
Tue, 18 Dec 2018 15:32:13 +0000 (16:32 +0100)
commit5b41b7d1b1c9aeaafa9cc0fd677f5eb4d075b09f
tree3f994d205a3fed3e9fe2bd8af78d78dff8c465a3
parent4633164857580a5e5e52a8a2106fa2b4627bc8f6
usermod: Guard against unsafe change of ownership of home directory content

In case the home directory is not a real home directory
(owned by the user) but things like / or /var or similar,
it is unsafe to change ownership of home directory content.

The test checks whether the home directory is owned by the
user him/herself, if not no ownership modification of contents
is performed.
src/usermod.c