#include "group2gid.h"
#include "mount-namespace.h"
#include "protocols.h"
+#include "security-manager-types.h"
#include "security-manager.h"
#include "service_impl.h"
#include "smack-check.h"
#include "tzplatform-config.h"
#include "utils.h"
+#include <errno.h>
#include <atomic>
#include <cassert>
#include <cstdio>
int ret = stat(path.c_str(), &st);
if (ret < 0) {
- LogError("Access to " << path << " failed with : " << ret);
+ auto statErrno = errno;
+ LogErrno("Access to " << path);
+ if (statErrno == ENOENT) {
+ return SECURITY_MANAGER_ERROR_NO_SUCH_OBJECT;
+ }
return SECURITY_MANAGER_ERROR_UNKNOWN;
}
puid = st.st_uid;
if (app_name)
*app_name = appName;
}
- return SECURITY_MANAGER_SUCCESS;
+ return request.getStatus();
});
});
}