summaryrefslogtreecommitdiff
path: root/auth.h
diff options
context:
space:
mode:
authorstderr64 <linuxwizard@voidnet.dy.fi>2023-08-17 21:19:10 +0300
committerstderr64 <linuxwizard@voidnet.dy.fi>2023-08-17 21:19:10 +0300
commitf484331cf374031f68566162f16ba00eedc1b7f0 (patch)
treec5632b5b7c574bf31642cdec12a409adfbabb31c /auth.h
downloadCWebHook-f484331cf374031f68566162f16ba00eedc1b7f0.tar.gz
CWebHook-f484331cf374031f68566162f16ba00eedc1b7f0.tar.zst
Recreated repository
Diffstat (limited to 'auth.h')
-rw-r--r--auth.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/auth.h b/auth.h
new file mode 100644
index 0000000..0e5c0ea
--- /dev/null
+++ b/auth.h
@@ -0,0 +1,10 @@
+#define AUTH_SUCCESS 0
+#define AUTH_FAILED -1
+
+int check_password( char *pw, char *correct_pw ){
+ if ( pw == NULL || (uint64_t)strlen(pw) <= 0 )
+ return AUTH_FAILED;
+ if ( strcmp((const char*)pw, (const char*)correct_pw) != 0 )
+ return AUTH_FAILED;
+ return AUTH_SUCCESS;
+}