aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 97aae0bb4..bd2dbe573 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1032,18 +1032,8 @@ extern int restricted_shell(const char *shell);
1032extern void setup_environment(const char *shell, int clear_env, int change_env, const struct passwd *pw); 1032extern void setup_environment(const char *shell, int clear_env, int change_env, const struct passwd *pw);
1033extern int correct_password(const struct passwd *pw); 1033extern int correct_password(const struct passwd *pw);
1034/* Returns a ptr to static storage */ 1034/* Returns a ptr to static storage */
1035extern char *pw_encrypt(const char *clear, const char *salt); 1035extern char *pw_encrypt(const char *clear, const char *salt, int cleanup);
1036extern int obscure(const char *old, const char *newval, const struct passwd *pwdp); 1036extern int obscure(const char *old, const char *newval, const struct passwd *pwdp);
1037
1038int index_in_str_array(const char *const string_array[], const char *key);
1039int index_in_strings(const char *strings, const char *key);
1040int index_in_substr_array(const char *const string_array[], const char *key);
1041int index_in_substrings(const char *strings, const char *key);
1042const char *nth_string(const char *strings, int n);
1043
1044extern void print_login_issue(const char *issue_file, const char *tty);
1045extern void print_login_prompt(void);
1046
1047/* rnd is additional random input. New one is returned. 1037/* rnd is additional random input. New one is returned.
1048 * Useful if you call crypt_make_salt many times in a row: 1038 * Useful if you call crypt_make_salt many times in a row:
1049 * rnd = crypt_make_salt(buf1, 4, 0); 1039 * rnd = crypt_make_salt(buf1, 4, 0);
@@ -1052,11 +1042,19 @@ extern void print_login_prompt(void);
1052 * (otherwise we risk having same salt generated) 1042 * (otherwise we risk having same salt generated)
1053 */ 1043 */
1054extern int crypt_make_salt(char *p, int cnt, int rnd); 1044extern int crypt_make_salt(char *p, int cnt, int rnd);
1055
1056/* Returns number of lines changed, or -1 on error */ 1045/* Returns number of lines changed, or -1 on error */
1057extern int update_passwd(const char *filename, const char *username, 1046extern int update_passwd(const char *filename, const char *username,
1058 const char *new_pw); 1047 const char *new_pw);
1059 1048
1049int index_in_str_array(const char *const string_array[], const char *key);
1050int index_in_strings(const char *strings, const char *key);
1051int index_in_substr_array(const char *const string_array[], const char *key);
1052int index_in_substrings(const char *strings, const char *key);
1053const char *nth_string(const char *strings, int n);
1054
1055extern void print_login_issue(const char *issue_file, const char *tty);
1056extern void print_login_prompt(void);
1057
1060/* NB: typically you want to pass fd 0, not 1. Think 'applet | grep something' */ 1058/* NB: typically you want to pass fd 0, not 1. Think 'applet | grep something' */
1061int get_terminal_width_height(int fd, unsigned *width, unsigned *height); 1059int get_terminal_width_height(int fd, unsigned *width, unsigned *height);
1062 1060