su: Change the current directory to the user's home on login
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2a967f4b8b
commit
3a45f4af53
@ -89,5 +89,7 @@ int main(int argc, char** argv)
|
|||||||
setgid(entry->pw_gid);
|
setgid(entry->pw_gid);
|
||||||
setuid(entry->pw_uid);
|
setuid(entry->pw_uid);
|
||||||
|
|
||||||
|
chdir(entry->pw_dir);
|
||||||
|
|
||||||
execl(entry->pw_shell, entry->pw_shell, NULL);
|
execl(entry->pw_shell, entry->pw_shell, NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user