Harald Welte | c6a8697 | 2019-12-16 23:14:45 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | /* (C) 2019 by Harald Welte <laforge@gnumonks.org> |
| 3 | * |
| 4 | * All Rights Reserved |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0+ |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License along |
| 19 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 21 | * |
| 22 | */ |
| 23 | extern const char *osmo_environment_whitelist[]; |
| 24 | |
| 25 | int osmo_environment_filter(char **out, size_t out_len, char **in, const char **whitelist); |
| 26 | int osmo_environment_append(char **out, size_t out_len, char **in); |
| 27 | int osmo_close_all_fds_above(int last_fd_to_keep); |
Harald Welte | f3cc731 | 2020-04-17 18:23:52 +0200 | [diff] [blame] | 28 | int osmo_system_nowait2(const char *command, const char **env_whitelist, char **addl_env, const char *user); |
Harald Welte | c6a8697 | 2019-12-16 23:14:45 +0100 | [diff] [blame] | 29 | int osmo_system_nowait(const char *command, const char **env_whitelist, char **addl_env); |