Skip to content

Commit

Permalink
fix: disallow CREATE TABLE under system databases
Browse files Browse the repository at this point in the history
  • Loading branch information
haolinw committed Jan 6, 2025
1 parent 1706b97 commit d27e501
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/libs/parser/src/parAuthenticator.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ static int32_t authShowCreateView(SAuthCxt* pCxt, SShowCreateViewStmt* pStmt) {

static int32_t authCreateTable(SAuthCxt* pCxt, SCreateTableStmt* pStmt) {
SNode* pTagCond = NULL;
if (IS_SYS_DBNAME(pStmt->dbName)) {
return TSDB_CODE_PAR_SYSTABLE_NOT_ALLOWED;
}
// todo check tag condition for subtable
return checkAuth(pCxt, pStmt->dbName, NULL, AUTH_TYPE_WRITE, &pTagCond);
}
Expand Down

0 comments on commit d27e501

Please sign in to comment.