Remove unwanted comments, run through indent
[oweals/busybox.git] / include / libbb.h
index 8dadfd9584048e1a79d2ddaba15001c9fd76bbae..0bc35641526e2f0be3f0c6d2568e23e64a43dd9d 100644 (file)
 
 #include <features.h>
 
+#include "config.h"
+
+#include "pwd_.h"
+#include "grp_.h"
+#ifdef CONFIG_FEATURE_SHADOWPASSWDS
+#include "shadow_.h"
+#endif
+#ifdef CONFIG_FEATURE_SHA1_PASSWORDS
+# include "sha1.h"
+#endif
+
+
 #if (__GNU_LIBRARY__ < 5) && (!defined __dietlibc__)
 /* libc5 doesn't define socklen_t */
 typedef unsigned int socklen_t;
@@ -58,9 +70,6 @@ char *strtok_r(char *s, const char *delim, char **ptrptr);
 #define BUF_SIZE        8192
 #define EXPAND_ALLOC    1024
 
-static inline int is_decimal(int ch) { return ((ch >= '0') && (ch <= '9')); }
-static inline int is_octal(int ch)   { return ((ch >= '0') && (ch <= '7')); }
-
 /* Macros for min/max.  */
 #ifndef MIN
 #define        MIN(a,b) (((a)<(b))?(a):(b))
@@ -221,7 +230,10 @@ extern void gz_close(int gunzip_pid);
 extern FILE *gz_open(FILE *compressed_file, int *pid);
 
 extern struct hostent *xgethostbyname(const char *name);
+extern struct hostent *xgethostbyname2(const char *name, int af);
 extern int create_icmp_socket(void);
+extern int create_icmp6_socket(void);
+extern int xconnect(const char *host, const char *port);
 
 char *dirname (char *path);
 
@@ -258,6 +270,15 @@ extern const char * const too_few_args;
 extern const char * const name_longer_than_foo;
 extern const char * const unknown;
 extern const char * const can_not_create_raw_socket;
+extern const char * const nologin_file;
+extern const char * const passwd_file;
+extern const char * const shadow_file;
+extern const char * const gshadow_file;
+extern const char * const group_file;
+extern const char * const securetty_file;
+extern const char * const motd_file;
+extern const char * const issue_file;
+extern const char * const _path_login;
 
 #ifdef CONFIG_FEATURE_DEVFS
 # define CURRENT_VC "/dev/vc/0"
@@ -270,6 +291,7 @@ extern const char * const can_not_create_raw_socket;
 # define SC_1 "/dev/tts/1"
 # define VC_FORMAT "/dev/vc/%d"
 # define SC_FORMAT "/dev/tts/%d"
+# define LOOP_FORMAT "/dev/loop/%d"
 #else
 # define CURRENT_VC "/dev/tty0"
 # define VC_1 "/dev/tty1"
@@ -281,6 +303,7 @@ extern const char * const can_not_create_raw_socket;
 # define SC_1 "/dev/ttyS1"
 # define VC_FORMAT "/dev/tty%d"
 # define SC_FORMAT "/dev/ttyS%d"
+# define LOOP_FORMAT "/dev/loop%d"
 #endif
 
 /* The following devices are the same on devfs and non-devfs systems.  */
@@ -291,4 +314,21 @@ int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name);
 void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name);
 void reset_ino_dev_hashtable(void);
 
+/* Stupid gcc always includes its own builtin strlen()... */
+extern size_t xstrlen(const char *string);
+#define strlen(x)   xstrlen(x)
+
+void bb_asprintf(char **string_ptr, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
+
+
+#define FAIL_DELAY    3
+extern void change_identity ( const struct passwd *pw );
+extern void run_shell ( const char *shell, int loginshell, const char *command, const char **additional_args );
+extern int restricted_shell ( const char *shell );
+extern void setup_environment ( const char *shell, int loginshell, int changeenv, const struct passwd *pw );
+extern int correct_password ( const struct passwd *pw );
+extern char *pw_encrypt(const char *clear, const char *salt);
+extern struct spwd *pwd_to_spwd(const struct passwd *pw);
+extern int obscure(const char *old, const char *newval, const struct passwd *pwdp);
+
 #endif /* __LIBCONFIG_H__ */