Commit Graph

145 Commits

Author SHA1 Message Date
fa1d27e09c server: make use of database connection pool 2025-11-26 19:11:06 +09:00
20331a4429 server: refactor server logic into supervisor + session handler 2025-11-26 19:11:05 +09:00
f5ff50365f client: fix doccomment for edit-privs
All checks were successful
Build and test / check (push) Successful in 1m25s
Build and test / build (push) Successful in 3m0s
Build and test / test (push) Successful in 2m47s
Build and test / check-license (push) Successful in 5m44s
Build and test / docs (push) Successful in 5m54s
2025-11-26 14:10:42 +09:00
7fa6f6aafe server: add connection counter
All checks were successful
Build and test / check (push) Successful in 2m16s
Build and test / build (push) Successful in 2m43s
Build and test / check-license (push) Successful in 5m41s
Build and test / test (push) Successful in 3m37s
Build and test / docs (push) Successful in 5m4s
2025-11-26 13:51:07 +09:00
f9c5f1347e client: rename <verb>-db-privs -> <verb>-privs 2025-11-26 13:50:43 +09:00
a4acfe91af Rename project to muscl 2025-11-26 13:50:06 +09:00
805c2d11ff core/protocol: split commands into separate files
All checks were successful
Build and test / check (push) Successful in 2m8s
Build and test / build (push) Successful in 3m3s
Build and test / check-license (push) Successful in 4m58s
Build and test / test (push) Successful in 3m47s
Build and test / docs (push) Successful in 5m47s
2025-11-26 02:51:23 +09:00
c9815fe7de Remove tui stub
This should just be added later when (if) it is ever implemented
2025-11-26 02:08:31 +09:00
1571f6e2c7 core: split mysql user/db into separate types module 2025-11-26 02:03:18 +09:00
9e39401049 client: split commands into separate files 2025-11-26 01:51:08 +09:00
4fb60f8563 client: rename and merge user/db command modules 2025-11-26 01:25:47 +09:00
03a761a0ff Refactor privilege handling
All checks were successful
Build / check (push) Successful in 2m41s
Build / build (push) Successful in 3m5s
Build / docs (push) Successful in 5m37s
2025-11-25 19:20:46 +09:00
7760b001d8 Get rid of dependency on 'futures'
All checks were successful
Build / check (push) Successful in 1m32s
Build / build (push) Successful in 4m11s
Build / docs (push) Successful in 7m2s
2025-11-20 19:34:24 +09:00
30d02775c2 Make compile-time feature for SUID/SGID mode
All checks were successful
Build / check (push) Successful in 1m27s
Build / build (push) Successful in 2m46s
Build / docs (push) Successful in 6m33s
2025-11-11 00:28:34 +09:00
c2dcd40442 cargo fmt
Some checks failed
Build / check (push) Successful in 11m49s
Build / build (push) Successful in 12m51s
Build / docs (push) Has been cancelled
2025-11-10 23:50:55 +09:00
c6d3bbca6f Add warning comments for functions running as SUID/SGID
Some checks failed
Build / check (push) Failing after 5m22s
Build / build (push) Successful in 14m47s
Build / docs (push) Successful in 15m41s
2025-11-10 12:11:24 +09:00
d932b57aaa Use multithreaded tokio runtime for external server
Some checks failed
Build / check (push) Failing after 5m19s
Build / build (push) Successful in 13m21s
Build / docs (push) Successful in 18m22s
2025-11-10 01:28:01 +09:00
f90e60d856 server: don't unset NOTIFY_SOCKET on enabling watchdog 2025-11-10 01:06:37 +09:00
46c5d372b2 Deduplicate common username/group prefixes in error msg
Some checks failed
Build / check (push) Failing after 5m20s
Build / build (push) Successful in 12m54s
Build / docs (push) Successful in 16m35s
2025-11-10 00:50:36 +09:00
9e23f03ca2 Use non-templated systemd service
The previous setup was broken

This commit also adds some code to check that the database connection is
valid before it starts, as well as refactors the code that splits
between starting and external or internal server.
2025-11-10 00:38:26 +09:00
bd4791dc17 Check that executable is not SUID/SGID for unrelated subcommands 2025-11-10 00:33:53 +09:00
c2d22ee7f8 flake.lock: bump, Cargo.lock: bump, Cargo.toml: update inputs, format, etc
Some checks failed
Build / build (push) Has been cancelled
Build / check (push) Has been cancelled
Build / docs (push) Has been cancelled
2025-05-07 10:39:10 +02:00
a0be0d3b92 Wrap database users and database names in newtypes
Also, use less cloning where possible
2024-08-20 17:46:43 +02:00
338694a64e Add more --json flags 2024-08-20 17:46:43 +02:00
cdb1fb4181 Integrate better with systemd + better logs and protocol usage
This commits adds the following:

- Better systemd integration and usage:
  - More hardening
  - A watchdog thread
  - Journald native logging

as well as

- Better logs
- Some protocol usage fixes
2024-08-20 17:46:40 +02:00
e993644844 core/database_privileges: test edit-db-privs -p parser 2024-08-19 19:26:27 +02:00
0ce90ab42a list-db -> show-db 2024-08-19 18:58:26 +02:00
51302d75f0 create-users: default to setting no password in prompt 2024-08-19 18:06:47 +02:00
b21aa0eece Fix sql regex to work like ownership validation 2024-08-19 17:59:13 +02:00
d1d06514a9 cargo fmt + clippy 2024-08-19 17:52:16 +02:00
3556eb37ea Dont drop privs as server 2024-08-19 17:46:08 +02:00
20669569f3 Fix binary collation issues for privs as well
Ref #66
2024-08-19 17:44:21 +02:00
ed12a3153b server/config: revamp
- Adds options `socket_path` and `password_file`
2024-08-19 16:57:25 +02:00
48240489a7 Have server notify the client about db connection errors 2024-08-19 16:57:24 +02:00
8fdfe457ac Remove a few TODOs, either solved or converted to issue 2024-08-19 02:43:05 +02:00
807017ea70 add shell completion 2024-08-19 02:23:31 +02:00
5d049390b8 passwd-user: check for user existence before password input 2024-08-19 00:49:20 +02:00
a6f00d4313 Ensure user/db prefix has a _ behind it 2024-08-19 00:48:13 +02:00
cd0b2c3e6d sd_notify(ready) 2024-08-19 00:13:22 +02:00
93469a6e84 Add more serverside logging 2024-08-19 00:11:11 +02:00
e4da639d5c Fix sqlx parse error 2024-08-19 00:09:27 +02:00
daa8e069d3 Fix sql statement for show-user 2024-08-18 22:57:01 +02:00
86b5b47f1e Add some logging 2024-08-18 22:26:00 +02:00
9d88c95f33 Fix systemd socket activation 2024-08-18 22:24:28 +02:00
53f19b3d05 Replace socket authentication mechanism with SO_PEERCRED 2024-08-18 22:22:58 +02:00
94c9a54c14 Bump all deps, fix db connection closing issues 2024-08-18 01:33:55 +02:00
168f832aec Readd "databases where user has privileges" to show-user 2024-08-18 00:17:55 +02:00
f957bbd9da Don't validate prefixes and postfixes for db item ownership 2024-08-17 22:30:30 +02:00
54a38255e6 privs editor: "New user" ->"Previously unprivileged" 2024-08-17 21:27:46 +02:00
466d4a8b96 Use db name as example for privs editor 2024-08-17 21:24:59 +02:00