diff options
| author | SkyperTHC | 2026-03-03 06:28:55 +0000 |
|---|---|---|
| committer | SkyperTHC | 2026-03-03 06:28:55 +0000 |
| commit | 5d3573ef7a109ee70416fe94db098fe6a769a798 (patch) | |
| tree | dc2d5b294c9db8ab2db7433511f94e1c4bb8b698 /other/openssh-reverse/hostfile.h | |
| parent | c6c59dc73cc4586357f93ab38ecf459e98675cc5 (diff) | |
packetstorm sync
Diffstat (limited to 'other/openssh-reverse/hostfile.h')
| -rw-r--r-- | other/openssh-reverse/hostfile.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/other/openssh-reverse/hostfile.h b/other/openssh-reverse/hostfile.h new file mode 100644 index 0000000..c9bdd7f --- /dev/null +++ b/other/openssh-reverse/hostfile.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #ifndef HOSTFILE_H | ||
| 2 | #define HOSTFILE_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Checks whether the given host is already in the list of our known hosts. | ||
| 6 | * Returns HOST_OK if the host is known and has the specified key, HOST_NEW | ||
| 7 | * if the host is not known, and HOST_CHANGED if the host is known but used | ||
| 8 | * to have a different host key. The host must be in all lowercase. | ||
| 9 | */ | ||
| 10 | typedef enum { | ||
| 11 | HOST_OK, HOST_NEW, HOST_CHANGED | ||
| 12 | } HostStatus; | ||
| 13 | HostStatus | ||
| 14 | check_host_in_hostfile(const char *filename, const char *host, Key *key, Key *found); | ||
| 15 | |||
| 16 | /* | ||
| 17 | * Appends an entry to the host file. Returns false if the entry could not | ||
| 18 | * be appended. | ||
| 19 | */ | ||
| 20 | int add_host_to_hostfile(const char *filename, const char *host, Key *key); | ||
| 21 | |||
| 22 | #endif | ||
