diff options
author | Ron Yorston <rmy@pobox.com> | 2014-01-02 10:25:11 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2014-01-02 10:25:11 +0000 |
commit | b8f278ee745778806118f57fb7884d205eba05ad (patch) | |
tree | fef237f6dd302c59918cf389a60c120e58d3e086 /include/libbb.h | |
parent | 3fd34651ea72ea1c335d3170f234cb0517fd897f (diff) | |
parent | 57434022cefde87133b8ad39fb3b79c1274e7684 (diff) | |
download | busybox-w32-b8f278ee745778806118f57fb7884d205eba05ad.tar.gz busybox-w32-b8f278ee745778806118f57fb7884d205eba05ad.tar.bz2 busybox-w32-b8f278ee745778806118f57fb7884d205eba05ad.zip |
Merge branch 'busybox' into merge
Conflicts:
archival/Config.src
shell/ash.c
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/include/libbb.h b/include/libbb.h index 9adb037ca..e516f0ee3 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -32,12 +32,12 @@ | |||
32 | #include <stdarg.h> | 32 | #include <stdarg.h> |
33 | #include <stddef.h> | 33 | #include <stddef.h> |
34 | #include <string.h> | 34 | #include <string.h> |
35 | /* There are two incompatible basename's, let not use them! */ | 35 | /* There are two incompatible basename's, let's not use them! */ |
36 | /* See the dirname/basename man page for details */ | 36 | /* See the dirname/basename man page for details */ |
37 | #include <libgen.h> /* dirname,basename */ | 37 | #include <libgen.h> /* dirname,basename */ |
38 | #undef basename | 38 | #undef basename |
39 | #define basename dont_use_basename | 39 | #define basename dont_use_basename |
40 | #include <sys/poll.h> | 40 | #include <poll.h> |
41 | #include <sys/ioctl.h> | 41 | #include <sys/ioctl.h> |
42 | #include <sys/mman.h> | 42 | #include <sys/mman.h> |
43 | #include <sys/socket.h> | 43 | #include <sys/socket.h> |
@@ -474,6 +474,8 @@ void record_signo(int signo); /* not FAST_FUNC! */ | |||
474 | 474 | ||
475 | void xsetgid(gid_t gid) FAST_FUNC; | 475 | void xsetgid(gid_t gid) FAST_FUNC; |
476 | void xsetuid(uid_t uid) FAST_FUNC; | 476 | void xsetuid(uid_t uid) FAST_FUNC; |
477 | void xsetegid(gid_t egid) FAST_FUNC; | ||
478 | void xseteuid(uid_t euid) FAST_FUNC; | ||
477 | void xchdir(const char *path) FAST_FUNC; | 479 | void xchdir(const char *path) FAST_FUNC; |
478 | void xchroot(const char *path) FAST_FUNC; | 480 | void xchroot(const char *path) FAST_FUNC; |
479 | void xsetenv(const char *key, const char *value) FAST_FUNC; | 481 | void xsetenv(const char *key, const char *value) FAST_FUNC; |
@@ -482,11 +484,12 @@ void bb_unsetenv_and_free(char *key) FAST_FUNC; | |||
482 | void xunlink(const char *pathname) FAST_FUNC; | 484 | void xunlink(const char *pathname) FAST_FUNC; |
483 | void xstat(const char *pathname, struct stat *buf) FAST_FUNC; | 485 | void xstat(const char *pathname, struct stat *buf) FAST_FUNC; |
484 | void xfstat(int fd, struct stat *buf, const char *errmsg) FAST_FUNC; | 486 | void xfstat(int fd, struct stat *buf, const char *errmsg) FAST_FUNC; |
487 | int open3_or_warn(const char *pathname, int flags, int mode) FAST_FUNC; | ||
488 | int open_or_warn(const char *pathname, int flags) FAST_FUNC; | ||
489 | int xopen3(const char *pathname, int flags, int mode) FAST_FUNC; | ||
485 | int xopen(const char *pathname, int flags) FAST_FUNC; | 490 | int xopen(const char *pathname, int flags) FAST_FUNC; |
486 | int xopen_nonblocking(const char *pathname) FAST_FUNC; | 491 | int xopen_nonblocking(const char *pathname) FAST_FUNC; |
487 | int xopen3(const char *pathname, int flags, int mode) FAST_FUNC; | 492 | int xopen_as_uid_gid(const char *pathname, int flags, uid_t u, gid_t g) FAST_FUNC; |
488 | int open_or_warn(const char *pathname, int flags) FAST_FUNC; | ||
489 | int open3_or_warn(const char *pathname, int flags, int mode) FAST_FUNC; | ||
490 | int open_or_warn_stdin(const char *pathname) FAST_FUNC; | 493 | int open_or_warn_stdin(const char *pathname) FAST_FUNC; |
491 | int xopen_stdin(const char *pathname) FAST_FUNC; | 494 | int xopen_stdin(const char *pathname) FAST_FUNC; |
492 | void xrename(const char *oldpath, const char *newpath) FAST_FUNC; | 495 | void xrename(const char *oldpath, const char *newpath) FAST_FUNC; |
@@ -831,8 +834,8 @@ char *itoa(int n) FAST_FUNC; | |||
831 | char *utoa_to_buf(unsigned n, char *buf, unsigned buflen) FAST_FUNC; | 834 | char *utoa_to_buf(unsigned n, char *buf, unsigned buflen) FAST_FUNC; |
832 | char *itoa_to_buf(int n, char *buf, unsigned buflen) FAST_FUNC; | 835 | char *itoa_to_buf(int n, char *buf, unsigned buflen) FAST_FUNC; |
833 | /* Intelligent formatters of bignums */ | 836 | /* Intelligent formatters of bignums */ |
834 | void smart_ulltoa4(unsigned long long ul, char buf[4], const char *scale) FAST_FUNC; | 837 | char *smart_ulltoa4(unsigned long long ul, char buf[4], const char *scale) FAST_FUNC; |
835 | void smart_ulltoa5(unsigned long long ul, char buf[5], const char *scale) FAST_FUNC; | 838 | char *smart_ulltoa5(unsigned long long ul, char buf[5], const char *scale) FAST_FUNC; |
836 | /* If block_size == 0, display size without fractional part, | 839 | /* If block_size == 0, display size without fractional part, |
837 | * else display (size * block_size) with one decimal digit. | 840 | * else display (size * block_size) with one decimal digit. |
838 | * If display_unit == 0, show value no bigger than 1024 with suffix (K,M,G...), | 841 | * If display_unit == 0, show value no bigger than 1024 with suffix (K,M,G...), |
@@ -1313,8 +1316,10 @@ int sd_listen_fds(void); | |||
1313 | #define SETUP_ENV_CLEARENV (1 << 1) | 1316 | #define SETUP_ENV_CLEARENV (1 << 1) |
1314 | #define SETUP_ENV_TO_TMP (1 << 2) | 1317 | #define SETUP_ENV_TO_TMP (1 << 2) |
1315 | #define SETUP_ENV_NO_CHDIR (1 << 4) | 1318 | #define SETUP_ENV_NO_CHDIR (1 << 4) |
1316 | extern void setup_environment(const char *shell, int flags, const struct passwd *pw) FAST_FUNC; | 1319 | void setup_environment(const char *shell, int flags, const struct passwd *pw) FAST_FUNC; |
1317 | extern int correct_password(const struct passwd *pw) FAST_FUNC; | 1320 | void nuke_str(char *str) FAST_FUNC; |
1321 | int ask_and_check_password_extended(const struct passwd *pw, int timeout, const char *prompt) FAST_FUNC; | ||
1322 | int ask_and_check_password(const struct passwd *pw) FAST_FUNC; | ||
1318 | /* Returns a malloced string */ | 1323 | /* Returns a malloced string */ |
1319 | #if !ENABLE_USE_BB_CRYPT | 1324 | #if !ENABLE_USE_BB_CRYPT |
1320 | #define pw_encrypt(clear, salt, cleanup) pw_encrypt(clear, salt) | 1325 | #define pw_encrypt(clear, salt, cleanup) pw_encrypt(clear, salt) |
@@ -1793,6 +1798,11 @@ extern struct globals *const ptr_to_globals; | |||
1793 | (*(struct globals**)&ptr_to_globals) = (void*)(x); \ | 1798 | (*(struct globals**)&ptr_to_globals) = (void*)(x); \ |
1794 | barrier(); \ | 1799 | barrier(); \ |
1795 | } while (0) | 1800 | } while (0) |
1801 | #define FREE_PTR_TO_GLOBALS() do { \ | ||
1802 | if (ENABLE_FEATURE_CLEAN_UP) { \ | ||
1803 | free(ptr_to_globals); \ | ||
1804 | } \ | ||
1805 | } while (0) | ||
1796 | 1806 | ||
1797 | /* You can change LIBBB_DEFAULT_LOGIN_SHELL, but don't use it, | 1807 | /* You can change LIBBB_DEFAULT_LOGIN_SHELL, but don't use it, |
1798 | * use bb_default_login_shell and following defines. | 1808 | * use bb_default_login_shell and following defines. |