提交 3cd9f67a 编写于 作者: K kailixu

Merge branch 'fix/TS-3551-M' of github.com:taosdata/TDengine into fix/TS-3551-M

......@@ -80,12 +80,13 @@ static int32_t hbUpdateUserAuthInfo(SAppHbMgr *pAppHbMgr, SUserAuthBatchRsp *bat
pTscObj->authVer = rsp->version;
#if 0 // make jenkins happy temporarily. After PR pass, enable these lines again.
if (pTscObj->sysInfo != rsp->sysInfo) {
tscDebug("update sysInfo of user %s from %" PRIi8 " to %" PRIi8 ", tscRid:%" PRIi64, rsp->user,
pTscObj->sysInfo, rsp->sysInfo, pTscObj->id);
pTscObj->sysInfo = rsp->sysInfo;
}
#endif
if (pTscObj->passInfo.fp) {
SPassInfo *passInfo = &pTscObj->passInfo;
int32_t oldVer = atomic_load_32(&passInfo->ver);
......
......@@ -36,9 +36,9 @@ int32_t mndSetUserAuthRsp(SMnode *pMnode, SUserObj *pUser, SGetUserAuthRsp *pRsp
memcpy(pRsp->user, pUser->user, TSDB_USER_LEN);
pRsp->superAuth = 1;
pRsp->enable = pUser->enable;
pRsp->sysInfo = pUser->sysInfo;
pRsp->version = pUser->authVersion;
pRsp->passVer = pUser->passVersion;
pRsp->sysInfo = pUser->sysInfo;
return 0;
}
#endif
\ No newline at end of file
......@@ -1382,7 +1382,6 @@ int32_t mndValidateUserAuthInfo(SMnode *pMnode, SUserAuthVersion *pUsers, int32_
pUsers[i].version = ntohl(pUsers[i].version);
if (pUser->authVersion <= pUsers[i].version) {
printf("pUser->authVersion:%d <= pUsers[i].version:%d\n", pUser->authVersion, pUsers[i].version);
mndReleaseUser(pMnode, pUser);
continue;
}
......
......@@ -164,25 +164,6 @@ static int32_t authDropUser(SAuthCxt* pCxt, SDropUserStmt* pStmt) {
}
return TSDB_CODE_SUCCESS;
}
#if 0
static int32_t authAlterUser(SAuthCxt* pCxt, SAlterUserStmt* pStmt) {
SParseContext* pParseCxt = pCxt->pParseCxt;
SUserAuthInfo authInfo = {0};
snprintf(authInfo.user, sizeof(authInfo.user), "%s", pStmt->userName);
authInfo.type = AUTH_TYPE_OTHER;
int32_t code = TSDB_CODE_SUCCESS;
SUserAuthRes authRes = {0};
SRequestConnInfo conn = {.pTrans = pParseCxt->pTransporter,
.requestId = pParseCxt->requestId,
.requestObjRefId = pParseCxt->requestRid,
.mgmtEps = pParseCxt->mgmtEpSet};
code = catalogChkAuth(pParseCxt->pCatalog, &conn, &authInfo, &authRes);
return TSDB_CODE_SUCCESS == code ? (authRes.pass ? TSDB_CODE_SUCCESS : TSDB_CODE_PAR_PERMISSION_DENIED) : code;
}
#endif
static int32_t authDelete(SAuthCxt* pCxt, SDeleteStmt* pDelete) {
SNode* pTagCond = NULL;
......@@ -265,8 +246,6 @@ static int32_t authQuery(SAuthCxt* pCxt, SNode* pStmt) {
return authSelect(pCxt, (SSelectStmt*)pStmt);
case QUERY_NODE_DROP_USER_STMT:
return authDropUser(pCxt, (SDropUserStmt*)pStmt);
// case QUERY_NODE_ALTER_USER_STMT:
// return authAlterUser(pCxt, (SAlterUserStmt*)pStmt);
case QUERY_NODE_DELETE_STMT:
return authDelete(pCxt, (SDeleteStmt*)pStmt);
case QUERY_NODE_INSERT_STMT:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册