platform/core/connectivity/stc-manager.git
5 years agoChecked file stat before realpath 63/185263/1 accepted/tizen/unified/20180801.144858 submit/tizen/20180727.073401 submit/tizen/20180731.041744
hyunuktak [Fri, 27 Jul 2018 06:26:35 +0000 (15:26 +0900)]
Checked file stat before realpath

Change-Id: Iae4a7b7f97b90389a5c35ccf6144e42b3b525d02
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoFix Wformat build error 31/184931/1
yhji [Tue, 24 Jul 2018 09:53:44 +0000 (18:53 +0900)]
Fix Wformat build error

Change-Id: I042b7e02b72dcd5b4e6e2a0d07fed3393aaad6db
Signed-off-by: yhji <yhji.lee@samsung.com>
5 years agoMerge "Added log and nflog rule for firewall" into tizen accepted/tizen/unified/20180725.060450 submit/tizen/20180724.092802
Jaehyun Kim [Tue, 24 Jul 2018 09:16:30 +0000 (09:16 +0000)]
Merge "Added log and nflog rule for firewall" into tizen

5 years agoChange file mode into 644 67/184567/2
Taesoo Jun [Thu, 19 Jul 2018 01:44:58 +0000 (10:44 +0900)]
Change file mode into 644

Change-Id: Ibc02513b4cca3207d3137ce88b7ffd9735439eeb
Signed-off-by: Taesoo Jun <steve.jun@samsung.com>
5 years agoFix local variable initialization and handle a invalid parameter 66/184566/2
Taesoo Jun [Thu, 19 Jul 2018 01:40:40 +0000 (10:40 +0900)]
Fix local variable initialization and handle a invalid parameter

Change-Id: Idc99e6b41528f0429882d2bf91e4bbe0c997b05d
Signed-off-by: Taesoo Jun <steve.jun@samsung.com>
5 years agoAdded log and nflog rule for firewall 84/184484/3
hyunuktak [Wed, 18 Jul 2018 08:14:28 +0000 (17:14 +0900)]
Added log and nflog rule for firewall

Change-Id: I7361422a530040610eb45328073ebc75f906cfe1
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoMerge "Modified to update firewall rule" into tizen accepted/tizen/unified/20180717.063039 submit/tizen/20180713.100308
taesub kim [Fri, 13 Jul 2018 07:29:00 +0000 (07:29 +0000)]
Merge "Modified to update firewall rule" into tizen

5 years agoModified to update firewall rule 33/184033/1
hyunuktak [Fri, 13 Jul 2018 06:46:36 +0000 (15:46 +0900)]
Modified to update firewall rule

Change-Id: I0a452c3e7eea1a33f93f7a39df182d9e77c01ced
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoModified to send message to net popup 80/183880/1
hyunuktak [Thu, 12 Jul 2018 05:38:00 +0000 (14:38 +0900)]
Modified to send message to net popup

Change-Id: I0ffbc76a3fc0ecee7eb9ba295a32f32f6f8391c4
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoAdded data limits monitoring for daily, weekly and monthly 28/183828/1
hyunuktak [Wed, 11 Jul 2018 09:11:42 +0000 (18:11 +0900)]
Added data limits monitoring for daily, weekly and monthly

Change-Id: Ibc94757d36210c9167ebe4ddb7c36053d13f60fd
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoSync current time 88/183288/1 accepted/tizen/unified/20180712.092638 submit/tizen/20180711.083748
hyunuktak [Wed, 4 Jul 2018 06:13:27 +0000 (15:13 +0900)]
Sync current time

Change-Id: I0b741ffd37d3848a6ce01c260908e3acd8b80cf2
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoFix some security issues 45/182445/1 accepted/tizen/unified/20180628.130455 submit/tizen/20180627.105126
hyunuktak [Mon, 25 Jun 2018 07:58:38 +0000 (16:58 +0900)]
Fix some security issues

Change-Id: I2b31052aa20c028f0a4b496ec50b54641cce8bd9
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoFix a build warning for initialization from incompatible pointer type 97/181597/2 submit/tizen/20180620.111119
hyunuktak [Fri, 15 Jun 2018 04:33:54 +0000 (13:33 +0900)]
Fix a build warning for initialization from incompatible pointer type

Change-Id: I780bcde31ee66a14e1b9d18521b8c1ef8d6350b8
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoAdd inotify for information config 98/181098/2 accepted/tizen/unified/20180612.044129 submit/tizen/20180611.090847
hyunuktak [Fri, 8 Jun 2018 05:51:25 +0000 (14:51 +0900)]
Add inotify for information config

