Merge pull request #22121 from taosdata/fix/TD-25236-3.0a
fix: auth check for sys table when user is disabled
This commit is contained in:
commit
ec04a5eff7
|
@ -773,12 +773,6 @@ int32_t ctgGetCachedStbNameFromSuid(SCatalog* pCtg, char* dbFName, uint64_t suid
|
|||
|
||||
int32_t ctgChkAuthFromCache(SCatalog *pCtg, SUserAuthInfo *pReq, bool *inCache, SCtgAuthRsp *pRes) {
|
||||
int32_t code = 0;
|
||||
if (IS_SYS_DBNAME(pReq->tbName.dbname)) {
|
||||
*inCache = true;
|
||||
pRes->pRawRes->pass = true;
|
||||
ctgDebug("sysdb %s, pass", pReq->tbName.dbname);
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
SCtgUserAuth *pUser = (SCtgUserAuth *)taosHashGet(pCtg->userCache, pReq->user, strlen(pReq->user));
|
||||
if (NULL == pUser) {
|
||||
|
|
|
@ -1589,6 +1589,12 @@ int32_t ctgChkSetAuthRes(SCatalog* pCtg, SCtgAuthReq* req, SCtgAuthRsp* res) {
|
|||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
if (IS_SYS_DBNAME(pReq->tbName.dbname)) {
|
||||
pRes->pass = true;
|
||||
ctgDebug("sysdb %s, pass", pReq->tbName.dbname);
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
char dbFName[TSDB_DB_FNAME_LEN];
|
||||
tNameGetFullDbName(&pReq->tbName, dbFName);
|
||||
|
||||
|
|
Loading…
Reference in New Issue