aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h
index a4aa90da3..e5f03517f 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -780,6 +780,7 @@ char *bb_simplify_path(const char *path);
780extern void bb_do_delay(int seconds); 780extern void bb_do_delay(int seconds);
781extern void change_identity(const struct passwd *pw); 781extern void change_identity(const struct passwd *pw);
782extern const char *change_identity_e2str(const struct passwd *pw); 782extern const char *change_identity_e2str(const struct passwd *pw);
783extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ATTRIBUTE_NORETURN;
783extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args); 784extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args);
784#if ENABLE_SELINUX 785#if ENABLE_SELINUX
785extern void renew_current_security_context(void); 786extern void renew_current_security_context(void);
@@ -790,6 +791,21 @@ extern void setfscreatecon_or_die(security_context_t scontext);
790#endif 791#endif
791extern void selinux_or_die(void); 792extern void selinux_or_die(void);
792extern int restricted_shell(const char *shell); 793extern int restricted_shell(const char *shell);
794
795/* setup_environment:
796 * if loginshell = 1: cd(pw->pw_dir), clear environment, then set
797 * TERM=(old value)
798 * USER=pw->pw_name, LOGNAME=pw->pw_name
799 * PATH=bb_default_[root_]path
800 * HOME=pw->pw_dir
801 * SHELL=shell
802 * else if changeenv = 1:
803 * if not root (if pw->pw_uid != 0):
804 * USER=pw->pw_name, LOGNAME=pw->pw_name
805 * HOME=pw->pw_dir
806 * SHELL=shell
807 * else does nothing
808 */
793extern void setup_environment(const char *shell, int loginshell, int changeenv, const struct passwd *pw); 809extern void setup_environment(const char *shell, int loginshell, int changeenv, const struct passwd *pw);
794extern int correct_password(const struct passwd *pw); 810extern int correct_password(const struct passwd *pw);
795/* Returns a ptr to static storage */ 811/* Returns a ptr to static storage */