aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2025-02-14 09:17:24 +0100
committerdefault <nobody@localhost>2025-02-14 09:17:24 +0100
commit26d0f5cbc3e07ecec2418b3377d3597c610e5a70 (patch)
treeb722ef5230f2b1c3589fa6c8df78e3a12d920c05
parentfa9a6abf6095b8a0721cfba58d4d825e9d61a339 (diff)
Some variable renaming.
-rw-r--r--html.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/html.c b/html.c
index 42b9b48..94e55fd 100644
--- a/html.c
+++ b/html.c
@@ -17,7 +17,7 @@
#include "snac.h"
-int login(snac *snac, const xs_dict *headers)
+int login(snac *user, const xs_dict *headers)
/* tries a login */
{
int logged_in = 0;
@@ -31,23 +31,23 @@ int login(snac *snac, const xs_dict *headers)
xs *l1 = xs_split_n(s2, ":", 1);
if (xs_list_len(l1) == 2) {
- const char *user = xs_list_get(l1, 0);
+ const char *uid = xs_list_get(l1, 0);
const char *pwd = xs_list_get(l1, 1);
const char *addr = xs_or(xs_dict_get(headers, "remote-addr"),
xs_dict_get(headers, "x-forwarded-for"));
- if (badlogin_check(user, addr)) {
- logged_in = check_password(user, pwd,
- xs_dict_get(snac->config, "passwd"));
+ if (badlogin_check(uid, addr)) {
+ logged_in = check_password(uid, pwd,
+ xs_dict_get(user->config, "passwd"));
if (!logged_in)
- badlogin_inc(user, addr);
+ badlogin_inc(uid, addr);
}
}
}
if (logged_in)
- lastlog_write(snac, "web");
+ lastlog_write(user, "web");
return logged_in;
}