summaryrefslogtreecommitdiffhomepage
path: root/fuzz.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-11-16 22:44:30 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-11-16 22:44:30 +0800
commit3c88d6536a61776e65b4d8f05e985cb0a65d9d1d (patch)
tree9e9e79d7e41cdb86b7d54e37044961eecd158d6a /fuzz.h
parentf49b576e930eb323f238785137537ae7395ecf96 (diff)
fuzzing: add workaround getpwuid/getpwnam
Diffstat (limited to 'fuzz.h')
-rw-r--r--fuzz.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fuzz.h b/fuzz.h
index e23444e..cc013cb 100644
--- a/fuzz.h
+++ b/fuzz.h
@@ -99,6 +99,14 @@ extern struct dropbear_fuzz_options fuzz;
#endif /* FUZZ_NO_REPLACE_STDERR */
+struct passwd* fuzz_getpwuid(uid_t uid);
+struct passwd* fuzz_getpwnam(const char *login);
+/* guard for when fuzz.h is included by fuzz-common.c */
+#ifndef FUZZ_NO_REPLACE_GETPW
+#define getpwnam(x) fuzz_getpwnam(x)
+#define getpwuid(x) fuzz_getpwuid(x)
+#endif // FUZZ_NO_REPLACE_GETPW
+
#endif // DROPBEAR_FUZZ
#endif /* DROPBEAR_FUZZ_H */