提交 7ceaea95 编写于 作者: X xlei1030

paramCheck为root时直接返回

Signed-off-by: Nxlei1030 <xionglei6@huawei.com>
上级 164415c8
......@@ -230,7 +230,9 @@ static int CheckParamPermission(const ParamSecurityLabel *srcLabel, const ParamA
int ret = DAC_RESULT_FORBIDED;
PARAM_CHECK(srcLabel != NULL && auditData != NULL && auditData->name != NULL, return ret, "Invalid param");
PARAM_CHECK((mode & (DAC_READ | DAC_WRITE | DAC_WATCH)) != 0, return ret, "Invalid mode %x", mode);
if (srcLabel->cred.uid = 0) {
return DAC_RESULT_PERMISSION;
}
/**
* DAC group 实现的label的定义
* user:group:read|write|watch
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册