oysteikt
865b24884e
Add command check-auth
2025-11-29 19:37:54 +09:00
oysteikt
03ddf0ac8a
core: move DbOrUser to types, wrap item name in struct
2025-11-29 19:34:14 +09:00
oysteikt
fe87f72b00
core: derive Debug + Clone for UnixUser
2025-11-29 00:56:43 +09:00
oysteikt
bc4f2bc71c
server: move peer cred checking to connection task
...
This commit also gets rid of the database connection closing helper
2025-11-29 00:56:43 +09:00
oysteikt
fa1d27e09c
server: make use of database connection pool
2025-11-26 19:11:06 +09:00
oysteikt
20331a4429
server: refactor server logic into supervisor + session handler
2025-11-26 19:11:05 +09:00
oysteikt
a4acfe91af
Rename project to muscl
2025-11-26 13:50:06 +09:00
oysteikt
805c2d11ff
core/protocol: split commands into separate files
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
oysteikt
1571f6e2c7
core: split mysql user/db into separate types module
2025-11-26 02:03:18 +09:00
oysteikt
03a761a0ff
Refactor privilege handling
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
oysteikt
30d02775c2
Make compile-time feature for SUID/SGID mode
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
oysteikt
c2dcd40442
cargo fmt
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
oysteikt
c6d3bbca6f
Add warning comments for functions running as SUID/SGID
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
oysteikt
46c5d372b2
Deduplicate common username/group prefixes in error msg
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
oysteikt
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
oysteikt
bd4791dc17
Check that executable is not SUID/SGID for unrelated subcommands
2025-11-10 00:33:53 +09:00
oysteikt
c2d22ee7f8
flake.lock: bump, Cargo.lock: bump, Cargo.toml: update inputs, format, etc
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
oysteikt
a0be0d3b92
Wrap database users and database names in newtypes
...
Also, use less cloning where possible
2024-08-20 17:46:43 +02:00
oysteikt
338694a64e
Add more --json flags
2024-08-20 17:46:43 +02:00
oysteikt
e993644844
core/database_privileges: test edit-db-privs -p parser
2024-08-19 19:26:27 +02:00
oysteikt
0ce90ab42a
list-db -> show-db
2024-08-19 18:58:26 +02:00
oysteikt
d1d06514a9
cargo fmt + clippy
2024-08-19 17:52:16 +02:00
oysteikt
20669569f3
Fix binary collation issues for privs as well
...
Ref #66
2024-08-19 17:44:21 +02:00
oysteikt
ed12a3153b
server/config: revamp
...
- Adds options `socket_path` and `password_file`
2024-08-19 16:57:25 +02:00
oysteikt
48240489a7
Have server notify the client about db connection errors
2024-08-19 16:57:24 +02:00
oysteikt
a6f00d4313
Ensure user/db prefix has a _ behind it
2024-08-19 00:48:13 +02:00
oysteikt
86b5b47f1e
Add some logging
2024-08-18 22:26:00 +02:00
oysteikt
53f19b3d05
Replace socket authentication mechanism with SO_PEERCRED
2024-08-18 22:22:58 +02:00
oysteikt
f957bbd9da
Don't validate prefixes and postfixes for db item ownership
2024-08-17 22:30:30 +02:00
oysteikt
54a38255e6
privs editor: "New user" ->"Previously unprivileged"
2024-08-17 21:27:46 +02:00
oysteikt
466d4a8b96
Use db name as example for privs editor
2024-08-17 21:24:59 +02:00
oysteikt
af86893acf
Rewrite entire codebase to split into client and server
2024-08-17 20:21:05 +02:00
oysteikt
e420c1f4d5
edit-db-privs: display diffs and ask before commiting
2024-08-08 21:48:41 +02:00
oysteikt
7ee60dacdc
Misc fixups to priv diff logic, add tests
2024-08-08 21:02:25 +02:00
oysteikt
8a91e9a3d0
core/database_operations: replace single field struct with sqlx unwrap
2024-08-08 19:45:28 +02:00
oysteikt
e2193f47c1
Only pass the mysql config portion when connecting
2024-08-08 19:40:57 +02:00
oysteikt
39a3f8ffd1
core/common: make testable, fix some status messages
2024-08-08 19:30:42 +02:00
oysteikt
f78c88517f
Add lock-user and unlock-user
2024-08-08 00:53:26 +02:00
oysteikt
7e71b5071f
Report back more detailed results from commands
2024-08-07 23:33:07 +02:00
oysteikt
21c1f8cc87
Fix clippy warnings
2024-08-07 23:10:37 +02:00
oysteikt
011bcf9edc
More spring cleaning for privs, add test
2024-08-07 23:00:38 +02:00
oysteikt
1bb1c133e8
Consistently name db connection connection
2024-08-07 21:54:13 +02:00
oysteikt
5a7516aed8
Rename most instances of "permission" to "privilege"
2024-08-07 21:51:03 +02:00
oysteikt
71c712dce0
treewide: move some code around, spring cleaning
2024-08-07 21:17:27 +02:00
oysteikt
833251a1a2
show-user: add databases field, report when no users
2024-08-07 20:31:05 +02:00
oysteikt
3d7d001f65
show-user: add --json flag
2024-08-07 17:22:23 +02:00
oysteikt
a9b8f7cee7
user_operations: don't fetch auth_string/password, only check existence
2024-08-07 17:20:13 +02:00
oysteikt
d0b750cd33
cargo clippy + fmt
2024-08-07 16:55:51 +02:00
oysteikt
9d0b632e9c
Inline database quotation functions
2024-08-07 16:17:14 +02:00
oysteikt
01d502337d
Don't fail on erroneus db connection closure
2024-08-07 16:16:46 +02:00