diff options
author | Harald Welte <laforge@osmocom.org> | 2020-04-17 18:23:52 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-04-18 15:06:59 +0200 |
commit | f3cc731d40c223c25c81c063d0f477b0c88ca069 (patch) | |
tree | aff5b923cbffec20645e2b75b7f1e481e3161db4 /include/osmocom/core/exec.h | |
parent | e7d0d70ce7914eb0304f17baf46bc9f00fe634c7 (diff) |
exec: Introduce osmo_system_nowait2() to allow specify a user
For a process running as root, it may be desirable to drop privileges
down to a normal user before executing an external command. Let's
add a new API function for that.
Change-Id: If1431f930f72a8d6c1d102426874a11b7a2debd9
Diffstat (limited to 'include/osmocom/core/exec.h')
-rw-r--r-- | include/osmocom/core/exec.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/core/exec.h b/include/osmocom/core/exec.h index 6bbd352c..e63ec114 100644 --- a/include/osmocom/core/exec.h +++ b/include/osmocom/core/exec.h @@ -25,4 +25,5 @@ extern const char *osmo_environment_whitelist[]; int osmo_environment_filter(char **out, size_t out_len, char **in, const char **whitelist); int osmo_environment_append(char **out, size_t out_len, char **in); int osmo_close_all_fds_above(int last_fd_to_keep); +int osmo_system_nowait2(const char *command, const char **env_whitelist, char **addl_env, const char *user); int osmo_system_nowait(const char *command, const char **env_whitelist, char **addl_env); |