[mw-devel] [Git][arthur/mw][userdb] some witterings about where we are
Justin Mitchell
arthur at sucs.org
Wed Aug 10 17:21:46 BST 2016
Justin Mitchell pushed to branch userdb at Justin Mitchell / mw
Commits:
e9fa0c2e by Justin Mitchell at 2016-08-10T17:22:58+01:00
some witterings about where we are
- - - - -
2 changed files:
- + src/TODO
- + src/server/user.h
Changes:
=====================================
src/TODO
=====================================
--- /dev/null
+++ b/src/TODO
@@ -0,0 +1,17 @@
+Things that still need to be done
+
+* Remove the global 'user' variable in the client
+ - this needs to be replaced with looking values up some other way
+ - should fetch a copy of the user record (ala who list) from the
+ server and keep it cached.
+ - update cached record whenever you get an IPC_CHANGE update
+
+* put in some proper encryption / auth mechanism so we dont wind
+ up potentially passing plaintext passwords around
+
+* check that the server is now logging all the things a user
+ says an does, client shouldnt really be logging anything much
+
+* have server perform the mwuri lookups and logging
+
+* final big change would be to have the server do the bbs features as well
=====================================
src/server/user.h
=====================================
--- /dev/null
+++ b/src/server/user.h
@@ -0,0 +1,22 @@
+#ifndef SUSER_H
+#define SUSER_H
+
+#include <stdint.h>
+#include <time.h>
+#include <user.h>
+
+extern int userdb_open(int flags);
+extern void userdb_write(struct user *user);
+extern int fetch_user(struct user *record, int32_t userposn);
+extern int fetch_first_user(int fd, struct user *user);
+extern int fetch_next_user(int fd, struct user *user);
+extern void update_user(struct user *user);
+extern int update_user_fd(int fd, struct user *user);
+extern int user_exists(const char *name, struct user *user);
+
+#define for_each_user(userp, fd, status) \
+ for((status) = fetch_first_user((fd), (userp)); \
+ (status) == 0; \
+ (status) = fetch_next_user((fd), (userp)))
+
+#endif
View it on GitLab: https://projects.sucs.org/arthur/mw/commit/e9fa0c2ec8b0ff34b87f272dc91f5fe4460eb5eb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20160810/17b34c3b/attachment-0001.html>
More information about the mw-devel
mailing list