Sanitize strings that we get from the cloud backends
This commit is contained in:
parent
5beee43d49
commit
29193e306f
6 changed files with 112 additions and 27 deletions
12
agent/main.h
12
agent/main.h
|
|
@ -24,6 +24,12 @@
|
|||
|
||||
#include "http.h"
|
||||
|
||||
enum strtype {
|
||||
WORD,
|
||||
LINE,
|
||||
TEXT
|
||||
};
|
||||
|
||||
struct ssh_pubkey {
|
||||
char *ssh_keyval;
|
||||
char *ssh_keyfp;
|
||||
|
|
@ -37,8 +43,7 @@ struct system_config {
|
|||
char *sc_username;
|
||||
char *sc_password;
|
||||
char *sc_pubkey;
|
||||
unsigned char *sc_userdata;
|
||||
size_t sc_userdatalen;
|
||||
char *sc_userdata;
|
||||
char *sc_endpoint;
|
||||
char *sc_instance;
|
||||
|
||||
|
|
@ -65,6 +70,9 @@ int shell(const char *, ...);
|
|||
int shellout(const char *, char **, const char *, ...);
|
||||
int disable_output(struct system_config *, int);
|
||||
int enable_output(struct system_config *, int, int);
|
||||
char *get_string(u_int8_t *, size_t);
|
||||
char *get_line(u_int8_t *, size_t);
|
||||
char *get_word(u_int8_t *, size_t);
|
||||
int agent_addpubkey(struct system_config *, const char *, const char *);
|
||||
int agent_setpubkey(struct system_config *, const char *, const char *);
|
||||
int agent_configure(struct system_config *, int);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue