wm: teppich

Download patch

ref: 5c52ce22504688695f87ba4730990c51fa3cde56
parent: 87aea719c1983d7a9c5297d4a52630d8b8dbe5ea
author: mkf <mkf@cloud9p.org>
date: Sun Dec 3 15:51:09 EST 2023

user.h: use extern for data, define PASSWD_MAX, use adler32 for password

--- a/include/user.h
+++ b/include/user.h
@@ -1,15 +1,15 @@
+#pragma once
+#define PASSWD_MAX 16
+
 typedef struct
 {
 	uint8 id;
 	char *name;
-	char *pass;
+	long pass; /* adler32 hash */
 }user_t;
 
-static user_t cuser;
+extern ll_t *users;
+extern user_t cuser;
+extern user_t adam;
 
-static user_t adam =
-{
-	.id = 1,
-	.name = "adam",
-	.pass = "",
-};
+void users_init(void);