sw1tchbl4d3
4ed6a6d75a
Fix memory leak in getconf()
...
As getline() calls malloc() to allocate new memory
for our usage, we have to free() it after.
2021-07-18 23:34:31 +02:00
remoof
f2137dc28d
Add version and usage if no arguments are given.
2021-07-18 23:04:45 +02:00
sw1tchbl4d3
95b3581737
Normalize the way we check for errors
2021-07-16 00:38:50 +02:00
sw1tchbl4d3
e1147f4c7c
Don't multiply session_ttl by 100
2021-07-16 00:15:04 +02:00
sw1tchbl4d3
24638bc999
Add sessions feature
...
This is by far the heaviest feature of rdo, justifying
its own file for its 140loc.
It creates sessions, inspired by the way doas does it.
We use the /run/rdo temporary folder to store files in the
format of /run/rdo/pid-ts, pid being the PID of the process
that executed rdo, and ts being the timestamp at which said
process started.
As no 2 processes can have the exact same PID and startup time
(startup time is measured in the milliseconds), this seems secure.
Closes #4 .
2021-07-15 23:47:27 +02:00
sw1tchbl4d3
2f4ff0812a
Move type declerations to start of main
2021-07-15 16:17:54 +02:00
remoof
9948bd3fc7
Check uid before opening file
2021-07-15 15:43:06 +02:00
remoof
a657d0c2f5
Removed extra whitespace
2021-07-15 12:46:27 +02:00
sw1tchbl4d3
61ebaafd0a
Check return values of setuid() and setgid()
2021-07-14 06:12:50 +02:00
sw1tchbl4d3
9fa1190f7d
Add sleep between wrong password attempts
...
This is required for #1
2021-07-13 23:42:11 +02:00
sw1tchbl4d3
a12c72a26a
Add error message for faulty config
2021-07-13 23:31:23 +02:00
sw1tchbl4d3
f5bfafe269
Add config for rdo
...
This is needed for #1 .
2021-07-13 23:21:34 +02:00
sw1tchbl4d3
3e4ffde3a4
Fix formatting in rdo.c
2021-07-13 22:46:57 +02:00
sw1tchbl4d3
604f5e7fdd
Improve error messages
...
This commit makes rdo make use of the err.h header
for more pleasant and convenient error logging.
2021-07-13 22:39:28 +02:00
sw1tchbl4d3
336221e5e2
Get passphrase from TTY
...
This is required for #1 .
2021-07-13 22:23:27 +02:00
sw1tchbl4d3
dcd1e4061c
Fix various formatting mistakes in rdo.c
2021-07-13 22:14:46 +02:00
sw1tchbl4d3
f63e1b660a
First Commit
2021-07-13 21:33:12 +02:00