aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-05-08 17:52:17 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-05-08 17:52:17 +0000
commit7e84e539de530b2060f0e570fc8f063ed0aaad2f (patch)
treec03518f2059504a513119cf4d499ccf5c7233f83 /include
parent92c0b8222eb50dd35c06e2f1265706b388762234 (diff)
downloadbusybox-7e84e539de530b2060f0e570fc8f063ed0aaad2f.tar.gz
cryptpw: new applet (a bit less than 3k added)
(by Thomas Lundquist <lists@zelow.no>)
Diffstat (limited to 'include')
-rw-r--r--include/applets.h1
-rw-r--r--include/libbb.h2
-rw-r--r--include/usage.h7
3 files changed, 10 insertions, 0 deletions
diff --git a/include/applets.h b/include/applets.h
index 67f7db4a6..a7aee3a1d 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -101,6 +101,7 @@ USE_CP(APPLET_NOEXEC(cp, cp, _BB_DIR_BIN, _BB_SUID_NEVER, cp))
USE_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
USE_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
+USE_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_NEVER, cut))
USE_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
diff --git a/include/libbb.h b/include/libbb.h
index be51f2520..32bb3113d 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -718,6 +718,7 @@ extern int bb_parse_mode(const char* s, mode_t* theMode);
char *concat_path_file(const char *path, const char *filename);
char *concat_subpath_file(const char *path, const char *filename);
+/* NB: can violate const-ness (similarly to strchr) */
char *last_char_is(const char *s, int c);
@@ -755,6 +756,7 @@ extern int index_in_substr_array(const char * const string_array[], const char *
extern void print_login_issue(const char *issue_file, const char *tty);
extern void print_login_prompt(void);
+extern void crypt_make_salt(char *p, int cnt);
int get_terminal_width_height(const int fd, int *width, int *height);
diff --git a/include/usage.h b/include/usage.h
index afcc4b3d7..eab96011e 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -474,6 +474,13 @@
" -d [user] delete crontab for user\n" \
" -c dir specify crontab directory"
+#define cryptpw_trivial_usage \
+ "[-a des|md5] [string]"
+#define cryptpw_full_usage \
+ "Outputs crypted string.\n" \
+ "If string isn't supplied on cmdline, reads it from stdin.\n" \
+ "\nOptions:" \
+ "\n -a Algorithm to use (default: md5)"
#define cut_trivial_usage \
"[OPTION]... [FILE]..."