blob: 0f3ee6f36ad3b4f03f75fb1e3711793d99670ecc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# 9P files served by the `authfs` daemon
`users/`
`<username>/`
`passwd`
`passwdhash`
`login`
`sessions/`
`<id>/`
`user`
`/users/<username>/` (d)
To add a user, create the `<username>` subdirectory. Authfs
automatically creates the `passwd`, `passwd`, and `login` files
inside.
`/users/<username>/passwd` (w)
Writing a (cleartext) password changes the user's password.
`/users/<username>/passwdhash` (r)
Read returns an Argon2id hash of the user's password (see
github.com/alexedwards/argon2id).
`/users/<username>/login` (rw)
To log in and obtain a session, write the user's password to `login`
(in cleartext). Then read from `login`. If the password was correct,
the read will return a session `<id>` corresponding to a directory
under `/sessions/`. Otherwise if the password was incorrect, the read
returns `Rerror`.
`/sessions/<id>/user` (r)
Read returns the `<username>` of the user who owns the session
identified by `<id>`.
|