Change-Id: I2d7a54bb54390442702dfe78ab30cd3434a898df
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoOrganize log for print tree 11/180611/1
hyunuktak [Thu, 31 May 2018 07:06:51 +0000 (16:06 +0900)]
Organize log for print tree

Change-Id: Ie27476ac28f8939df71dd0739adbcfccad427fb1
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoLoad procfs on booting time 08/180508/1
hyunuktak [Wed, 30 May 2018 07:24:44 +0000 (16:24 +0900)]
Load procfs on booting time

Change-Id: If68c6428cfb364aff9fbfd2a904ff6fee82a6a4d
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoRemoved secure dlog for sql query 58/179858/1 accepted/tizen/unified/20180523.144409 submit/tizen/20180523.054826
hyunuktak [Wed, 23 May 2018 04:20:27 +0000 (13:20 +0900)]
Removed secure dlog for sql query

Change-Id: I1505bd691ed8a28e6e552eda033e864b4012b592
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoFix: Malloc only when making process entry in tree 16/179616/1 accepted/tizen/unified/20180521.003651 submit/tizen/20180521.000329
Nishant Chaprana [Fri, 18 May 2018 14:48:09 +0000 (20:18 +0530)]
Fix: Malloc only when making process entry in tree

Description:
For some processes both FORK and EXEC events are emitted, however
we were allocating mamory in both methods, but not unallocating the
memory in failure case when entry was already present.

So we should malloc only when we are creating an entry in process tree.

Change-Id: Iedc3c10eabb41ad4da854ab8d0cf45759bbedcc7
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoCorrected file permissions 83/177783/2
Nishant Chaprana [Thu, 3 May 2018 14:50:30 +0000 (20:20 +0530)]
Corrected file permissions

Change-Id: Ic0392ac48d765bf5f7c9291bac4f573c84d78a1b
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years ago[Wformat] Fix Wformat build error 93/179393/1 submit/tizen/20180518.112755
Nishant Chaprana [Thu, 17 May 2018 12:49:39 +0000 (18:19 +0530)]
[Wformat] Fix Wformat build error

Change-Id: I418e75c7f403d1ee1d54f8236b39f20977513aab
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoAdd support for Tethering data monitoring and data restriction rules 19/177919/9 accepted/tizen/unified/20180515.163358 submit/tizen/20180511.091455 submit/tizen/20180514.105807
Milind Murhekar [Fri, 4 May 2018 10:18:28 +0000 (15:48 +0530)]
Add support for Tethering data monitoring and data restriction rules

Description: This patch applies the tethering interface
monitoring, when Hotspot is enabled/disabled, Also
it supports data restriction rules for tethering interface
including default network connection.

Change-Id: I2b79de433abde7b5ae46d1fb9d7b537975398dab
Signed-off-by: Milind Murhekar <m.murhekar@samsung.com>
5 years agoUpdated enum value for app state 96/178496/1 submit/tizen/20180510.090500
hyunuktak [Thu, 10 May 2018 07:00:48 +0000 (16:00 +0900)]
Updated enum value for app state

Change-Id: I9cd032ac4482968f43678fdb8c4773ef2253cdbb
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoAdded dbus method to commit ip6tables 14/178314/1 accepted/tizen/unified/20180510.134338 submit/tizen/20180510.023945
hyunuktak [Wed, 9 May 2018 08:33:45 +0000 (17:33 +0900)]
Added dbus method to commit ip6tables

Change-Id: Ic446d4575fc9fc901f7a609377475f1be64657ea
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
5 years agoReplaced rule type to direction 25/177825/1
hyunuktak [Fri, 4 May 2018 04:09:03 +0000 (13:09 +0900)]
Replaced rule type to direction

Change-Id: Ia158c9e54167d1da971d79d14940c6464b97abd3
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoRemoved exclude restriction method 26/177626/1 submit/tizen/20180503.122906
hyunuktak [Wed, 2 May 2018 08:05:10 +0000 (17:05 +0900)]
Removed exclude restriction method

Change-Id: Id61aa10111a725ce19197896a982496c4ad0f75e

6 years agoReplaced type from state for restriction 12/177612/1
hyunuktak [Wed, 2 May 2018 06:28:54 +0000 (15:28 +0900)]
Replaced type from state for restriction

Change-Id: Ib2575dc03a4447a4dd1878625580f353b474c927
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoSet debug log state in procfs 71/176571/1 accepted/tizen/unified/20180424.082602 submit/tizen/20180424.010339
hyunuktak [Fri, 20 Apr 2018 04:55:23 +0000 (13:55 +0900)]
Set debug log state in procfs

