releasePrivileges method
void
releasePrivileges()
revert uid and gid to original user's id's You should note that your PATH will still be the SUDO PATH not your original user's PATH.
Implementation
void releasePrivileges() {
verbose(() => 'releasePrivileges called');
if (Shell.current.isPrivilegedUser) {
priviledgedUser.setIf(UserEnvironment.save);
nonPriviledgedUser
..setIf(() => UserEnvironment.preSudo(pathToHome: loggedInUsersHome))
..runIf((user) {
verbose(() => 'release - builer');
initgroups(user.username);
user.build();
});
}
}