/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2017 - 2019 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Contact: Rafal Krypa <r.krypa@samsung.com>
+ * Contact: Tomasz Swierczek <t.swierczek@samsung.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
if (mapIter == storagePrivilegePathMap.end())
continue;
- for (auto &privilegePath : mapIter->second)
+ for (auto &privilegePath : mapIter->second) {
+ if (FS::directoryStatus(privilegePath.dstPath) == 0) {
+ LogWarning("Not enforcing privilege " << privName << " for application " << entry.smackLabel << " : " <<
+ "directory " << privilegePath.dstPath << " doesn't exist");
+ continue;
+ }
if (SECURITY_MANAGER_SUCCESS != applyPrivilegePath(allowed, privilegePath))
status = -1;
+ }
}
} catch (...) {
status = -1;