Change-Id: Ie87afa1d649a3a4f4a029d5b76a3737eb1600afc
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoMerge "Fixed coverity issues for resource leak" into tizen accepted/tizen/unified/20180420.081858 submit/tizen/20180419.131851
Jaehyun Kim [Thu, 19 Apr 2018 05:32:51 +0000 (05:32 +0000)]
Merge "Fixed coverity issues for resource leak" into tizen

6 years agoFixed coverity issues for resource leak 76/176376/3
hyunuktak [Thu, 19 Apr 2018 02:15:31 +0000 (11:15 +0900)]
Fixed coverity issues for resource leak

Change-Id: Ic47d2c90497432236c69595b3d0b20a8bbce5a96
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoFixed dbus/cynara policy 91/176291/1
hyunuktak [Wed, 18 Apr 2018 05:43:53 +0000 (14:43 +0900)]
Fixed dbus/cynara policy

Change-Id: I6949b1926c998302975eb21fe05270221ef21b88
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoMerge "Added dbus method to commit iptables" into tizen accepted/tizen/unified/20180417.173151 submit/tizen/20180416.224349
taesub kim [Mon, 16 Apr 2018 08:57:45 +0000 (08:57 +0000)]
Merge "Added dbus method to commit iptables" into tizen

6 years agoMerge "Added firewall feature" into tizen
taesub kim [Mon, 16 Apr 2018 08:57:31 +0000 (08:57 +0000)]
Merge "Added firewall feature" into tizen

6 years agoAdded dbus method to commit iptables 56/175756/1
hyunuktak [Thu, 12 Apr 2018 06:36:05 +0000 (15:36 +0900)]
Added dbus method to commit iptables

Change-Id: I20c7623d92421a7d04c23e9a96ebc6708340f047
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoAdded firewall feature 28/174928/2
hyunuktak [Thu, 5 Apr 2018 06:25:28 +0000 (15:25 +0900)]
Added firewall feature

Change-Id: I9c71bc7af199d145509cbe0c7e935d16e85dfd8d
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoAdded dbus/cynara policy 73/174473/1
taesub kim [Mon, 2 Apr 2018 09:02:59 +0000 (18:02 +0900)]
Added dbus/cynara policy

Change-Id: Ic6107087ddf2a21fcd874fd125e402a36988c0df
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
6 years agoAdd exclusion rule logic 48/171048/2 accepted/tizen/unified/20180305.152640 submit/tizen/20180305.084154
Nishant Chaprana [Mon, 26 Feb 2018 07:32:54 +0000 (13:02 +0530)]
Add exclusion rule logic

Description:
This patch adds implementation below features for exclusion rule
1) add exclusion rule
2) delete exclusion rule
3) update exclusion rule

Change-Id: I30a0e2602a53c6d76d501717a8428a2e077b0ea4
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoSeparately identify restrictions by rst_type 39/170639/1
Nishant Chaprana [Wed, 21 Feb 2018 06:25:51 +0000 (11:55 +0530)]
Separately identify restrictions by rst_type

Description: This patch adds logic to separately identify restriction
on basis of restriction type (Blocked/Excluded).
Also it stores rst_type inplace of rst_state in restriction table because
rst_state is only to check whether restriction is active or not and
we are not required to store that information to database.

Change-Id: I5f540c5b791634072d58c87e7eceda8e6f653e76
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoCorrect typo mistakes 48/170248/1 accepted/tizen/unified/20180222.080217 submit/tizen/20180221.115722
Nishant Chaprana [Thu, 15 Feb 2018 10:26:24 +0000 (15:56 +0530)]
Correct typo mistakes

Change-Id: Ib03452f7d60b6f25f3e57bebe97dac0b4b1fecb3
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoFixed IPv4 and IPv6 monitoring issue 03/169703/1
hyunuktak [Thu, 8 Feb 2018 09:24:24 +0000 (18:24 +0900)]
Fixed IPv4 and IPv6 monitoring issue

Change-Id: I3fa0c4c550e21cbd87b5ef0e3f57de2487cf92c5
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoModified ip type to be properly monitored 72/169672/1
hyunuktak [Thu, 8 Feb 2018 07:29:17 +0000 (16:29 +0900)]
Modified ip type to be properly monitored

