diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-07-17 21:26:52 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-07-17 21:26:52 -0400 |
commit | d1746995e5aa1497d46ad95726918233713a7b6d (patch) | |
tree | 7678d2208d23cafc64827184ac03b272fef0c898 | |
parent | 4de3158c80864aa130ac6f701f4c28a2aa7bbf20 (diff) |
move authentication to separate file
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | auth.c | 11 | ||||
-rw-r--r-- | blog.c | 6 |
3 files changed, 12 insertions, 7 deletions
@@ -1,7 +1,7 @@ .POSIX: CFLAGS=-static -OBJECTS=blog.o post.o +OBJECTS=blog.o post.o auth.o all: blog @@ -0,0 +1,11 @@ +#define _XOPEN_SOURCE 700 +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "blog.h" + +int verify_creds(const char *username, const char *password) +{ + printf("verifying '%s'/'%s'\n", username ? username : "", password ? password : ""); + return 1; +} @@ -6,12 +6,6 @@ extern char **environ; -int verify_creds(const char *username, const char *password) -{ - printf("verifying '%s'/'%s'\n", username ? username : "", password ? password : ""); - return 1; -} - int handle_post(void) { |