To drop root privilege for parodus process

This commit is contained in:
kjothi774
2020-04-02 03:03:12 +00:00
parent 9afa49140a
commit 5aae91763a
5 changed files with 11 additions and 1 deletions

View File

@@ -79,6 +79,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Security
- Added command line arguments for secure token read and acquire. Token presented to cloud for authentication verification.
- Included chnages to drop root capabilities for parodus process
## [1.0.0] - 2017-11-17
### Added

View File

@@ -15,7 +15,7 @@ set(SOURCES main.c mutex.c networking.c nopoll_helpers.c heartBeat.c nopoll_hand
ParodusInternal.c string_helpers.c time.c config.c conn_interface.c
connection.c spin_thread.c client_list.c service_alive.c
upstream.c downstream.c thread_tasks.c partners_check.c token.c event_handler.c
crud_interface.c crud_tasks.c crud_internal.c close_retry.c auth_token.c)
crud_interface.c crud_tasks.c crud_internal.c close_retry.c auth_token.c privilege.c)
if (ENABLE_SESHAT)
set(SOURCES ${SOURCES} seshat_interface.c)

View File

@@ -27,6 +27,7 @@
#include "breakpad_wrapper.h"
#endif
#include "signal.h"
#include "privilege.h"
/*----------------------------------------------------------------------------*/
/* Macros */
@@ -104,6 +105,7 @@ int main( int argc, char **argv)
memset(cfg,0,sizeof(ParodusCfg));
ParodusInfo("********** Starting component: Parodus **********\n ");
drop_root_privilege();
setDefaultValuesToCfg(cfg);
if (0 != parseCommandLine(argc,argv,cfg)) {
abort();

6
src/privilege.c Normal file
View File

@@ -0,0 +1,6 @@
#include "privilege.h"
void drop_root_privilege()
{
}

1
src/privilege.h Normal file
View File

@@ -0,0 +1 @@
void drop_root_privilege();