summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiwoong Im <jiwoong.im@samsung.com>2016-11-28 14:18:34 +0900
committerJiwoong Im <jiwoong.im@samsung.com>2016-11-28 18:58:13 +0900
commit9ace4900aa7c53b14332ddbe3d6c16da5e7e81dc (patch)
tree7ea8a6b345103981a2a656ef482b757d151b3643
parente6acc2c162e264ae9d939b776bbffdd80ae3d3c9 (diff)
downloadalarm-manager-9ace4900aa7c53b14332ddbe3d6c16da5e7e81dc.tar.gz
alarm-manager-9ace4900aa7c53b14332ddbe3d6c16da5e7e81dc.tar.bz2
alarm-manager-9ace4900aa7c53b14332ddbe3d6c16da5e7e81dc.zip
replace module log saving path
- Because of permission, replace /var/log to /run/alarmmgr_log Change-Id: I239663fa965aab7b49efc74766a0743b2d13baad Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
-rw-r--r--alarm-manager.c7
-rw-r--r--alarmmgr_log_dump.sh2
-rw-r--r--packaging/alarm-agent.conf1
-rw-r--r--packaging/alarm-manager.conf2
-rw-r--r--packaging/alarm-manager.spec6
5 files changed, 11 insertions, 7 deletions
diff --git a/alarm-manager.c b/alarm-manager.c
index b97b6c2..efa6356 100644
--- a/alarm-manager.c
+++ b/alarm-manager.c
@@ -93,7 +93,7 @@ static int gfd = -1;
#define ALARMMGR_LOG_BUFFER_STRING_SIZE 200
#define ALARMMGR_LOG_TAG_SIZE 20
#define ALARMMGR_LOG_MESSAGE_SIZE 120
-#define ALARMMGR_LOG_FILE_PATH "/var/log/alarmmgr.log"
+#define ALARMMGR_LOG_FILE_PATH "/run/alarmmgr_log/alarmmgr.log"
static int log_index = 0;
static int log_fd = 0;
#endif
@@ -277,6 +277,9 @@ static void __rtc_set()
ALARM_MGR_EXCEPTION_PRINT("Alarm IRQs is not supported.");
ALARM_MGR_EXCEPTION_PRINT("RTC_WKALM_SET disabled ioctl is failed. errno = %s", strerror_r(errno, buf, sizeof(buf)));
+#ifdef _APPFW_FEATURE_ALARM_MANAGER_MODULE_LOG
+ __save_module_log("FAIL: SET RTC", log_message);
+#endif
return;
}
ALARM_MGR_LOG_PRINT("[alarm-server]RTC_WKALM_SET disabled ioctl is successfully done.");
@@ -3400,7 +3403,7 @@ gboolean alarm_manager_alarm_get_all_info(AlarmManager *pObject, GDBusMethodInvo
int index = 0;
for (gs_iter = alarm_context.alarms; gs_iter != NULL; gs_iter = g_slist_next(gs_iter)) {
entry = gs_iter->data;
- if (entry->uid != uid)
+ if (uid >= REGULAR_UID_MIN && entry->uid != uid)
continue;
++index;
SECURE_LOGD("#%d alarm id[%d] app_name[%s] duetime[%d]",
diff --git a/alarmmgr_log_dump.sh b/alarmmgr_log_dump.sh
index 9851f1a..985e5ac 100644
--- a/alarmmgr_log_dump.sh
+++ b/alarmmgr_log_dump.sh
@@ -3,7 +3,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
ALARMMGR_DUMP=$1/alarmmgr
mkdir -p $ALARMMGR_DUMP
-cp -f /var/log/alarmmgr.log $ALARMMGR_DUMP
+cp -f /run/alarmmgr_log/alarmmgr.log $ALARMMGR_DUMP
alarmmgr_get_all_info
mv -f /tmp/alarmmgr_* $ALARMMGR_DUMP
diff --git a/packaging/alarm-agent.conf b/packaging/alarm-agent.conf
deleted file mode 100644
index eae0124..0000000
--- a/packaging/alarm-agent.conf
+++ /dev/null
@@ -1 +0,0 @@
-d /run/alarm_agent 0777 root users -
diff --git a/packaging/alarm-manager.conf b/packaging/alarm-manager.conf
new file mode 100644
index 0000000..e4d6a58
--- /dev/null
+++ b/packaging/alarm-manager.conf
@@ -0,0 +1,2 @@
+d /run/alarm_agent 0777 root users -
+d /run/alarmmgr_log 0775 app_fw app_fw -
diff --git a/packaging/alarm-manager.spec b/packaging/alarm-manager.spec
index 8d53662..6d54be0 100644
--- a/packaging/alarm-manager.spec
+++ b/packaging/alarm-manager.spec
@@ -8,7 +8,7 @@ Source0: %{name}-%{version}.tar.gz
Source1: alarm-server.service
Source2: alarm-session-agent.service
Source3: alarm-session-agent.socket
-Source4: alarm-agent.conf
+Source4: alarm-manager.conf
Source5: 99-rtc.rules
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
@@ -112,7 +112,7 @@ install -m 0644 %SOURCE3 %{buildroot}%{_unitdir_user}/alarm-session-agent.socket
ln -s ../alarm-server.service %{buildroot}%{_unitdir}/multi-user.target.wants/alarm-server.service
ln -sf ../alarm_session_agent.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/alarm-session-agent.socket
mkdir -p %{buildroot}%{_tmpfilesdir}
-install -m 0644 %SOURCE4 %{buildroot}%{_tmpfilesdir}/alarm-agent.conf
+install -m 0644 %SOURCE4 %{buildroot}%{_tmpfilesdir}/alarm-manager.conf
%if 0%{?appfw_feature_wakeup_using_rtc}
mkdir -p %{buildroot}%{_libdir}/udev/rules.d
install -m 0644 %SOURCE5 %{buildroot}%{_libdir}/udev/rules.d
@@ -146,7 +146,7 @@ cp -f scripts/108.alarmmgr_upgrade.sh %{buildroot}%{upgrade_script_path}
%attr(0644,root,root) %{_datadir}/dbus-1/system-services/org.tizen.alarm.manager.service
%license LICENSE
%config %{_sysconfdir}/dbus-1/system.d/alarm-service.conf
-%{_tmpfilesdir}/alarm-agent.conf
+%{_tmpfilesdir}/alarm-manager.conf
%if 0%{?appfw_feature_wakeup_using_rtc}
%{_libdir}/udev/rules.d/99-rtc.rules
%endif