summaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 46860c614..a8b9b5bcf 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -769,6 +769,7 @@ extern void selinux_or_die(void);
769extern int restricted_shell(const char *shell); 769extern int restricted_shell(const char *shell);
770extern void setup_environment(const char *shell, int loginshell, int changeenv, const struct passwd *pw); 770extern void setup_environment(const char *shell, int loginshell, int changeenv, const struct passwd *pw);
771extern int correct_password(const struct passwd *pw); 771extern int correct_password(const struct passwd *pw);
772/* Returns a ptr to static storage */
772extern char *pw_encrypt(const char *clear, const char *salt); 773extern char *pw_encrypt(const char *clear, const char *salt);
773extern int obscure(const char *old, const char *newval, const struct passwd *pwdp); 774extern int obscure(const char *old, const char *newval, const struct passwd *pwdp);
774extern int index_in_str_array(const char * const string_array[], const char *key); 775extern int index_in_str_array(const char * const string_array[], const char *key);
@@ -776,7 +777,18 @@ extern int index_in_substr_array(const char * const string_array[], const char *
776extern void print_login_issue(const char *issue_file, const char *tty); 777extern void print_login_issue(const char *issue_file, const char *tty);
777extern void print_login_prompt(void); 778extern void print_login_prompt(void);
778 779
779extern void crypt_make_salt(char *p, int cnt); 780/* rnd is additional random input. New one is returned.
781 * Useful if you call crypt_make_salt many times in a row:
782 * rnd = crypt_make_salt(buf1, 4, 0);
783 * rnd = crypt_make_salt(buf2, 4, rnd);
784 * rnd = crypt_make_salt(buf3, 4, rnd);
785 * (otherwise we risk having same salt generated)
786 */
787extern int crypt_make_salt(char *p, int cnt, int rnd);
788
789/* Returns number of lines changed, or -1 on error */
790extern int update_passwd(const char *filename, const char *username,
791 const char *new_pw);
780 792
781int get_terminal_width_height(const int fd, int *width, int *height); 793int get_terminal_width_height(const int fd, int *width, int *height);
782 794