From c16d69429a4c4259559b4da7582974663be1a49f Mon Sep 17 00:00:00 2001 From: Master Date: Sat, 1 Aug 2020 15:44:20 -0400 Subject: [PATCH] sproc::execute changed sete[u|g]id() to set[u|g]id() --- src/Sproc/Sproc.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Sproc/Sproc.cpp b/src/Sproc/Sproc.cpp index 37b2f46..e54e050 100644 --- a/src/Sproc/Sproc.cpp +++ b/src/Sproc/Sproc.cpp @@ -78,8 +78,7 @@ int Sproc::execute( std::string shell, std::string environment_file, std::string if ( pid == 0 ) { // child process - int setegidval = setegid( run_as_gid ); - if ( setegidval == 0 ) + if ( setgid( run_as_gid ) == 0 ) { slog.log( E_INFO, "Successfully set GID to '" + std::to_string(run_as_gid) + "' (" + group + ")." ); } else { @@ -87,7 +86,7 @@ int Sproc::execute( std::string shell, std::string environment_file, std::string 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 + ")." ); } else {