diff options
author | Matt Johnston <matt@ucc.asn.au> | 2020-11-16 22:44:30 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2020-11-16 22:44:30 +0800 |
commit | 3c88d6536a61776e65b4d8f05e985cb0a65d9d1d (patch) | |
tree | 9e9e79d7e41cdb86b7d54e37044961eecd158d6a /fuzz.h | |
parent | f49b576e930eb323f238785137537ae7395ecf96 (diff) |
fuzzing: add workaround getpwuid/getpwnam
Diffstat (limited to 'fuzz.h')
-rw-r--r-- | fuzz.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 */ |