Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
哥们要飞
TDengine
提交
1e1b7054
T
TDengine
项目概览
哥们要飞
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1e1b7054
编写于
2月 08, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#1177
上级
dd44e5f9
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
158 addition
and
87 deletion
+158
-87
src/dnode/src/dnodeService.c
src/dnode/src/dnodeService.c
+3
-1
src/inc/mgmt.h
src/inc/mgmt.h
+0
-39
src/mnode/inc/mgmtAcct.h
src/mnode/inc/mgmtAcct.h
+52
-0
src/mnode/inc/mgmtGrant.h
src/mnode/inc/mgmtGrant.h
+20
-2
src/mnode/src/mgmtAcct.c
src/mnode/src/mgmtAcct.c
+21
-25
src/mnode/src/mgmtDb.c
src/mnode/src/mgmtDb.c
+1
-1
src/mnode/src/mgmtGrant.c
src/mnode/src/mgmtGrant.c
+38
-0
src/mnode/src/mgmtMeter.c
src/mnode/src/mgmtMeter.c
+17
-9
src/mnode/src/mgmtShell.c
src/mnode/src/mgmtShell.c
+3
-2
src/mnode/src/mgmtSystem.spec.c
src/mnode/src/mgmtSystem.spec.c
+0
-2
src/mnode/src/mgmtUser.c
src/mnode/src/mgmtUser.c
+2
-4
src/vnode/CMakeLists.txt
src/vnode/CMakeLists.txt
+1
-2
未找到文件。
src/dnode/src/dnodeService.c
浏览文件 @
1e1b7054
...
...
@@ -26,10 +26,11 @@
#include "mnodeAccount.h"
#include "mnodeBalance.h"
#include "mnodeCluster.h"
#include "
mnode
Replica.h"
#include "
sdb
Replica.h"
#include "multilevelStorage.h"
#include "vnodeCluster.h"
#include "vnodeReplica.h"
#include "dnodeGrant.h"
void
init
()
{
dnodeClusterInit
();
httpAdminInit
();
...
...
@@ -40,6 +41,7 @@
multilevelStorageInit
();
vnodeClusterInit
();
vnodeReplicaInit
();
dnodeGrantInit
();
}
#endif
...
...
src/
mnode/
inc/mgmt.h
→
src/inc/mgmt.h
浏览文件 @
1e1b7054
...
...
@@ -273,25 +273,6 @@ int mgmtInitShell();
void
mgmtCleanUpShell
();
int
mgmtRetriveUserAuthInfo
(
char
*
user
,
char
*
spi
,
char
*
encrypt
,
uint8_t
*
secret
,
uint8_t
*
ckey
);
// acct API
int
mgmtInitAccts
();
SAcctObj
*
mgmtGetAcct
(
char
*
name
);
int
mgmtCreateAcct
(
char
*
name
,
char
*
pass
,
SAcctCfg
*
pCfg
);
int
mgmtUpdateAcct
(
SAcctObj
*
pAcct
);
int
mgmtDropAcct
(
char
*
name
);
int
mgmtAddDbIntoAcct
(
SAcctObj
*
pAcct
,
SDbObj
*
pDb
);
int
mgmtRemoveDbFromAcct
(
SAcctObj
*
pAcct
,
SDbObj
*
pDb
);
int
mgmtAddUserIntoAcct
(
SAcctObj
*
pAcct
,
SUserObj
*
pUser
);
int
mgmtRemoveUserFromAcct
(
SAcctObj
*
pAcct
,
SUserObj
*
pUser
);
int
mgmtAddConnIntoAcct
(
SConnObj
*
pConn
);
int
mgmtRemoveConnFromAcct
(
SConnObj
*
pConn
);
int
mgmtGetAcctMeta
(
SMeterMeta
*
pMeta
,
SShowObj
*
pShow
,
SConnObj
*
pConn
);
int
mgmtRetrieveAccts
(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
SConnObj
*
pConn
);
void
mgmtCheckAcct
();
void
mgmtCleanUpAccts
();
int
mgmtAlterAcct
(
char
*
name
,
char
*
pass
,
SAcctCfg
*
pCfg
);
int64_t
mgmtGetAcctStatistic
(
SAcctObj
*
pAcct
);
// user API
int
mgmtInitUsers
();
SUserObj
*
mgmtGetUser
(
char
*
name
);
...
...
@@ -358,26 +339,6 @@ bool mgmtMeterCreateFromMetric(STabObj *pMeterObj);
bool
mgmtIsMetric
(
STabObj
*
pMeterObj
);
bool
mgmtIsNormalMeter
(
STabObj
*
pMeterObj
);
// grant API
void
grantActiveSystem
(
const
char
*
cfgFile
);
void
grantSendMsgToMgmt
();
void
grantReset
();
void
grantUpdate
(
void
*
pGrant
);
bool
grantCheckExpired
();
void
grantRestoreTimeSeries
(
uint32_t
timeseries
);
void
grantAddTimeSeries
(
uint32_t
timeseries
);
int
grantCheckTimeSeries
(
uint32_t
timeseries
);
void
grantResetCurStorage
(
uint64_t
totalStorage
);
int
grantCheckStorage
();
int
grantCheckDatabases
();
int
grantCheckUsers
();
int
grantCheckAccts
();
int
grantCheckDnodes
();
int
grantCheckConns
();
int
grantCheckStreams
();
int
grantCheckCpuCores
();
int
grantCheckQueryTime
();
// dnode API
int
mgmtInitDnodes
();
SDnodeObj
*
mgmtGetDnode
(
uint32_t
ip
);
...
...
src/mnode/inc/mgmtAcct.h
0 → 100644
浏览文件 @
1e1b7054
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TDENGINE_MGMT_ACCT_H
#define TDENGINE_MGMT_ACCT_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include "mgmt.h"
int32_t
mgmtCreateAcct
(
char
*
name
,
char
*
pass
,
SAcctCfg
*
pCfg
);
int32_t
mgmtUpdateAcct
(
SAcctObj
*
pAcct
);
int32_t
mgmtDropAcct
(
char
*
name
);
int32_t
mgmtAddDbIntoAcct
(
SAcctObj
*
pAcct
,
SDbObj
*
pDb
);
int32_t
mgmtRemoveDbFromAcct
(
SAcctObj
*
pAcct
,
SDbObj
*
pDb
);
int32_t
mgmtAddUserIntoAcct
(
SAcctObj
*
pAcct
,
SUserObj
*
pUser
);
int32_t
mgmtRemoveUserFromAcct
(
SAcctObj
*
pAcct
,
SUserObj
*
pUser
);
int32_t
mgmtAddConnIntoAcct
(
SConnObj
*
pConn
);
int32_t
mgmtRemoveConnFromAcct
(
SConnObj
*
pConn
);
int32_t
mgmtAlterAcct
(
char
*
name
,
char
*
pass
,
SAcctCfg
*
pCfg
);
int64_t
mgmtGetAcctStatistic
(
SAcctObj
*
pAcct
);
extern
int32_t
(
*
mgmtInitAccts
)();
extern
SAcctObj
*
(
*
mgmtGetAcct
)(
char
*
acctName
);
extern
void
(
*
mgmtCreateRootAcct
)();
extern
int32_t
(
*
mgmtCheckUserLimit
)(
SAcctObj
*
pAcct
);
extern
int32_t
(
*
mgmtCheckDbLimit
)(
SAcctObj
*
pAcct
);
extern
int32_t
(
*
mgmtCheckTableLimit
)(
SAcctObj
*
pAcct
);
extern
void
(
*
mgmtCheckAcct
)();
extern
void
(
*
mgmtCleanUpAccts
)();
extern
int32_t
(
*
mgmtGetAcctMeta
)(
SMeterMeta
*
pMeta
,
SShowObj
*
pShow
,
SConnObj
*
pConn
);
extern
int32_t
(
*
mgmtRetrieveAccts
)(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
SConnObj
*
pConn
);
#ifdef __cplusplus
}
#endif
#endif // TDENGINE_MGMTSYSTEM_H
src/mnode/
src/mgmtAcct.spec.c
→
src/mnode/
inc/mgmtGrant.h
浏览文件 @
1e1b7054
...
...
@@ -13,7 +13,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#
define _DEFAULT_SOURCE
#
include "mgmt.h"
#
ifndef TDENGINE_MGMT_GRANT_H
#
define TDENGINE_MGMT_GTANT_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <stdint.h>
#include <stdbool.h>
extern
bool
(
*
mgmtCheckExpired
)();
extern
void
(
*
mgmtAddTimeSeries
)(
uint32_t
timeSeriesNum
);
extern
void
(
*
mgmtRestoreTimeSeries
)(
uint32_t
timeseries
);
extern
int32_t
(
*
mgmtCheckTimeSeries
)(
uint32_t
timeseries
);
extern
int32_t
(
*
mgmtCheckUserGrant
)();
extern
int32_t
(
*
mgmtCheckDbGrant
)();
#ifdef __cplusplus
}
#endif
#endif
src/mnode/src/mgmtAcct.c
浏览文件 @
1e1b7054
...
...
@@ -15,15 +15,14 @@
#define _DEFAULT_SOURCE
#include "os.h"
#include "mgmt.h"
#include "mgmtAcct.h"
#include "tschemautil.h"
extern
void
*
userSdb
;
extern
void
*
dbSdb
;
SAcctObj
acctObj
;
int
mgmtGetAcctsNum
();
SShowObj
*
mgmtGetNextAcct
(
SShowObj
*
pShow
,
SAcctObj
**
pAcct
);
...
...
@@ -132,18 +131,16 @@ int mgmtRemoveConnFromAcct(SConnObj *pConn) {
return
0
;
}
/*
* Edge Version Implementation
*/
int
mgmtInitAcctsImp
()
{
return
0
;
}
int
(
*
mgmtInitAccts
)()
=
mgmtInitAcctsImp
;
int32_t
mgmtInitAcctsImp
()
{
return
0
;
}
int32_t
(
*
mgmtInitAccts
)()
=
mgmtInitAcctsImp
;
void
mgmtCreateRootAcct
()
{}
void
mgmtCreateRootAcctImp
()
{}
void
(
*
mgmtCreateRootAcct
)()
=
mgmtCreateRootAcctImp
;
SAcctObj
*
mgmtGetAcct
(
char
*
name
)
{
return
&
acctObj
;
}
SAcctObj
*
mgmtGetAcctImp
(
char
*
acctName
)
{
return
&
acctObj
;
}
SAcctObj
*
(
*
mgmtGetAcct
)(
char
*
acctName
)
=
mgmtGetAcctImp
;
int
mgmtCheckUserLimit
(
SAcctObj
*
pAcct
)
{
int
32_t
mgmtCheckUserLimitImp
(
SAcctObj
*
pAcct
)
{
int
numOfUsers
=
sdbGetNumOfRows
(
userSdb
);
if
(
numOfUsers
>=
tsMaxUsers
)
{
mWarn
(
"numOfUsers:%d, exceed tsMaxUsers:%d"
,
numOfUsers
,
tsMaxUsers
);
...
...
@@ -151,8 +148,9 @@ int mgmtCheckUserLimit(SAcctObj *pAcct) {
}
return
0
;
}
int32_t
(
*
mgmtCheckUserLimit
)(
SAcctObj
*
pAcct
)
=
mgmtCheckUserLimitImp
;
int
mgmtCheckDbLimit
(
SAcctObj
*
pAcct
)
{
int
32_t
mgmtCheckDbLimitImp
(
SAcctObj
*
pAcct
)
{
int
numOfDbs
=
sdbGetNumOfRows
(
dbSdb
);
if
(
numOfDbs
>=
tsMaxDbs
)
{
mWarn
(
"numOfDbs:%d, exceed tsMaxDbs:%d"
,
numOfDbs
,
tsMaxDbs
);
...
...
@@ -160,18 +158,12 @@ int mgmtCheckDbLimit(SAcctObj *pAcct) {
}
return
0
;
}
int32_t
(
*
mgmtCheckDbLimit
)(
SAcctObj
*
pAcct
)
=
mgmtCheckDbLimitImp
;
int
mgmtCheckMeterLimit
(
SAcctObj
*
pAcct
)
{
return
0
;
}
int
mgmtCheckUserGrant
()
{
return
0
;
}
int
mgmtCheckDbGrant
()
{
return
0
;
}
int
mgmtCheckMeterGrant
()
{
return
0
;
}
void
grantAddTimeSeries
(
uint32_t
timeSeriesNum
)
{}
int32_t
mgmtCheckTableLimitImp
(
SAcctObj
*
pAcct
)
{
return
0
;
}
int32_t
(
*
mgmtCheckTableLimit
)(
SAcctObj
*
pAcct
)
=
mgmtCheckTableLimitImp
;
void
mgmtCheckAcct
()
{
void
mgmtCheckAcct
Imp
()
{
SAcctObj
*
pAcct
=
&
acctObj
;
pAcct
->
acctId
=
0
;
strcpy
(
pAcct
->
user
,
"root"
);
...
...
@@ -180,9 +172,13 @@ void mgmtCheckAcct() {
mgmtCreateUser
(
pAcct
,
"monitor"
,
tsInternalPass
);
mgmtCreateUser
(
pAcct
,
"_root"
,
tsInternalPass
);
}
void
(
*
mgmtCheckAcct
)()
=
mgmtCheckAcctImp
;
void
mgmtCleanUpAccts
()
{}
void
mgmtCleanUpAcctsImp
()
{}
void
(
*
mgmtCleanUpAccts
)()
=
mgmtCleanUpAcctsImp
;
int
mgmtGetAcctMeta
(
SMeterMeta
*
pMeta
,
SShowObj
*
pShow
,
SConnObj
*
pConn
)
{
return
TSDB_CODE_OPS_NOT_SUPPORT
;
}
int32_t
mgmtGetAcctMetaImp
(
SMeterMeta
*
pMeta
,
SShowObj
*
pShow
,
SConnObj
*
pConn
)
{
return
TSDB_CODE_OPS_NOT_SUPPORT
;
}
int32_t
(
*
mgmtGetAcctMeta
)(
SMeterMeta
*
pMeta
,
SShowObj
*
pShow
,
SConnObj
*
pConn
)
=
mgmtGetAcctMetaImp
;
int
mgmtRetrieveAccts
(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
SConnObj
*
pConn
)
{
return
0
;
}
int32_t
mgmtRetrieveAcctsImp
(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
SConnObj
*
pConn
)
{
return
0
;
}
int32_t
(
*
mgmtRetrieveAccts
)(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
SConnObj
*
pConn
)
=
mgmtRetrieveAcctsImp
;
src/mnode/src/mgmtDb.c
浏览文件 @
1e1b7054
...
...
@@ -17,6 +17,7 @@
#include "os.h"
#include "mgmt.h"
#include "mgmtGrant.h"
#include "mgmtBalance.h"
#include "mgmtUtil.h"
#include "tschemautil.h"
...
...
@@ -37,7 +38,6 @@ void *mgmtDbActionAfterBatchUpdate(void *row, char *str, int size, int *ssize);
void
*
mgmtDbActionReset
(
void
*
row
,
char
*
str
,
int
size
,
int
*
ssize
);
void
*
mgmtDbActionDestroy
(
void
*
row
,
char
*
str
,
int
size
,
int
*
ssize
);
int
mgmtCheckDbGrant
();
int
mgmtCheckDbLimit
(
SAcctObj
*
pAcct
);
void
mgmtDbActionInit
()
{
...
...
src/mnode/src/mgmtGrant.c
0 → 100644
浏览文件 @
1e1b7054
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _DEFAULT_SOURCE
#include "os.h"
#include "mgmt.h"
#include "mgmtAcct.h"
#include "mgmtGrant.h"
int32_t
mgmtCheckUserGrantImp
()
{
return
0
;
}
int32_t
(
*
mgmtCheckUserGrant
)()
=
mgmtCheckUserGrantImp
;
int32_t
mgmtCheckDbGrantImp
()
{
return
0
;
}
int32_t
(
*
mgmtCheckDbGrant
)()
=
mgmtCheckDbGrantImp
;
void
mgmtAddTimeSeriesImp
(
uint32_t
timeSeriesNum
)
{}
void
(
*
mgmtAddTimeSeries
)(
uint32_t
timeSeriesNum
)
=
mgmtAddTimeSeriesImp
;
void
mgmtRestoreTimeSeriesImp
(
uint32_t
timeSeriesNum
)
{}
void
(
*
mgmtRestoreTimeSeries
)(
uint32_t
timeSeriesNum
)
=
mgmtRestoreTimeSeriesImp
;
int32_t
mgmtCheckTimeSeriesImp
(
uint32_t
timeseries
)
{
return
0
;
}
int32_t
(
*
mgmtCheckTimeSeries
)(
uint32_t
timeseries
)
=
mgmtCheckTimeSeriesImp
;
bool
mgmtCheckExpiredImp
()
{
return
false
;
}
bool
(
*
mgmtCheckExpired
)()
=
mgmtCheckExpiredImp
;
\ No newline at end of file
src/mnode/src/mgmtMeter.c
浏览文件 @
1e1b7054
...
...
@@ -17,6 +17,8 @@
#include "os.h"
#include "mgmt.h"
#include "mgmtAcct.h"
#include "mgmtGrant.h"
#include "mgmtUtil.h"
#include "taosmsg.h"
#include "tast.h"
...
...
@@ -91,8 +93,7 @@ int32_t mgmtMeterDropColumnByName(STabObj *pMeter, const char *name);
static
int
dropMeterImp
(
SDbObj
*
pDb
,
STabObj
*
pMeter
,
SAcctObj
*
pAcct
);
static
void
dropAllMetersOfMetric
(
SDbObj
*
pDb
,
STabObj
*
pMetric
,
SAcctObj
*
pAcct
);
int
mgmtCheckMeterLimit
(
SAcctObj
*
pAcct
,
SCreateTableMsg
*
pCreate
);
int
mgmtCheckMeterGrant
(
SCreateTableMsg
*
pCreate
,
STabObj
*
pMeter
);
int
mgmtCheckTableLimit
(
SAcctObj
*
pAcct
,
SCreateTableMsg
*
pCreate
);
void
mgmtMeterActionInit
()
{
mgmtMeterActionFp
[
SDB_TYPE_INSERT
]
=
mgmtMeterActionInsert
;
...
...
@@ -540,7 +541,7 @@ int mgmtCreateMeter(SDbObj *pDb, SCreateTableMsg *pCreate) {
pAcct
=
mgmtGetAcct
(
pDb
->
cfg
.
acct
);
assert
(
pAcct
!=
NULL
);
int
code
=
mgmtCheck
Meter
Limit
(
pAcct
,
pCreate
);
int
code
=
mgmtCheck
Table
Limit
(
pAcct
,
pCreate
);
if
(
code
!=
0
)
{
mError
(
"table:%s, exceed the limit"
,
pCreate
->
meterId
);
return
code
;
...
...
@@ -636,10 +637,17 @@ int mgmtCreateMeter(SDbObj *pDb, SCreateTableMsg *pCreate) {
return
TSDB_CODE_FAILED_TO_LOCK_RESOURCES
;
}
code
=
mgmtCheckMeterGrant
(
pCreate
,
pMeter
);
if
(
code
!=
0
)
{
mError
(
"table:%s, grant expired"
,
pCreate
->
meterId
);
return
code
;
if
(
mgmtCheckExpired
())
{
mError
(
"failed to create meter:%s, reason:grant expired"
,
pMeter
->
meterId
);
return
TSDB_CODE_GRANT_EXPIRED
;
}
if
(
pCreate
->
numOfTags
==
0
)
{
int
grantCode
=
mgmtCheckTimeSeries
(
pMeter
->
numOfColumns
);
if
(
grantCode
!=
0
)
{
mError
(
"table:%s, grant expired"
,
pCreate
->
meterId
);
return
grantCode
;
}
}
if
(
pCreate
->
numOfTags
==
0
)
{
// handle normal meter creation
...
...
@@ -704,7 +712,7 @@ int mgmtCreateMeter(SDbObj *pDb, SCreateTableMsg *pCreate) {
mTrace
(
"table:%s, send create table msg to dnode, vgId:%d, sid:%d, vnode:%d"
,
pMeter
->
meterId
,
pMeter
->
gid
.
vgId
,
pMeter
->
gid
.
sid
,
pVgroup
->
vnodeGid
[
0
].
vnode
);
gran
tAddTimeSeries
(
pMeter
->
numOfColumns
-
1
);
mgm
tAddTimeSeries
(
pMeter
->
numOfColumns
-
1
);
mgmtSendCreateMsgToVgroup
(
pMeter
,
pVgroup
);
}
...
...
@@ -805,7 +813,7 @@ static int dropMeterImp(SDbObj *pDb, STabObj * pMeter, SAcctObj *pAcct) {
pVgroup
=
mgmtGetVgroup
(
pMeter
->
gid
.
vgId
);
if
(
pVgroup
==
NULL
)
return
TSDB_CODE_OTHERS
;
gran
tRestoreTimeSeries
(
pMeter
->
numOfColumns
-
1
);
mgm
tRestoreTimeSeries
(
pMeter
->
numOfColumns
-
1
);
mgmtSendRemoveMeterMsgToDnode
(
pMeter
,
pVgroup
);
sdbDeleteRow
(
meterSdb
,
pMeter
);
...
...
src/mnode/src/mgmtShell.c
浏览文件 @
1e1b7054
...
...
@@ -18,6 +18,7 @@
#include "dnodeSystem.h"
#include "mgmt.h"
#include "mgmtGrant.h"
#include "mgmtProfile.h"
#include "taosmsg.h"
#include "tlog.h"
...
...
@@ -561,7 +562,7 @@ int mgmtProcessCreateDbMsg(char *pMsg, int msgLen, SConnObj *pConn) {
pCreate
->
blocksPerMeter
=
htons
(
pCreate
->
blocksPerMeter
);
pCreate
->
rowsInFileBlock
=
htonl
(
pCreate
->
rowsInFileBlock
);
if
(
gran
tCheckExpired
())
{
if
(
mgm
tCheckExpired
())
{
code
=
TSDB_CODE_GRANT_EXPIRED
;
}
else
if
(
!
pConn
->
writeAuth
)
{
code
=
TSDB_CODE_NO_RIGHTS
;
...
...
@@ -1290,7 +1291,7 @@ int mgmtProcessConnectMsg(char *pMsg, int msgLen, SConnObj *pConn) {
goto
_rsp
;
}
if
(
gran
tCheckExpired
())
{
if
(
mgm
tCheckExpired
())
{
code
=
TSDB_CODE_GRANT_EXPIRED
;
goto
_rsp
;
}
...
...
src/mnode/src/mgmtSystem.spec.c
浏览文件 @
1e1b7054
...
...
@@ -36,10 +36,8 @@ void mgmtStopSystem() {}
void
mgmtCleanUpRedirect
()
{}
bool
grantCheckExpired
()
{
return
false
;
}
int
grantGetGrantsMeta
(
SMeterMeta
*
pMeta
,
SShowObj
*
pShow
,
SConnObj
*
pConn
)
{
return
TSDB_CODE_OPS_NOT_SUPPORT
;
}
int
grantRetrieveGrants
(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
SConnObj
*
pConn
)
{
return
0
;
}
void
grantRestoreTimeSeries
(
uint32_t
timeseries
)
{}
\ No newline at end of file
src/mnode/src/mgmtUser.c
浏览文件 @
1e1b7054
...
...
@@ -17,6 +17,8 @@
#include "os.h"
#include "mgmt.h"
#include "mgmtGrant.h"
#include "mgmtAcct.h"
#include "tschemautil.h"
#include "ttime.h"
...
...
@@ -35,10 +37,6 @@ void *mgmtUserActionAfterBatchUpdate(void *row, char *str, int size, int *ssize)
void
*
mgmtUserActionReset
(
void
*
row
,
char
*
str
,
int
size
,
int
*
ssize
);
void
*
mgmtUserActionDestroy
(
void
*
row
,
char
*
str
,
int
size
,
int
*
ssize
);
SAcctObj
*
mgmtGetAcct
(
char
*
name
);
void
mgmtCreateRootAcct
();
int
mgmtCheckUserLimit
(
SAcctObj
*
pAcct
);
int
mgmtCheckUserGrant
();
void
mgmtUserActionInit
()
{
mgmtUserActionFp
[
SDB_TYPE_INSERT
]
=
mgmtUserActionInsert
;
...
...
src/vnode/CMakeLists.txt
浏览文件 @
1e1b7054
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
PROJECT
(
TDengine
)
ADD_SUBDIRECTORY
(
detail
)
ADD_SUBDIRECTORY
(
lite
)
\ No newline at end of file
ADD_SUBDIRECTORY
(
detail
)
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录