2020-10-09 14:36:03 +02:00
|
|
|
#ifndef KASMPASSWD_H
|
|
|
|
#define KASMPASSWD_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct kasmpasswd_entry_t {
|
|
|
|
char user[32];
|
|
|
|
char password[128];
|
2022-01-28 13:24:38 +01:00
|
|
|
unsigned char read : 1;
|
2020-10-09 14:36:03 +02:00
|
|
|
unsigned char write : 1;
|
|
|
|
unsigned char owner : 1;
|
|
|
|
};
|
|
|
|
|
2022-01-24 17:42:29 +01:00
|
|
|
#define USERNAME_LEN sizeof(((struct kasmpasswd_entry_t *)0)->user)
|
|
|
|
#define PASSWORD_LEN sizeof(((struct kasmpasswd_entry_t *)0)->password)
|
|
|
|
|
2020-10-09 14:36:03 +02:00
|
|
|
struct kasmpasswd_t {
|
|
|
|
struct kasmpasswd_entry_t *entries;
|
|
|
|
unsigned num;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct kasmpasswd_t *readkasmpasswd(const char path[]);
|
|
|
|
void writekasmpasswd(const char path[], const struct kasmpasswd_t *set);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern C
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|