Improves security of the binder by using
secure_getenv instead of getenv.
Change-Id: Iffd56ca65251763aacb0b9dbbaa768619cd92dd4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
static void on_environment(struct json_object *config, int optid, const char *name, void (*func)(struct json_object*, int, const char*))
{
static void on_environment(struct json_object *config, int optid, const char *name, void (*func)(struct json_object*, int, const char*))
{
- char *value = getenv(name);
+ char *value = secure_getenv(name);
if (value && *value)
func(config, optid, value);
if (value && *value)
func(config, optid, value);
static void on_environment_enum(struct json_object *config, int optid, const char *name, int (*func)(const char*))
{
static void on_environment_enum(struct json_object *config, int optid, const char *name, int (*func)(const char*))
{
- char *value = getenv(name);
+ char *value = secure_getenv(name);
if (value) {
if (func(value) == -1)
if (value) {
if (func(value) == -1)
static void on_environment_bool(struct json_object *config, int optid, const char *name)
{
static void on_environment_bool(struct json_object *config, int optid, const char *name)
{
- char *value = getenv(name);
+ char *value = secure_getenv(name);