Currently, this service is not able to be activated by systemd.socket.
Instead of activating by systemd, I will do labeling the socket file using smack_fset function.
After I can see the service is running well, I will try change it to be activated by systemd-socket.
But it requires some more testing and stabilizing, before change it, I need to see whether the service is running well or not.
Is it possible to activate the one service process via multiple socket files?
Change-Id: Ifed525bcc906be2f7b49791e668223285b202494
return LB_STATUS_ERROR_FAULT;
}
- if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), BADGE_SMACK_LABEL, SMACK_LABEL_IPOUT) != 0) {
+ if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), "@", SMACK_LABEL_IPOUT) != 0) {
if (errno != EOPNOTSUPP) {
ErrPrint("Unable to set SMACK label(%d)\n", errno);
service_common_destroy(s_info.svc_ctx);
}
}
- if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), BADGE_SMACK_LABEL, SMACK_LABEL_IPIN) != 0) {
+ if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), "*", SMACK_LABEL_IPIN) != 0) {
if (errno != EOPNOTSUPP) {
ErrPrint("Unable to set SMACK label(%d)\n", errno);
service_common_destroy(s_info.svc_ctx);
return LB_STATUS_ERROR_FAULT;
}
- if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), NOTIFICATION_SMACK_LABEL, SMACK_LABEL_IPOUT) != 0) {
+ if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), "@", SMACK_LABEL_IPOUT) != 0) {
if (errno != EOPNOTSUPP) {
ErrPrint("Unable to set SMACK label(%d)\n", errno);
service_common_destroy(s_info.svc_ctx);
}
}
- if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), NOTIFICATION_SMACK_LABEL, SMACK_LABEL_IPIN) != 0) {
+ if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), "*", SMACK_LABEL_IPIN) != 0) {
if (errno != EOPNOTSUPP) {
ErrPrint("Unable to set SMACK label(%d)\n", errno);
service_common_destroy(s_info.svc_ctx);
return LB_STATUS_ERROR_FAULT;
}
- if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), SHORTCUT_SMACK_LABEL, SMACK_LABEL_IPOUT) != 0) {
+ if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), "@", SMACK_LABEL_IPOUT) != 0) {
if (errno != EOPNOTSUPP) {
ErrPrint("Unable to set SMACK label(%d)\n", errno);
service_common_destroy(s_info.svc_ctx);
}
}
- if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), SHORTCUT_SMACK_LABEL, SMACK_LABEL_IPIN) != 0) {
+ if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), "*", SMACK_LABEL_IPIN) != 0) {
if (errno != EOPNOTSUPP) {
ErrPrint("Unable to set SMACK label(%d)\n", errno);
service_common_destroy(s_info.svc_ctx);
return LB_STATUS_ERROR_FAULT;
}
- if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), UTILITY_SMACK_LABEL, SMACK_LABEL_IPOUT) != 0) {
+ if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), "@", SMACK_LABEL_IPOUT) != 0) {
if (errno != EOPNOTSUPP) {
ErrPrint("Unable to set SMACK label(%d)\n", errno);
service_common_destroy(s_info.svc_ctx);
}
}
- if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), UTILITY_SMACK_LABEL, SMACK_LABEL_IPIN) != 0) {
+ if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), "*", SMACK_LABEL_IPIN) != 0) {
if (errno != EOPNOTSUPP) {
ErrPrint("Unable to set SMACK label(%d)\n", errno);
service_common_destroy(s_info.svc_ctx);