From 8fdfe457acfadd126d63c09dd513c4640f3fa7c1 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 19 Aug 2024 02:43:05 +0200 Subject: [PATCH] Remove a few TODOs, either solved or converted to issue --- src/cli/database_command.rs | 8 -------- src/cli/mysql_admutils_compatibility/mysql_dbadm.rs | 1 - src/cli/user_command.rs | 1 - src/server/command.rs | 1 - src/server/server_loop.rs | 2 -- 5 files changed, 13 deletions(-) diff --git a/src/cli/database_command.rs b/src/cli/database_command.rs index df05ae0..a2baa1b 100644 --- a/src/cli/database_command.rs +++ b/src/cli/database_command.rs @@ -356,13 +356,6 @@ pub async fn edit_database_privileges( response => return erroneous_server_response(response), }; - // TODO: The data from args should not be absolute. - // In the current implementation, the user would need to - // provide all privileges for all users on all databases. - // The intended effect is to modify the privileges which have - // matching users and databases, as well as add any - // new db-user pairs. This makes it impossible to remove - // privileges, but that is an issue for another day. let privileges_to_change = if !args.privs.is_empty() { parse_privilege_tables_from_args(&args)? } else { @@ -398,7 +391,6 @@ pub async fn edit_database_privileges( response => return erroneous_server_response(response), }; - // TODO: allow user to return and correct their mistake print_modify_database_privileges_output_status(&result); server_connection.send(Request::Exit).await?; diff --git a/src/cli/mysql_admutils_compatibility/mysql_dbadm.rs b/src/cli/mysql_admutils_compatibility/mysql_dbadm.rs index 1e05a2c..0b4518e 100644 --- a/src/cli/mysql_admutils_compatibility/mysql_dbadm.rs +++ b/src/cli/mysql_admutils_compatibility/mysql_dbadm.rs @@ -187,7 +187,6 @@ fn tokio_run_command(command: Command, server_connection: StdUnixStream) -> anyh name: Some(args.database), privs: vec![], json: false, - // TODO: use this to mimic the old editor-finding logic editor: None, yes: false, }; diff --git a/src/cli/user_command.rs b/src/cli/user_command.rs index fb10c28..8e51095 100644 --- a/src/cli/user_command.rs +++ b/src/cli/user_command.rs @@ -299,7 +299,6 @@ async fn show_users( server_connection.send(Request::Exit).await?; - // TODO: print databases where user has privileges if args.json { println!( "{}", diff --git a/src/server/command.rs b/src/server/command.rs index 3ad7dbe..cb279ab 100644 --- a/src/server/command.rs +++ b/src/server/command.rs @@ -47,7 +47,6 @@ pub async fn handle_command( } async fn socket_activate(config: ServerConfig) -> anyhow::Result<()> { - // TODO: allow getting socket path from other socket activation sources let conn = get_socket_from_systemd().await?; let uid = conn.peer_cred()?.uid(); let unix_user = UnixUser::from_uid(uid)?; diff --git a/src/server/server_loop.rs b/src/server/server_loop.rs index 03d9b4d..f768568 100644 --- a/src/server/server_loop.rs +++ b/src/server/server_loop.rs @@ -32,8 +32,6 @@ use crate::{ // TODO: consider using a connection pool -// TODO: use tracing for login, so we can scope the log messages per incoming connection - pub async fn listen_for_incoming_connections( socket_path: Option, config: ServerConfig,