Skip to content

Commit 1ca413a

Browse files
committed
mra: abolish dlsymming mysql_adaptor
1 parent b00c21f commit 1ca413a

File tree

6 files changed

+5
-11
lines changed

6 files changed

+5
-11
lines changed

mra/imap/imap.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ extern bool (*system_services_judge_ip)(const char *host, std::string &reason);
206206
extern bool (*system_services_judge_user)(const char *);
207207
extern void (*system_services_ban_user)(const char *, int);
208208
extern authmgr_login_t system_services_auth_login;
209-
extern gromox::errno_t (*system_services_auth_meta)(const char *username, unsigned int wantpriv, sql_meta_result &out);
210209
extern void (*system_services_install_event_stub)(void (*)(char *));
211210
extern void (*system_services_broadcast_event)(const char *);
212211
extern void (*system_services_broadcast_select)(const char *, const std::string &fld);

mra/imap/imap_cmd_parser.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <gromox/midb.hpp>
3737
#include <gromox/midb_agent.hpp>
3838
#include <gromox/mjson.hpp>
39+
#include <gromox/mysql_adaptor.hpp>
3940
#include <gromox/range_set.hpp>
4041
#include <gromox/simple_tree.hpp>
4142
#include <gromox/textmaps.hpp>
@@ -1351,7 +1352,7 @@ static int imap_cmd_parser_password2(int argc, char **argv,
13511352
if (target_mbox == nullptr) {
13521353
mres = std::move(mres_auth);
13531354
} else {
1354-
if (system_services_auth_meta(target_mbox, WANTPRIV_METAONLY, mres) != 0)
1355+
if (mysql_adaptor_meta(target_mbox, WANTPRIV_METAONLY, mres) != 0)
13551356
return 1902 | DISPATCH_CONTINUE | DISPATCH_TAG;
13561357
if (!store_owner_over(mres_auth.username.c_str(), mres.username.c_str(),
13571358
mres.maildir.c_str())) {
@@ -1430,7 +1431,7 @@ int imap_cmd_parser_login(int argc, char **argv, imap_context *pcontext)
14301431
if (target_mbox == nullptr) {
14311432
mres = std::move(mres_auth);
14321433
} else {
1433-
if (system_services_auth_meta(target_mbox, WANTPRIV_METAONLY, mres) != 0)
1434+
if (mysql_adaptor_meta(target_mbox, WANTPRIV_METAONLY, mres) != 0)
14341435
return 1902 | DISPATCH_CONTINUE | DISPATCH_TAG;
14351436
if (!store_owner_over(mres_auth.username.c_str(), mres.username.c_str(),
14361437
mres.maildir.c_str())) {

mra/imap/main.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ E(judge_ip)
4949
E(judge_user)
5050
E(ban_user)
5151
E(auth_login)
52-
E(auth_meta)
5352
E(install_event_stub)
5453
E(broadcast_event)
5554
E(broadcast_select)
@@ -170,7 +169,6 @@ static int system_services_run()
170169
E(system_services_judge_user, "user_filter_judge");
171170
E(system_services_ban_user, "user_filter_ban");
172171
E(system_services_auth_login, "auth_login_gen");
173-
E(system_services_auth_meta, "mysql_auth_meta");
174172
E(system_services_install_event_stub, "install_event_stub");
175173
E(system_services_broadcast_event, "broadcast_event");
176174
E(system_services_broadcast_select, "broadcast_select");
@@ -184,7 +182,6 @@ static void system_services_stop()
184182
service_release("ip_filter_judge", "system");
185183
service_release("user_filter_judge", "system");
186184
service_release("user_filter_ban", "system");
187-
service_release("mysql_auth_meta", "system");
188185
service_release("auth_login_gen", "system");
189186
service_release("install_event_stub", "system");
190187
service_release("broadcast_event", "system");

mra/pop3/main.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ E(judge_ip)
4848
E(judge_user)
4949
E(ban_user)
5050
E(auth_login)
51-
E(auth_meta)
5251
E(broadcast_event)
5352
#undef E
5453

@@ -166,7 +165,6 @@ static int system_services_run()
166165
E(system_services_judge_user, "user_filter_judge");
167166
E(system_services_ban_user, "user_filter_ban");
168167
E(system_services_auth_login, "auth_login_gen");
169-
E(system_services_auth_meta, "mysql_auth_meta");
170168
E(system_services_broadcast_event, "broadcast_event");
171169
return 0;
172170
#undef E
@@ -177,7 +175,6 @@ static void system_services_stop()
177175
service_release("ip_filter_judge", "system");
178176
service_release("user_filter_judge", "system");
179177
service_release("user_filter_ban", "system");
180-
service_release("mysql_auth_meta", "system");
181178
service_release("auth_login_gen", "system");
182179
service_release("broadcast_event", "system");
183180
}

mra/pop3/pop3.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ extern bool (*system_services_judge_ip)(const char *host, std::string &reason);
103103
extern bool (*system_services_judge_user)(const char *);
104104
extern void (*system_services_ban_user)(const char *, int);
105105
extern authmgr_login_t system_services_auth_login;
106-
extern gromox::errno_t (*system_services_auth_meta)(const char *username, unsigned int wantpriv, sql_meta_result &out);
107106
extern void (*system_services_broadcast_event)(const char *);
108107

109108
extern uint16_t g_listener_ssl_port;

mra/pop3/pop3_cmd_handler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <gromox/fileio.h>
2727
#include <gromox/mail_func.hpp>
2828
#include <gromox/midb_agent.hpp>
29+
#include <gromox/mysql_adaptor.hpp>
2930
#include <gromox/util.hpp>
3031
#include "pop3.hpp"
3132

@@ -138,7 +139,7 @@ int pop3_cmd_handler_pass(std::vector<std::string> &&argv, pop3_context *pcontex
138139
if (target_mbox == nullptr) {
139140
mres = std::move(mres_auth);
140141
} else {
141-
if (system_services_auth_meta(target_mbox, WANTPRIV_METAONLY, mres) != 0)
142+
if (mysql_adaptor_meta(target_mbox, WANTPRIV_METAONLY, mres) != 0)
142143
return 1715 | DISPATCH_CONTINUE;
143144
if (!store_owner_over(mres_auth.username.c_str(), mres.username.c_str(),
144145
mres.maildir.c_str())) {

0 commit comments

Comments
 (0)