mirror of
https://gitee.com/openharmony/startup_init
synced 2024-12-02 16:06:31 +00:00
commit
9d9685e55e
@ -164,10 +164,10 @@ static int SelinuxReadParamCheck(const char *name)
|
||||
if (label == NULL) { // open file with readonly
|
||||
ret = AddWorkSpace(WORKSPACE_NAME_DEF_SELINUX, 1, PARAM_WORKSPACE_MAX);
|
||||
} else {
|
||||
PARAM_LOGI("SelinuxReadParamCheck name %s label %s", name, label);
|
||||
ret = AddWorkSpace(label, 1, PARAM_WORKSPACE_MAX);
|
||||
}
|
||||
if (ret != 0) {
|
||||
PARAM_LOGV("SelinuxReadParamCheck name %s label %s ", name, label);
|
||||
return DAC_RESULT_FORBIDED;
|
||||
}
|
||||
return DAC_RESULT_PERMISSION;
|
||||
|
@ -129,7 +129,7 @@ int32_t WatcherManagerKits::AddWatcher(const std::string &keyPrefix, ParameterCh
|
||||
{
|
||||
WATCHER_LOGI("AddWatcher keyPrefix %s", keyPrefix.c_str());
|
||||
ParamWatcherKitPtr watcher = GetParamWatcher(keyPrefix);
|
||||
WATCHER_CHECK(watcher == nullptr, return watcher->GetWatcherId(),
|
||||
WATCHER_CHECK(watcher == nullptr, return -1,
|
||||
"Has been watched by keyPrefix %s", keyPrefix.c_str());
|
||||
|
||||
watcher = new ParamWatcher(keyPrefix, callback, context);
|
||||
|
Loading…
Reference in New Issue
Block a user