This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17111 )
Change subject: exec: propogate errors from osmo_environment_[filter|append]
......................................................................
exec: propogate errors from osmo_environment_[filter|append]
Change-Id: If7d6e0441f73092a4fb455340c076ba4dc60af3f
---
M src/exec.c
1 file changed, 10 insertions(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/exec.c b/src/exec.c
index b806ad5..62f5919 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -221,10 +221,16 @@
new_env[0] = NULL;
/* build the new environment */
- if (env_whitelist)
- osmo_environment_filter(new_env, ARRAY_SIZE(new_env), environ, env_whitelist);
- if (addl_env)
- osmo_environment_append(new_env, ARRAY_SIZE(new_env), addl_env);
+ if (env_whitelist) {
+ rc = osmo_environment_filter(new_env, ARRAY_SIZE(new_env), environ, env_whitelist);
+ if (rc < 0)
+ return rc;
+ }
+ if (addl_env) {
+ rc = osmo_environment_append(new_env, ARRAY_SIZE(new_env), addl_env);
+ if (rc < 0)
+ return rc;
+ }
/* if we want to behave like system(3), we must go via the shell */
execle("/bin/sh", "sh", "-c", command, (char *) NULL, new_env);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17111
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If7d6e0441f73092a4fb455340c076ba4dc60af3f
Gerrit-Change-Number: 17111
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200210/ee9bc872/attachment.htm>