Change-Id: Ib08671b5c73a61418c6ad1643799f01efe97916b
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoMoved procfs for app lifecycle to plugin and separate plugins 02/169602/1
hyunuktak [Thu, 8 Feb 2018 01:30:35 +0000 (10:30 +0900)]
Moved procfs for app lifecycle to plugin and separate plugins

Change-Id: I0310a1761c6b5da28fb991dee7cd03cfdbb49d7b
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoMoved exception list to plugin 95/169595/1
hyunuktak [Thu, 8 Feb 2018 00:44:18 +0000 (09:44 +0900)]
Moved exception list to plugin

Change-Id: Iec04f0f7aba1862cde610a9e3c4d7c93f67674e0
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoFixed some svaces 50/169450/1
hyunuktak [Wed, 7 Feb 2018 02:17:27 +0000 (11:17 +0900)]
Fixed some svaces

WGID : 307350, 307352

Change-Id: I517541c5c088f2a0f30ea71186fcf9d2df332d9e
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years ago[Fix] Remove restriction from tree when user initiated remove operation 12/168312/2
Nishant Chaprana [Thu, 25 Jan 2018 12:53:41 +0000 (18:23 +0530)]
[Fix] Remove restriction from tree when user initiated remove operation

Change-Id: I96cff6077c12d0484643e63fc7da772285579e7f
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoUpdate classid for all valid restriction states 04/168304/2
Nishant Chaprana [Thu, 25 Jan 2018 12:15:56 +0000 (17:45 +0530)]
Update classid for all valid restriction states

Change-Id: I440ca17881dbf92954dfffbf57a18a64216c348f
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoFixed crash for wrong struct type cast 83/168183/2 accepted/tizen/unified/20180130.144325 accepted/tizen/unified/20180222.142204 submit/tizen/20180129.223849 submit/tizen/20180222.121108
hyunuktak [Thu, 25 Jan 2018 00:59:39 +0000 (09:59 +0900)]
Fixed crash for wrong struct type cast

Change-Id: If2d9679b345d2253ea26db22710590c86a93dadc
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoAdd initial source codes for gtest 49/168049/1
hyunuktak [Wed, 24 Jan 2018 00:55:02 +0000 (09:55 +0900)]
Add initial source codes for gtest

Change-Id: I41574b7e13b99c1a1fb14ee32b27d4352bbc933a
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoCreating seperate chains[STC_IN, STC_OUT, STC_FRWD] for STC Framework's rules. 12/163312/3 accepted/tizen/unified/20171219.072619 submit/tizen/20171218.085650
Nishant Chaprana [Fri, 8 Dec 2017 10:38:24 +0000 (16:08 +0530)]
Creating seperate chains[STC_IN, STC_OUT, STC_FRWD] for STC Framework's rules.

Change-Id: I74b9ce4d13fb9122c4e0ea05226a22a925d1a585
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoReplaces fork() and execv() calls with stc-iptables dbus method calls 60/162460/4
Nishant Chaprana [Fri, 1 Dec 2017 10:04:56 +0000 (15:34 +0530)]
Replaces fork() and execv() calls with stc-iptables dbus method calls

Change-Id: Iea3e6236e39c6747152e91965b785ceb6bc20023
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoFetching /proc/<pid>/status entry after validation. 60/157560/1 accepted/tizen/unified/20171026.074653 submit/tizen/20171025.074016
Nishant Chaprana [Wed, 25 Oct 2017 05:46:07 +0000 (11:16 +0530)]
Fetching /proc/<pid>/status entry after validation.

Description: This patch adds validation check before storing status
entries and assignes proper index for storing value.

In TM1 reference device kernel makes below entries in status file.
proc entry is like below:-
sh-3.2# cat /proc/373/status
Name:   stc-manager
State:  S (sleeping)
Tgid:   373
Pid:    373
PPid:   1
TracerPid:      0

However in Odroid reference device, kernel makes below entries in status.
sh-3.2# cat /proc/3404/status
Name:   stc-manager
State:  S (sleeping)
Tgid:   3404
Ngid:   0
Pid:    3404
PPid:   1
TracerPid:      0

Odroid kernel has an extra entry "Ngid" which breaks current extraction logic.
So added logic to match entry key before extracting value when reading status file.

Change-Id: I393ed476919fc8c101a8ce6a11ab835230a39021
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoRemoved inotify helper 89/156789/1 accepted/tizen/unified/20171020.091911 submit/tizen/20171020.040915
hyunuktak [Fri, 20 Oct 2017 04:00:04 +0000 (13:00 +0900)]
Removed inotify helper

