* Backend daemon drops privileges after initialization (to not run as root)

* New config option `CLICON_USER` with default value `clicon`
  * Can also be set with `-U <user>` clixon_backend command-line option
This commit is contained in:
Olof hagsand 2019-09-11 21:24:14 +02:00
parent 3806f7652e
commit 3d5abb77f9
60 changed files with 238 additions and 93 deletions

View file

@ -43,6 +43,8 @@ int clicon_file_dirent(const char *dir, struct dirent **ent,
int clicon_file_copy(char *src, char *target);
int group_name2gid(char *name, gid_t *gid);
int group_name2gid(const char *name, gid_t *gid);
int name2uid(const char *name, uid_t *uid);
#endif /* _CLIXON_FILE_H_ */

View file

@ -167,6 +167,9 @@ static inline char *clicon_sock(clicon_handle h){
static inline char *clicon_sock_group(clicon_handle h){
return clicon_option_str(h, "CLICON_SOCK_GROUP");
}
static inline char *clicon_user(clicon_handle h){
return clicon_option_str(h, "CLICON_USER");
}
static inline char *clicon_backend_pidfile(clicon_handle h){
return clicon_option_str(h, "CLICON_BACKEND_PIDFILE");
}