提交 f33a6c69 编写于 作者: R renwei

add socket node restorecon

Signed-off-by: Nrenwei <renwei8@huawei.com>
Change-Id: I8487cf0c1d5bc6fb5da34bf663743cf441337e8c
上级 c019615c
......@@ -25,6 +25,9 @@
#include "init_log.h"
#include "init_service.h"
#include "loop_event.h"
#ifdef WITH_SELINUX
#include "policycoreutils.h"
#endif
#include "securec.h"
#define SOCKET_BUFF_SIZE (256 * 1024)
......@@ -139,6 +142,12 @@ static int CreateSocket(ServiceSocket *sockopt)
return -1;
}
INIT_LOGI("CreateSocket %s success", sockopt->name);
#ifdef WITH_SELINUX
if (RestoreconRecurse(HOS_SOCKET_DIR)) {
INIT_LOGE("DoRestorecon failed for '%s', err %d.", sockopt->name, errno);
}
#endif
return sockopt->sockFd;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册