Change-Id: I4de98b665307d02a75738dd8fd372eb85bfffaff
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoUse heap instead of stack, to aviod large stack usage issue in __process_contr_reply() 18/156018/1 accepted/tizen/unified/20171018.165230 submit/tizen/20171018.043426
Nishant Chaprana [Tue, 17 Oct 2017 03:17:50 +0000 (08:47 +0530)]
Use heap instead of stack, to aviod large stack usage issue in __process_contr_reply()

Change-Id: I447c0cca6658995f355693f0923c9395cabe0468
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years ago[nfacct-rule] Use heap instead of stack, to aviod large stack usage issue. 40/155840/2
Nishant Chaprana [Mon, 16 Oct 2017 09:16:50 +0000 (14:46 +0530)]
[nfacct-rule] Use heap instead of stack, to aviod large stack usage issue.

Change-Id: I5252955200603bc1c21b3b36b150e174447ce20c
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years ago[Fix] Memory leak while fetching data from config file 70/155770/1
Nishant Chaprana [Mon, 16 Oct 2017 06:14:42 +0000 (11:44 +0530)]
[Fix] Memory leak while fetching data from config file

Change-Id: I2126b99837fb53c9a504ba47580c2fcfba5b5fd7
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoUpdate ground state in table while updating data usage. 59/155759/1 accepted/tizen/unified/20171018.062540 submit/tizen/20171016.080431 submit/tizen/20171017.050741 submit/tizen/20171017.075711
Nishant Chaprana [Tue, 3 Oct 2017 09:02:45 +0000 (14:32 +0530)]
Update ground state in table while updating data usage.

Change-Id: I3288285af6febf4ce196d9fe8d965699b01bc22e
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoMerge "Revert "Update ground state in table while updating data usage."" into tizen
taesub kim [Mon, 16 Oct 2017 05:32:55 +0000 (05:32 +0000)]
Merge "Revert "Update ground state in table while updating data usage."" into tizen

6 years agoMerge "Revert "[Fix] Fetch proper app_id for creation of cgroup."" into tizen
taesub kim [Mon, 16 Oct 2017 05:32:44 +0000 (05:32 +0000)]
Merge "Revert "[Fix] Fetch proper app_id for creation of cgroup."" into tizen

6 years agoRevert "Update ground state in table while updating data usage." 58/155758/1
taesub kim [Mon, 16 Oct 2017 05:31:33 +0000 (05:31 +0000)]
Revert "Update ground state in table while updating data usage."

This reverts commit 3b547510161f3098a3af865260dbd8b306546f7d.

Change-Id: Iccc7ec64a4758e8ec12e68d2b20e19339144056b

6 years agoRevert "[Fix] Fetch proper app_id for creation of cgroup." 56/155756/1
taesub kim [Mon, 16 Oct 2017 05:31:20 +0000 (05:31 +0000)]
Revert "[Fix] Fetch proper app_id for creation of cgroup."

This reverts commit 951a7b00437655c92d1a998c4e1ed4353010eb0b.

Change-Id: I10c8ea979a54ca189b0eab6c565e7320307e85e0

6 years agoUpdate ground state in table while updating data usage. 08/153908/2
Nishant Chaprana [Tue, 3 Oct 2017 09:02:45 +0000 (14:32 +0530)]
Update ground state in table while updating data usage.

Change-Id: I7bd13c92fac2994f2be22fa3000896ded3a5b70a
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years ago[Fix] Fetch proper app_id for creation of cgroup. 00/153900/3
Nishant Chaprana [Wed, 11 Oct 2017 05:32:29 +0000 (11:02 +0530)]
[Fix] Fetch proper app_id for creation of cgroup.

Description: The app_id was not extracted properly from procfs.
Some processes run with help of other daemons, for example
org.tizen.browser app is execued using efl_webprocess.

In this patch for resolving above issue,
if /proc/<pid>/attr/current file contains "User::Pkg::" wildcard string,
then we extract app_id from above file.
Otherwise we read /proc/<pid>/cmdline and fetch process_name as app_id.

Change-Id: I0eb46f4f675cec3f2323c0ab05388fec46c7781f
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoAdded information config with inotify 46/154346/3 accepted/tizen/unified/20171011.150213 submit/tizen/20171011.035354
hyunuktak [Tue, 10 Oct 2017 05:48:27 +0000 (14:48 +0900)]
Added information config with inotify

Change-Id: If6faf890e69fa7a2de05d362aada815c29778411
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoAdded exceptions for system call and bracket 43/154343/1
hyunuktak [Tue, 10 Oct 2017 05:42:33 +0000 (14:42 +0900)]
Added exceptions for system call and bracket

Change-Id: Ib28764520292f29b4378620680d3391ef2308c93
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoFixed coverity issues 40/154340/1
hyunuktak [Tue, 10 Oct 2017 05:37:42 +0000 (14:37 +0900)]
Fixed coverity issues

Change-Id: I19f27469c22bc1662c8a33afc92f3bebdc2c560d
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoExtract file name using /usr/apps keyword 37/154337/1
hyunuktak [Tue, 10 Oct 2017 05:33:38 +0000 (14:33 +0900)]
Extract file name using /usr/apps keyword

And ignore blank space

Change-Id: I36813811a9f0ad358d591ae197de0034c326486a
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoAdded extra debug logs under STC_DEBUG_LOG tag 30/154330/2
hyunuktak [Tue, 10 Oct 2017 05:27:08 +0000 (14:27 +0900)]
Added extra debug logs under STC_DEBUG_LOG tag

Change-Id: I40b7a6eae7e2adbf919b6f0359b162d221fbc124
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoMonitoring threads of a process using tgid and PROC_EVENT_FORK 27/154327/1
hyunuktak [Tue, 10 Oct 2017 05:17:01 +0000 (14:17 +0900)]
Monitoring threads of a process using tgid and PROC_EVENT_FORK

Change-Id: I7502aa99b04e06e7e7cce0067b43c5f400d99f4d
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoRemoved is_rule_present which is not valid 17/154317/1
hyunuktak [Tue, 10 Oct 2017 05:04:47 +0000 (14:04 +0900)]
Removed is_rule_present which is not valid

Change-Id: I783916db78b09d9351f2d322be9eb0007d3dfb69
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoSet STC_DEBUG_LOG flag 85/151485/1 accepted/tizen/unified/20170927.063134 submit/tizen/20170922.065607 submit/tizen/20170926.021226
hyunuktak [Thu, 21 Sep 2017 05:15:51 +0000 (14:15 +0900)]
Set STC_DEBUG_LOG flag

Change-Id: Ic4cfd5f7eb3fa1014db9486479d567e092486e1c
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoChanged cur classid path and initialize 20/151420/1
hyunuktak [Thu, 21 Sep 2017 01:30:02 +0000 (10:30 +0900)]
Changed cur classid path and initialize

Change-Id: Ib7c6bd5ce363a8079750e66943d287e86224e5c6
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoReplaced imsi to subscriber ID 99/151199/2
hyunuktak [Wed, 20 Sep 2017 07:35:35 +0000 (16:35 +0900)]
Replaced imsi to subscriber ID

Change-Id: Ie137cb045ab279416b3d3711f0cd55a1fe4543bd
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoAdded application exception list 62/150962/2
hyunuktak [Tue, 19 Sep 2017 07:44:25 +0000 (16:44 +0900)]
Added application exception list

it is checking internet privilege
it has used pkginfo package
it has a cycle as one day

Change-Id: I4dd8f2d0a8eec709790ea6929f8233c84cbd43a8
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoFixed a svace issue for 293218 08/150708/1 accepted/tizen/unified/20170920.081237 submit/tizen/20170918.114609
hyunuktak [Mon, 18 Sep 2017 09:29:20 +0000 (18:29 +0900)]
Fixed a svace issue for 293218

Change-Id: I0dff5c0cf7f228243c090a1213aee280ddc6bb63
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoGet process status from procfs 39/150239/2
hyunuktak [Fri, 15 Sep 2017 02:04:23 +0000 (11:04 +0900)]
Get process status from procfs

Change-Id: I8c9916ce129ec35f0f93d4d3c35afc0e67f3b7f1
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoAdded exception lists for monitoring 71/147971/6
hyunuktak [Wed, 6 Sep 2017 06:54:56 +0000 (15:54 +0900)]
Added exception lists for monitoring

Change-Id: I4f010db523cc8421a2cabcc62f868db976138597
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoMoved application ground status monitor to plugin. 09/150009/2
Nishant Chaprana [Thu, 14 Sep 2017 04:01:10 +0000 (09:31 +0530)]
Moved application ground status monitor to plugin.

Change-Id: Ie9680b6d25b73b8262529d02a7885e86396dfc32
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoAdded netlink connector for monitoring processes 24/144724/3 accepted/tizen/4.0/unified/20170901.202608 accepted/tizen/unified/20170825.043904 submit/tizen/20170824.072921 submit/tizen_4.0/20170831.131058
Nishant Chaprana [Thu, 17 Aug 2017 14:08:03 +0000 (19:38 +0530)]
Added netlink connector for monitoring processes

Change-Id: I43335ff9d4daf2ca0d01decb29d7837a8f76af9c
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoFixed a issue for using heap after free 74/142974/1 accepted/tizen/4.0/unified/20170828.223511 accepted/tizen/unified/20170811.021041 submit/tizen/20170809.085632 submit/tizen_4.0/20170828.100003
hyunuktak [Tue, 8 Aug 2017 05:37:56 +0000 (14:37 +0900)]
Fixed a issue for using heap after free

Change-Id: I6d79e47857211945aa29de2de71072dc98835bd4
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoIgnoring values of TOTAL_* details when fetching interface data. 83/140683/2 accepted/tizen/4.0/unified/20170816.013628 accepted/tizen/4.0/unified/20170816.020059 accepted/tizen/unified/20170728.195400 submit/tizen/20170727.063916 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0_unified/20170814.115522
Nishant Chaprana [Wed, 26 Jul 2017 05:01:13 +0000 (10:31 +0530)]
Ignoring values of TOTAL_* details when fetching interface data.

Description: When fetching interface related data and chunk data
TOTAL_IPV4, TOTAL_IPV6, TOTAL_WIFI, TOTAL_BLUETOOTH, TOTAL_DATACALL
app_id were increasing redundant data in fetch query.

Change-Id: Icc074219dfd9e83832d7f193040969fd23a30d43
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoFix: Fetching granularized data usage issue. 00/140600/1
Nishant Chaprana [Tue, 25 Jul 2017 13:31:31 +0000 (19:01 +0530)]
Fix: Fetching granularized data usage issue.

Description: This patch fixes the scenario where multiple entries
are sent to upper layer because of granularity, also this patch fixes
faulty fill operation when data is fetched from database.

Change-Id: Ifbd7fcd646f461277bdd8bc90379f452032b05fe
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoMonitoring system wide IPv4 and IPv6 data usage. 96/139796/1
Nishant Chaprana [Thu, 20 Jul 2017 10:53:51 +0000 (16:23 +0530)]
Monitoring system wide IPv4 and IPv6 data usage.

Change-Id: I66e8b7af58f7e4fc79b4cbf94581738218726311
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoFix: Extra "_BACKGROUND" was added in background cgroups. 86/139686/1
Nishant Chaprana [Thu, 20 Jul 2017 06:17:43 +0000 (11:47 +0530)]
Fix: Extra "_BACKGROUND" was added in background cgroups.

Description: An extra "_BACKGROUN" keywork was added when any update
in ground status was performed.

Change-Id: Ib297853b08c7516483d88674535b032f1ccd932c
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoAdded default sim's IMSI fetch logic. 68/139668/3
Nishant Chaprana [Thu, 20 Jul 2017 05:12:45 +0000 (10:42 +0530)]
Added default sim's IMSI fetch logic.

Change-Id: I9040fb2bec433e828c4289e3ce7841a901989dc8
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoAdded background restriction for data saver 81/138381/1 accepted/tizen/unified/20170717.165453 submit/tizen/20170713.075847
hyunuktak [Wed, 12 Jul 2017 04:53:50 +0000 (13:53 +0900)]
Added background restriction for data saver

Change-Id: I8bb5ae5c54affe6cf1c6bd35e4952b45cac04173
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoMerge "Corrected and optimized usage of fork and waitpid." into tizen accepted/tizen/unified/20170705.162743 submit/tizen/20170705.021946
taesub kim [Tue, 4 Jul 2017 03:41:26 +0000 (03:41 +0000)]
Merge "Corrected and optimized usage of fork and waitpid." into tizen

6 years agoCorrected and optimized usage of fork and waitpid. 98/136898/4
Nishant Chaprana [Mon, 3 Jul 2017 10:36:06 +0000 (16:06 +0530)]
Corrected and optimized usage of fork and waitpid.

The patch fixes below things:-
1. Do not call fork when arguments not present.
2. Do not call waitpid when fork returned pid as -1 from fork.
3. Corrected wrong english usage in function name by changing name
   of is_rule_exists => is_rule_present.

Change-Id: Ic42233a846df91cc1b7871a52b830fd59433a970
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoRemoved dbus service file 88/136888/1
hyunuktak [Mon, 3 Jul 2017 09:36:09 +0000 (18:36 +0900)]
Removed dbus service file

Change-Id: I2f05e6b55b263448f6881906df4bd949e3c6e352
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoRemoved dbus activation 59/136859/2 submit/tizen/20170703.091801
hyunuktak [Mon, 3 Jul 2017 07:59:16 +0000 (16:59 +0900)]
Removed dbus activation

