mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
su: Change the HOME enviroment variable on login
This commit is contained in:
parent
defe7b4ecc
commit
4054c35e9a
1 changed files with 3 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, Undefine <undefine@undefine.pl>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -48,6 +49,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
TRY(Core::System::pledge("stdio exec"));
|
||||
|
||||
TRY(Core::System::setenv("HOME"sv, account.home_directory(), true));
|
||||
|
||||
execl(account.shell().characters(), account.shell().characters(), nullptr);
|
||||
perror("execl");
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue