summaryrefslogtreecommitdiff
path: root/nest/password.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2015-02-21 11:39:45 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2015-02-21 11:39:45 +0100
commit7730553b7eeb33d21e5597f110334ca584ad532d (patch)
treec80bf6d48fc91bafd7f0aefc859a033d3b472c89 /nest/password.h
parent0da562a7cb25ed2b8724248ad6f841b1831a09c3 (diff)
parentec2194fa7a20a2768ca0027b5f3c024f0a251866 (diff)
Merge remote-tracking branch 'origin/soft-int'
Diffstat (limited to 'nest/password.h')
-rw-r--r--nest/password.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/nest/password.h b/nest/password.h
index 726af733..cd120d70 100644
--- a/nest/password.h
+++ b/nest/password.h
@@ -23,6 +23,13 @@ struct password_item {
extern struct password_item *last_password_item;
struct password_item *password_find(list *l, int first_fit);
-void password_cpy(char *dst, char *src, int size);
+struct password_item *password_find_by_id(list *l, int id);
+
+static inline int password_verify(struct password_item *p1, char *p2, uint size)
+{
+ char buf[size];
+ strncpy(buf, p1->password, size);
+ return !memcmp(buf, p2, size);
+}
#endif