Change-Id: I14f1ffb8979540b4c5829f1e071647adb36cea56
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoCalled appropriately waitpid() function 79/136779/1
hyunuktak [Mon, 3 Jul 2017 06:59:26 +0000 (15:59 +0900)]
Called appropriately waitpid() function

to wait for the child process to terminate.

Change-Id: I01778a0270026c0779f3484d31870278a7cd4a58
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoFixed restriction update logic, when user data limit of a restriction. 13/136513/2
Nishant Chaprana [Fri, 30 Jun 2017 05:17:29 +0000 (10:47 +0530)]
Fixed restriction update logic, when user data limit of a restriction.

Change-Id: I1784d6ad9485f2ebc21c26cc1e3941594b12ca04
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoMerge "Added logic to monitor and restrict data usage per interface" into tizen
taesub kim [Mon, 3 Jul 2017 01:58:13 +0000 (01:58 +0000)]
Merge "Added logic to monitor and restrict data usage per interface" into tizen

6 years agoAdded logic to monitor and restrict data usage per interface 82/135882/7
hyunuktak [Tue, 27 Jun 2017 07:33:14 +0000 (16:33 +0900)]
Added logic to monitor and restrict data usage per interface

Change-Id: I597acaa133cec9cd322309201ebf724582810cc4
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoReopening socket if G_IO error is received and updated debug logs. 96/136196/3 accepted/tizen/unified/20170703.064211 submit/tizen/20170630.014944
Nishant Chaprana [Wed, 28 Jun 2017 11:15:39 +0000 (16:45 +0530)]
Reopening socket if G_IO error is received and updated debug logs.

Change-Id: I58ee40fe4b3349dd26117907347893d892fd0a63
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoIgnoring SIGCHLD signal as exit status if child process is not required. 07/135907/1 accepted/tizen/unified/20170628.164020 submit/tizen/20170628.081621
Nishant Chaprana [Tue, 27 Jun 2017 08:49:33 +0000 (14:19 +0530)]
Ignoring SIGCHLD signal as exit status if child process is not required.

Description: This patch ignores the SIGCHLD event, so that kernel can
reap the child process automatically so that process table is properly updated.

Change-Id: I09283dbee630359a5daa5c2d25f97a65ac6dda3e
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoAdded check emulator environment 85/135185/2 accepted/tizen/unified/20170622.104910 submit/tizen/20170621.080105
hyunuktak [Wed, 21 Jun 2017 06:48:07 +0000 (15:48 +0900)]
Added check emulator environment

Change-Id: Ied3e0a4abe59f93445aa46c8a44868f52c82876c
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years agoMerge "Added a icon for datausage noti in plugin" into tizen submit/tizen/20170620.103311
taesub kim [Mon, 19 Jun 2017 05:54:47 +0000 (05:54 +0000)]
Merge "Added a icon for datausage noti in plugin" into tizen

6 years agoAdded a icon for datausage noti in plugin 98/134398/1
hyunuktak [Fri, 16 Jun 2017 07:56:49 +0000 (16:56 +0900)]
Added a icon for datausage noti in plugin

Change-Id: Ib6524cb938f0e5155951123cce092dff403701ab
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
6 years ago[STC Manager] Added logic to add and remove iptable rule of restriction. 62/134362/1
Nishant Chaprana [Fri, 16 Jun 2017 06:30:46 +0000 (12:00 +0530)]
[STC Manager] Added logic to add and remove iptable rule of restriction.

Description: This patch adds logic to add and remove iptable rule of
applied restriction, when application starts and exit respectively.

Change-Id: I873183cbd94c94b4d4fc8987cdcea66d82aaa7e9
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years ago[STC Manager] Support set/get for total data usage(Tx + Rx) in restriction. 49/134149/3
Nishant Chaprana [Thu, 15 Jun 2017 04:10:04 +0000 (09:40 +0530)]
[STC Manager] Support set/get for total data usage(Tx + Rx) in restriction.

Description: This patch removes seperate data usage limits for Tx
and Rx data and uses total data limit for setting Tx and Rx limits.

Change-Id: I6882e936c9cb076dda548ef95a10e105071df767
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoMerge "Removed unwanted function send_net_restriction() and its related code." into...
taesub kim [Fri, 16 Jun 2017 04:23:51 +0000 (04:23 +0000)]
Merge "Removed unwanted function send_net_restriction() and its related code." into tizen