summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndi Shyti <andi@etezian.org>2012-09-03 23:09:01 +0200
committerAndi Shyti <andi@etezian.org>2012-09-03 23:09:01 +0200
commit2ed56f94b88114f2d7158bc1064fa42795ed3b34 (patch)
tree43a0784f9d54934d8daee6f18ae98e04d6ad12a5 /include
parent54d806c7bbb6a280a62462153fd439f2f99ceb3c (diff)
accman: added function get password
the get_passwd function performs the following operations: - gets the password - checks if the lenght is greater than 64 or lower than 8, if so, fails - asks for the confirmation - encrypts it in SHA256 - returns the encrypted password Signed-off-by: Andi Shyti <andi@etezian.org>
Diffstat (limited to 'include')
-rw-r--r--include/accman.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/accman.h b/include/accman.h
index 27bfe2b..b8438bc 100644
--- a/include/accman.h
+++ b/include/accman.h
@@ -8,6 +8,9 @@
#define MDOMAIN "@"DOMAIN
#define DIM_MDOM 12
+#define MIN_PASSWD_LEN 8
+#define MAX_PASSWD_LEN 64
+
struct user {
char *n;
char *p;