diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/applets.src.h | 5 | ||||
-rw-r--r-- | include/busybox.h | 4 | ||||
-rw-r--r-- | include/libbb.h | 26 |
3 files changed, 21 insertions, 14 deletions
diff --git a/include/applets.src.h b/include/applets.src.h index 6e1b02fc3..248d539c4 100644 --- a/include/applets.src.h +++ b/include/applets.src.h | |||
@@ -205,7 +205,6 @@ IF_MAKEDEVS(APPLET(makedevs, BB_DIR_SBIN, BB_SUID_DROP)) | |||
205 | IF_MAKEMIME(APPLET(makemime, BB_DIR_BIN, BB_SUID_DROP)) | 205 | IF_MAKEMIME(APPLET(makemime, BB_DIR_BIN, BB_SUID_DROP)) |
206 | IF_MAN(APPLET(man, BB_DIR_USR_BIN, BB_SUID_DROP)) | 206 | IF_MAN(APPLET(man, BB_DIR_USR_BIN, BB_SUID_DROP)) |
207 | IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 207 | IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
208 | IF_MD5SUM(APPLET_NOEXEC(md5sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, md5sum)) | ||
209 | IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP)) | 208 | IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP)) |
210 | IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, BB_DIR_BIN, BB_SUID_DROP, mkdir)) | 209 | IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, BB_DIR_BIN, BB_SUID_DROP, mkdir)) |
211 | IF_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, BB_DIR_SBIN, BB_SUID_DROP, mkfs_vfat)) | 210 | IF_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, BB_DIR_SBIN, BB_SUID_DROP, mkfs_vfat)) |
@@ -280,10 +279,6 @@ IF_SETKEYCODES(APPLET(setkeycodes, BB_DIR_USR_BIN, BB_SUID_DROP)) | |||
280 | IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 279 | IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
281 | IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 280 | IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
282 | IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP)) | 281 | IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP)) |
283 | IF_SHA1SUM(APPLET_NOEXEC(sha1sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha1sum)) | ||
284 | IF_SHA3SUM(APPLET_NOEXEC(sha3sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha3sum)) | ||
285 | IF_SHA256SUM(APPLET_NOEXEC(sha256sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha256sum)) | ||
286 | IF_SHA512SUM(APPLET_NOEXEC(sha512sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha512sum)) | ||
287 | IF_SHOWKEY(APPLET(showkey, BB_DIR_USR_BIN, BB_SUID_DROP)) | 282 | IF_SHOWKEY(APPLET(showkey, BB_DIR_USR_BIN, BB_SUID_DROP)) |
288 | IF_SLATTACH(APPLET(slattach, BB_DIR_SBIN, BB_SUID_DROP)) | 283 | IF_SLATTACH(APPLET(slattach, BB_DIR_SBIN, BB_SUID_DROP)) |
289 | /* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells: */ | 284 | /* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells: */ |
diff --git a/include/busybox.h b/include/busybox.h index 737627bd0..6a003d544 100644 --- a/include/busybox.h +++ b/include/busybox.h | |||
@@ -19,7 +19,9 @@ extern const uint8_t applet_flags[] ALIGN1; | |||
19 | extern const uint8_t applet_suid[] ALIGN1; | 19 | extern const uint8_t applet_suid[] ALIGN1; |
20 | extern const uint8_t applet_install_loc[] ALIGN1; | 20 | extern const uint8_t applet_install_loc[] ALIGN1; |
21 | 21 | ||
22 | #if ENABLE_FEATURE_PREFER_APPLETS | 22 | #if ENABLE_FEATURE_PREFER_APPLETS \ |
23 | || ENABLE_FEATURE_SH_STANDALONE \ | ||
24 | || ENABLE_FEATURE_SH_NOFORK | ||
23 | # define APPLET_IS_NOFORK(i) (applet_flags[(i)/4] & (1 << (2 * ((i)%4)))) | 25 | # define APPLET_IS_NOFORK(i) (applet_flags[(i)/4] & (1 << (2 * ((i)%4)))) |
24 | # define APPLET_IS_NOEXEC(i) (applet_flags[(i)/4] & (1 << ((2 * ((i)%4))+1))) | 26 | # define APPLET_IS_NOEXEC(i) (applet_flags[(i)/4] & (1 << ((2 * ((i)%4))+1))) |
25 | #else | 27 | #else |
diff --git a/include/libbb.h b/include/libbb.h index 6db03d2df..30a0e00ba 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -196,24 +196,33 @@ int klogctl(int type, char *b, int len); | |||
196 | /* Busybox does not use threads, we can speed up stdio. */ | 196 | /* Busybox does not use threads, we can speed up stdio. */ |
197 | #ifdef HAVE_UNLOCKED_STDIO | 197 | #ifdef HAVE_UNLOCKED_STDIO |
198 | # undef getc | 198 | # undef getc |
199 | # define getc(stream) getc_unlocked(stream) | 199 | # define getc(stream) getc_unlocked(stream) |
200 | # undef getchar | 200 | # undef getchar |
201 | # define getchar() getchar_unlocked() | 201 | # define getchar() getchar_unlocked() |
202 | # undef putc | 202 | # undef putc |
203 | # define putc(c, stream) putc_unlocked(c, stream) | 203 | # define putc(c,stream) putc_unlocked(c,stream) |
204 | # undef putchar | 204 | # undef putchar |
205 | # define putchar(c) putchar_unlocked(c) | 205 | # define putchar(c) putchar_unlocked(c) |
206 | # undef fgetc | 206 | # undef fgetc |
207 | # define fgetc(stream) getc_unlocked(stream) | 207 | # define fgetc(stream) getc_unlocked(stream) |
208 | # undef fputc | 208 | # undef fputc |
209 | # define fputc(c, stream) putc_unlocked(c, stream) | 209 | # define fputc(c,stream) putc_unlocked(c,stream) |
210 | #endif | 210 | #endif |
211 | /* Above functions are required by POSIX.1-2008, below ones are extensions */ | 211 | /* Above functions are required by POSIX.1-2008, below ones are extensions */ |
212 | #ifdef HAVE_UNLOCKED_LINE_OPS | 212 | #ifdef HAVE_UNLOCKED_LINE_OPS |
213 | # undef fgets | 213 | # undef fgets |
214 | # define fgets(s, n, stream) fgets_unlocked(s, n, stream) | 214 | # define fgets(s,n,stream) fgets_unlocked(s,n,stream) |
215 | # undef fputs | 215 | # undef fputs |
216 | # define fputs(s, stream) fputs_unlocked(s, stream) | 216 | # define fputs(s,stream) fputs_unlocked(s,stream) |
217 | /* musl <= 1.1.15 does not support fflush_unlocked(NULL) */ | ||
218 | //# undef fflush | ||
219 | //# define fflush(stream) fflush_unlocked(stream) | ||
220 | # undef feof | ||
221 | # define feof(stream) feof_unlocked(stream) | ||
222 | # undef ferror | ||
223 | # define ferror(stream) ferror_unlocked(stream) | ||
224 | # undef fileno | ||
225 | # define fileno(stream) fileno_unlocked(stream) | ||
217 | #endif | 226 | #endif |
218 | 227 | ||
219 | 228 | ||
@@ -1755,6 +1764,7 @@ typedef struct sha512_ctx_t { | |||
1755 | typedef struct sha3_ctx_t { | 1764 | typedef struct sha3_ctx_t { |
1756 | uint64_t state[25]; | 1765 | uint64_t state[25]; |
1757 | unsigned bytes_queued; | 1766 | unsigned bytes_queued; |
1767 | unsigned input_block_bytes; | ||
1758 | } sha3_ctx_t; | 1768 | } sha3_ctx_t; |
1759 | void md5_begin(md5_ctx_t *ctx) FAST_FUNC; | 1769 | void md5_begin(md5_ctx_t *ctx) FAST_FUNC; |
1760 | void md5_hash(md5_ctx_t *ctx, const void *buffer, size_t len) FAST_FUNC; | 1770 | void md5_hash(md5_ctx_t *ctx, const void *buffer, size_t len) FAST_FUNC; |