sproc::execute changed sete[u|g]id() to set[u|g]id()
parent
a5317bfeda
commit
c16d69429a
|
@ -78,8 +78,7 @@ int Sproc::execute( std::string shell, std::string environment_file, std::string
|
||||||
if ( pid == 0 )
|
if ( pid == 0 )
|
||||||
{
|
{
|
||||||
// child process
|
// child process
|
||||||
int setegidval = setegid( run_as_gid );
|
if ( setgid( run_as_gid ) == 0 )
|
||||||
if ( setegidval == 0 )
|
|
||||||
{
|
{
|
||||||
slog.log( E_INFO, "Successfully set GID to '" + std::to_string(run_as_gid) + "' (" + group + ")." );
|
slog.log( E_INFO, "Successfully set GID to '" + std::to_string(run_as_gid) + "' (" + group + ")." );
|
||||||
} else {
|
} else {
|
||||||
|
@ -87,7 +86,7 @@ int Sproc::execute( std::string shell, std::string environment_file, std::string
|
||||||
return -401;
|
return -401;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( seteuid( run_as_uid ) == 0 )
|
if ( setuid( run_as_uid ) == 0 )
|
||||||
{
|
{
|
||||||
slog.log( E_INFO, "Successfully set UID to '" + std::to_string(run_as_uid) + "' (" + run_as + ")." );
|
slog.log( E_INFO, "Successfully set UID to '" + std::to_string(run_as_uid) + "' (" + run_as + ")." );
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue