ADD_DEFINITIONS("-DNOTIFICATION_SOCKET=\"/tmp/.notification.service\"")
ADD_DEFINITIONS("-DUTILITY_SOCKET=\"/tmp/.utility.service\"")
-ADD_DEFINITIONS("-DUTILITY_SMACK_LABEL=\"${PROJECT_NAME}::utility\"")
-ADD_DEFINITIONS("-DSHORTCUT_SMACK_LABEL=\"${PROJECT_NAME}::shortcut\"")
-ADD_DEFINITIONS("-DNOTIFICATION_SMACK_LABEL=\"${PROJECT_NAME}::notification\"")
-ADD_DEFINITIONS("-DBADGE_SMACK_LABEL=\"${PROJECT_NAME}::badge\"")
-ADD_DEFINITIONS("-DDATA_SHARE_LABEL=\"${PROJECT_NAME}::share\"")
-ADD_DEFINITIONS("-DDEFAULT_SMACK_LABEL=\"${PROJECT_NAME}\"")
+ADD_DEFINITIONS("-DUTILITY_SMACK_LABEL=NULL")
+ADD_DEFINITIONS("-DSHORTCUT_SMACK_LABEL=NULL")
+ADD_DEFINITIONS("-DNOTIFICATION_SMACK_LABEL=NULL")
+ADD_DEFINITIONS("-DBADGE_SMACK_LABEL=NULL")
+ADD_DEFINITIONS("-DDATA_SHARE_LABEL=NULL")
+ADD_DEFINITIONS("-DDEFAULT_SMACK_LABEL=NULL")
ADD_DEFINITIONS("-DDEFAULT_MASTER_CONF=\"/usr/share/${PROJECT_NAME}/conf.ini\"")
%files -n %{name}
%manifest %{name}.manifest
-%defattr(-,system,system,-)
+%defattr(-,root,root,-)
%caps(cap_chown,cap_dac_override,cap_dac_read_search,cap_sys_admin,cap_sys_nice,cap_mac_override,cap_mac_admin+ep) %{_bindir}/%{name}
%{_prefix}/lib/systemd/user/default.target.wants/%{name}.service
%{_prefix}/lib/systemd/user/default.target.wants/%{name}.path
%{_prefix}/etc/package-manager/parserlib/*
%{_datarootdir}/%{name}/*
/opt/etc/dump.d/module.d/dump_widget.sh
+%defattr(-,owner,users,-)
/opt/usr/share/live_magazine/*
/opt/dbspace/.widget.db*
-#%{_sysconfdir}/smack/accesses.d/%{name}
# End of a file
ErrPrint("chown: %d\n", errno);
}
- ret = smack_setlabel(WIDGET_CONF_IMAGE_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
- if (ret != 0) {
- ErrPrint("Failed to set SMACK for %s (%d)\n", WIDGET_CONF_IMAGE_PATH, ret);
- } else {
- ret = smack_setlabel(WIDGET_CONF_IMAGE_PATH, "1", SMACK_LABEL_TRANSMUTE);
- DbgPrint("[%s] is successfully created (t: %d)\n", WIDGET_CONF_IMAGE_PATH, ret);
+ if (!!DATA_SHARE_LABEL) {
+ ret = smack_setlabel(WIDGET_CONF_IMAGE_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
+ if (ret != 0) {
+ ErrPrint("Failed to set SMACK for %s (%d)\n", WIDGET_CONF_IMAGE_PATH, ret);
+ } else {
+ ret = smack_setlabel(WIDGET_CONF_IMAGE_PATH, "1", SMACK_LABEL_TRANSMUTE);
+ DbgPrint("[%s] is successfully created (t: %d)\n", WIDGET_CONF_IMAGE_PATH, ret);
+ }
}
if (mkdir(WIDGET_CONF_ALWAYS_PATH, 0755) < 0) {
ErrPrint("chown: %d\n", errno);
}
- ret = smack_setlabel(WIDGET_CONF_ALWAYS_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
- if (ret != 0) {
- ErrPrint("Failed to set SMACK for %s (%d)\n", WIDGET_CONF_ALWAYS_PATH, ret);
- } else {
- ret = smack_setlabel(WIDGET_CONF_ALWAYS_PATH, "1", SMACK_LABEL_TRANSMUTE);
- DbgPrint("[%s] is successfully created (t: %d)\n", WIDGET_CONF_ALWAYS_PATH, ret);
+ if (!!DATA_SHARE_LABEL) {
+ ret = smack_setlabel(WIDGET_CONF_ALWAYS_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
+ if (ret != 0) {
+ ErrPrint("Failed to set SMACK for %s (%d)\n", WIDGET_CONF_ALWAYS_PATH, ret);
+ } else {
+ ret = smack_setlabel(WIDGET_CONF_ALWAYS_PATH, "1", SMACK_LABEL_TRANSMUTE);
+ DbgPrint("[%s] is successfully created (t: %d)\n", WIDGET_CONF_ALWAYS_PATH, ret);
+ }
}
}
ErrPrint("chown: %d\n", errno);
}
- ret = smack_setlabel(WIDGET_CONF_READER_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
- if (ret != 0) {
- ErrPrint("Failed to set SMACK for %s (%d)\n", WIDGET_CONF_READER_PATH, ret);
- } else {
- ret = smack_setlabel(WIDGET_CONF_READER_PATH, "1", SMACK_LABEL_TRANSMUTE);
- DbgPrint("[%s] is successfully created (t: %d)\n", WIDGET_CONF_READER_PATH, ret);
+ if (!!DATA_SHARE_LABEL) {
+ ret = smack_setlabel(WIDGET_CONF_READER_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
+ if (ret != 0) {
+ ErrPrint("Failed to set SMACK for %s (%d)\n", WIDGET_CONF_READER_PATH, ret);
+ } else {
+ ret = smack_setlabel(WIDGET_CONF_READER_PATH, "1", SMACK_LABEL_TRANSMUTE);
+ DbgPrint("[%s] is successfully created (t: %d)\n", WIDGET_CONF_READER_PATH, ret);
+ }
}
}
ErrPrint("chown: %d\n", errno);
}
- ret = smack_setlabel(WIDGET_CONF_LOG_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
- if (ret != 0) {
- ErrPrint("Failed to set SMACK for %s (%d)\n", WIDGET_CONF_LOG_PATH, ret);
- } else {
- ret = smack_setlabel(WIDGET_CONF_LOG_PATH, "1", SMACK_LABEL_TRANSMUTE);
- DbgPrint("[%s] is successfully created (t: %d)\n", WIDGET_CONF_LOG_PATH, ret);
+ if (!!DATA_SHARE_LABEL) {
+ ret = smack_setlabel(WIDGET_CONF_LOG_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
+ if (ret != 0) {
+ ErrPrint("Failed to set SMACK for %s (%d)\n", WIDGET_CONF_LOG_PATH, ret);
+ } else {
+ ret = smack_setlabel(WIDGET_CONF_LOG_PATH, "1", SMACK_LABEL_TRANSMUTE);
+ DbgPrint("[%s] is successfully created (t: %d)\n", WIDGET_CONF_LOG_PATH, ret);
+ }
}
}
}