9 int auth_set_password(const char *username, const char *password) {
13 if (!blerg_exists(username))
16 snprintf(filename, 512, "%s/%s/password", DATA_PATH, username);
17 fd = open(filename, O_WRONLY | O_CREAT, 0600);
18 write(fd, password, strlen(password));
24 int auth_check_password(const char *username, const char *password) {
29 sprintf(filename, "%s/%s/password", DATA_PATH, username);
30 fd = open(filename, O_RDONLY);
33 len = read(fd, password, 32);
36 if (strncmp(password, epw, 32) == 0)