mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 10:27:39 +00:00
Refactoring
This commit is contained in:
parent
bb2c744ec0
commit
7e2ba41c64
2
db.c
2
db.c
@ -87,7 +87,7 @@ void database_check(struct su_context *ctx) {
|
||||
strcpy(ctx->info->pkg_name, "???"); /* bad string so it doesn't exist */
|
||||
|
||||
// Open database
|
||||
ret = sqlite3_open_v2(DATABASE_PATH, &db, SQLITE_OPEN_READONLY, NULL);
|
||||
ret = sqlite3_open_v2(MAGISKDB, &db, SQLITE_OPEN_READONLY, NULL);
|
||||
if (ret) {
|
||||
LOGE("sqlite3 open failure: %s\n", sqlite3_errstr(ret));
|
||||
sqlite3_close(db);
|
||||
|
1
su.h
1
su.h
@ -41,7 +41,6 @@
|
||||
#define REQUESTOR_PREFIX JAVA_PACKAGE_NAME ".superuser"
|
||||
|
||||
#define DEFAULT_SHELL "/system/bin/sh"
|
||||
#define DATABASE_PATH "/data/adb/magisk.db"
|
||||
|
||||
typedef enum {
|
||||
QUERY = 0,
|
||||
|
@ -337,7 +337,7 @@ int su_client_main(int argc, char *argv[]) {
|
||||
int ptmx, socketfd;
|
||||
|
||||
// Connect to client
|
||||
socketfd = connect_daemon();
|
||||
socketfd = connect_daemon(0);
|
||||
|
||||
// Tell the daemon we are su
|
||||
write_int(socketfd, SUPERUSER);
|
||||
|
Loading…
x
Reference in New Issue
Block a user