Mercurial > hg > toybox
comparison lib/pending.h @ 1500:cf77c4939385 draft
The only illegal characters in a username are ":" (field separator), "\n" (line separator), and "/" (filename separator).
Restricting usernames to the legacy posix character allowed set (for filenames,
so the $HOME directory is creatable on VFAT and similar) means you can't have
UTF-8 usernames. Linux allows any character but / and NUL in filenames.
Since root is creating these entries, we assume root knows what it's doing.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 26 Sep 2014 18:49:44 -0500 |
parents | ed28d4d9558d |
children |
comparison
equal
deleted
inserted
replaced
1499:319e79bab052 | 1500:cf77c4939385 |
---|---|
1 // pending.h - header for pending.c | 1 // pending.h - header for pending.c |
2 | 2 |
3 // password.c | 3 // password.c |
4 #define MAX_SALT_LEN 20 //3 for id, 16 for key, 1 for '\0' | 4 #define MAX_SALT_LEN 20 //3 for id, 16 for key, 1 for '\0' |
5 void is_valid_username(const char *name); | |
6 int read_password(char * buff, int buflen, char* mesg); | 5 int read_password(char * buff, int buflen, char* mesg); |
7 int update_password(char *filename, char* username, char* encrypted); | 6 int update_password(char *filename, char* username, char* encrypted); |