diff fuzz.h @ 1745:a6824c54962a

Merge fuzz branch
author Matt Johnston <matt@ucc.asn.au>
date Sun, 18 Oct 2020 22:53:44 +0800
parents d1b279aa5ed1
children 28ab2cdb84bf
line wrap: on
line diff
--- a/fuzz.h	Thu Oct 08 11:00:04 2020 +0800
+++ b/fuzz.h	Sun Oct 18 22:53:44 2020 +0800
@@ -13,6 +13,7 @@
 // once per process
 void fuzz_common_setup(void);
 void fuzz_svr_setup(void);
+void fuzz_cli_setup(void);
 
 // must be called once per fuzz iteration. 
 // returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE
@@ -28,9 +29,12 @@
         const unsigned char* keyblob, unsigned int keybloblen);
 extern const char * const * fuzz_signkey_names;
 void fuzz_seed(void);
+
+// helpers
 void fuzz_get_socket_address(int fd, char **local_host, char **local_port,
                         char **remote_host, char **remote_port, int host_lookup);
 void fuzz_fake_send_kexdh_reply(void);
+int fuzz_spawn_command(int *ret_writefd, int *ret_readfd, int *ret_errfd, pid_t *ret_pid);
 
 // fake IO wrappers
 #ifndef FUZZ_SKIP_WRAP
@@ -56,13 +60,6 @@
     // dropbear_exit() jumps back
     int do_jmp;
     sigjmp_buf jmp;
-
-    uid_t pw_uid;
-    gid_t pw_gid;
-    char* pw_name;
-    char* pw_dir;
-    char* pw_shell;
-    char* pw_passwd;
 };
 
 extern struct dropbear_fuzz_options fuzz;