cleanup after changes
parent
f4a38de0c0
commit
af18419eda
|
@ -80,14 +80,14 @@ int Sproc::execute(std::string run_as, std::string group, std::string command )
|
||||||
// child process
|
// child process
|
||||||
if ( seteuid( run_as_uid ) == 0 )
|
if ( seteuid( run_as_uid ) == 0 )
|
||||||
{
|
{
|
||||||
slog.log( E_DEBUG, "Successfully set UID to '" + std::to_string(run_as_uid) + "'." );
|
slog.log( E_INFO, "Successfully set UID to '" + std::to_string(run_as_uid) + "' (" + run_as + ")." );
|
||||||
} else {
|
} else {
|
||||||
slog.log( E_FATAL, "Failed to set UID. Panicking." );
|
slog.log( E_FATAL, "Failed to set UID. Panicking." );
|
||||||
return -401;
|
return -401;
|
||||||
}
|
}
|
||||||
if ( setegid( run_as_gid ) == 0 )
|
if ( setegid( run_as_gid ) == 0 )
|
||||||
{
|
{
|
||||||
slog.log( E_DEBUG, "Successfully set GID to '" + std::to_string(run_as_gid) + "'." );
|
slog.log( E_INFO, "Successfully set GID to '" + std::to_string(run_as_gid) + "' (" + group + ")." );
|
||||||
} else {
|
} else {
|
||||||
slog.log( E_FATAL, "Failed to set GID. Panicking." );
|
slog.log( E_FATAL, "Failed to set GID. Panicking." );
|
||||||
return -401;
|
return -401;
|
||||||
|
|
Loading…
Reference in New Issue