From 84485c39a4e898a7d329d30b4e65b605a668d2ce Mon Sep 17 00:00:00 2001 From: xywang Date: Thu, 2 Jun 2022 13:46:00 +0800 Subject: [PATCH] fix: fixed that altering password for user made no sense --- src/mnode/src/mnodeUser.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/mnode/src/mnodeUser.c b/src/mnode/src/mnodeUser.c index 2ebe644de1..b3e3ba6cd9 100644 --- a/src/mnode/src/mnodeUser.c +++ b/src/mnode/src/mnodeUser.c @@ -625,18 +625,11 @@ int32_t mnodeRetriveAuth(char *user, char *spi, char *encrypt, char *secret, cha mError("user:%s, failed to auth user, reason:%s", user, tstrerror(TSDB_CODE_MND_INVALID_USER)); return TSDB_CODE_MND_INVALID_USER; } else { - if (pUser->superAuth) { - SAcctObj *pAcct = mnodeGetAcct(user); - memcpy(secret, pAcct->pass, TSDB_KEY_LEN); - mnodeDecAcctRef(pAcct); - } else { - memcpy(secret, pUser->pass, TSDB_KEY_LEN); - } - *spi = 1; *encrypt = 0; *ckey = 0; + memcpy(secret, pUser->pass, TSDB_KEY_LEN); mnodeDecUserRef(pUser); mDebug("user:%s, auth info is returned", user); return TSDB_CODE_SUCCESS; -- GitLab