/* password.c - password read/update helper functions.
*
* Copyright 2012 Ashwini Kumar <ak.ashwini@gmail.com>
+ *
+ * TODO: cleanup
*/
#include "toys.h"
if (al[i].id) s += sprintf(s, "$%c$", '0'+al[i].id);
// Read appropriate number of random bytes for salt
- i = xopen("/dev/urandom", O_RDONLY);
+ i = xopenro("/dev/urandom");
xreadall(i, libbuf, ((len*6)+7)/8);
close(i);