mirror of
https://gitee.com/openharmony/startup_init
synced 2024-12-03 16:34:03 +00:00
适配musl库的参数dac检测
Signed-off-by: x00405909 <xionglei6@huawei.com> Change-Id: Ic9f3185be28cd7342e927aaf4110cecec71fb49b
This commit is contained in:
parent
3e78c22066
commit
1e532210f5
@ -219,7 +219,7 @@ static int CheckParamPermission(const ParamSecurityLabel *srcLabel, const ParamA
|
||||
{
|
||||
#ifndef PARAM_SUPPORT_DAC_CHECK
|
||||
return DAC_RESULT_PERMISSION;
|
||||
#endif
|
||||
#else
|
||||
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);
|
||||
@ -246,6 +246,7 @@ static int CheckParamPermission(const ParamSecurityLabel *srcLabel, const ParamA
|
||||
auditData->dacData.gid, auditData->dacData.uid, auditData->dacData.mode);
|
||||
PARAM_LOGV("%s check %o localMode %o ret %d", auditData->name, mode, localMode, ret);
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
PARAM_STATIC int RegisterSecurityDacOps(ParamSecurityOps *ops, int isInit)
|
||||
|
Loading…
Reference in New Issue
Block a user