- /* Write the salt */
- snprintf(filename, FILENAME_MAX, "%s/%s/password_salt", blergconf.data_path, username);
- fd = open(filename, O_WRONLY | O_CREAT, 0600);
- write(fd, salt, SCRYPT_SALT_SIZE);
- close(fd);
-
- /* Mark this as a version 1 password */
- snprintf(filename, FILENAME_MAX, "%s/%s/password_version", blergconf.data_path, username);
- fd = open(filename, O_WRONLY | O_CREAT, 0600);
- write(fd, "1\n", 2);
- close(fd);
-