forked from pool/shadow
b4a2128e54
OBS-URL: https://build.opensuse.org/request/show/398913 OBS-URL: https://build.opensuse.org/package/show/Base:System/shadow?expand=0&rev=21
32 lines
906 B
Diff
32 lines
906 B
Diff
--- src/usermod.c
|
|
+++ src/usermod.c
|
|
@@ -1808,6 +1808,14 @@ static void move_home (void)
|
|
fail_exit (E_HOMEDIR);
|
|
}
|
|
|
|
+#ifdef WITH_AUDIT
|
|
+ if (uflg || gflg) {
|
|
+ audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
|
+ "changing home directory owner",
|
|
+ user_newname, (unsigned int) user_newid, 1);
|
|
+ }
|
|
+#endif
|
|
+
|
|
if (rename (user_home, user_newhome) == 0) {
|
|
/* FIXME: rename above may have broken symlinks
|
|
* pointing to the user's home directory
|
|
@@ -2254,6 +2262,13 @@ int main (int argc, char **argv)
|
|
* ownership.
|
|
*
|
|
*/
|
|
+#ifdef WITH_AUDIT
|
|
+ if (uflg || gflg) {
|
|
+ audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
|
+ "changing home directory owner",
|
|
+ user_newname, (unsigned int) user_newid, 1);
|
|
+ }
|
|
+#endif
|
|
if (chown_tree (dflg ? user_newhome : user_home,
|
|
user_id,
|
|
uflg ? user_newid : (uid_t)-1,
|