rc_make_env -> rc_env_config, rc_filter_env -> rc_env_filter
This commit is contained in:
parent
a470700710
commit
6d5ac5716b
@ -419,7 +419,7 @@ char **rc_config_list (const char *file)
|
|||||||
}
|
}
|
||||||
librc_hidden_def(rc_config_list)
|
librc_hidden_def(rc_config_list)
|
||||||
|
|
||||||
char **rc_filter_env (void)
|
char **rc_env_filter (void)
|
||||||
{
|
{
|
||||||
char **env = NULL;
|
char **env = NULL;
|
||||||
char **whitelist = NULL;
|
char **whitelist = NULL;
|
||||||
@ -517,7 +517,7 @@ char **rc_filter_env (void)
|
|||||||
|
|
||||||
return (env);
|
return (env);
|
||||||
}
|
}
|
||||||
librc_hidden_def(rc_filter_env)
|
librc_hidden_def(rc_env_filter)
|
||||||
|
|
||||||
/* Other systems may need this at some point, but for now it's Linux only */
|
/* Other systems may need this at some point, but for now it's Linux only */
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
@ -553,7 +553,7 @@ static bool file_regex (const char *file, const char *regex)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char **rc_make_env (void)
|
char **rc_env_config (void)
|
||||||
{
|
{
|
||||||
char **env = NULL;
|
char **env = NULL;
|
||||||
char *line;
|
char *line;
|
||||||
@ -695,4 +695,4 @@ char **rc_make_env (void)
|
|||||||
free (runlevel);
|
free (runlevel);
|
||||||
return (env);
|
return (env);
|
||||||
}
|
}
|
||||||
librc_hidden_def(rc_make_env)
|
librc_hidden_def(rc_env_config)
|
||||||
|
@ -63,15 +63,15 @@ librc_hidden_proto(rc_deptree_order_services)
|
|||||||
librc_hidden_proto(rc_deptree_update)
|
librc_hidden_proto(rc_deptree_update)
|
||||||
librc_hidden_proto(rc_deptree_update_needed)
|
librc_hidden_proto(rc_deptree_update_needed)
|
||||||
librc_hidden_proto(rc_env_bool)
|
librc_hidden_proto(rc_env_bool)
|
||||||
|
librc_hidden_proto(rc_env_config)
|
||||||
|
librc_hidden_proto(rc_env_filter)
|
||||||
librc_hidden_proto(rc_exists)
|
librc_hidden_proto(rc_exists)
|
||||||
librc_hidden_proto(rc_filter_env)
|
|
||||||
librc_hidden_proto(rc_find_pids)
|
librc_hidden_proto(rc_find_pids)
|
||||||
librc_hidden_proto(rc_is_dir)
|
librc_hidden_proto(rc_is_dir)
|
||||||
librc_hidden_proto(rc_is_exec)
|
librc_hidden_proto(rc_is_exec)
|
||||||
librc_hidden_proto(rc_is_file)
|
librc_hidden_proto(rc_is_file)
|
||||||
librc_hidden_proto(rc_is_link)
|
librc_hidden_proto(rc_is_link)
|
||||||
librc_hidden_proto(rc_ls_dir)
|
librc_hidden_proto(rc_ls_dir)
|
||||||
librc_hidden_proto(rc_make_env)
|
|
||||||
librc_hidden_proto(rc_rm_dir)
|
librc_hidden_proto(rc_rm_dir)
|
||||||
librc_hidden_proto(rc_runlevel_exists)
|
librc_hidden_proto(rc_runlevel_exists)
|
||||||
librc_hidden_proto(rc_runlevel_get)
|
librc_hidden_proto(rc_runlevel_get)
|
||||||
|
6
src/rc.c
6
src/rc.c
@ -486,7 +486,7 @@ static void sulogin (bool cont)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
newenv = rc_filter_env ();
|
newenv = rc_env_filter ();
|
||||||
|
|
||||||
if (cont) {
|
if (cont) {
|
||||||
int status = 0;
|
int status = 0;
|
||||||
@ -823,8 +823,8 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
/* Ensure our environment is pure
|
/* Ensure our environment is pure
|
||||||
Also, add our configuration to it */
|
Also, add our configuration to it */
|
||||||
env = rc_filter_env ();
|
env = rc_env_filter ();
|
||||||
tmplist = rc_make_env ();
|
tmplist = rc_env_config ();
|
||||||
rc_strlist_join (&env, tmplist);
|
rc_strlist_join (&env, tmplist);
|
||||||
rc_strlist_free (tmplist);
|
rc_strlist_free (tmplist);
|
||||||
|
|
||||||
|
4
src/rc.h
4
src/rc.h
@ -357,11 +357,11 @@ char *rc_config_value (char **list, const char *entry);
|
|||||||
|
|
||||||
/*! Return a NULL terminated string list of variables allowed through
|
/*! Return a NULL terminated string list of variables allowed through
|
||||||
* from the current environemnt. */
|
* from the current environemnt. */
|
||||||
char **rc_filter_env (void);
|
char **rc_env_filter (void);
|
||||||
|
|
||||||
/*! Return a NULL terminated string list of enviroment variables made from
|
/*! Return a NULL terminated string list of enviroment variables made from
|
||||||
* our configuration files. */
|
* our configuration files. */
|
||||||
char **rc_make_env (void);
|
char **rc_env_config (void);
|
||||||
|
|
||||||
/*! @name String List functions
|
/*! @name String List functions
|
||||||
* Handy functions for dealing with string arrays of char **.
|
* Handy functions for dealing with string arrays of char **.
|
||||||
|
@ -1031,8 +1031,8 @@ int runscript (int argc, char **argv)
|
|||||||
if ((softlevel = rc_xstrdup (getenv ("RC_SOFTLEVEL"))) == NULL) {
|
if ((softlevel = rc_xstrdup (getenv ("RC_SOFTLEVEL"))) == NULL) {
|
||||||
/* Ensure our environment is pure
|
/* Ensure our environment is pure
|
||||||
Also, add our configuration to it */
|
Also, add our configuration to it */
|
||||||
tmplist = rc_make_env();
|
tmplist = rc_env_config ();
|
||||||
env = rc_filter_env ();
|
env = rc_env_filter ();
|
||||||
rc_strlist_join (&env, tmplist);
|
rc_strlist_join (&env, tmplist);
|
||||||
rc_strlist_free (tmplist);
|
rc_strlist_free (tmplist);
|
||||||
tmplist = NULL;
|
tmplist = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user