Add audit-trail api
authorSangwan Kwon <sangwan.kwon@samsung.com>
Mon, 9 Mar 2020 01:41:43 +0000 (10:41 +0900)
committerSangwan Kwon <sangwan.kwon@samsung.com>
Mon, 9 Mar 2020 01:41:43 +0000 (10:41 +0900)
Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
doc/:q [deleted file]
doc/tizen-audit-api.md [new file with mode: 0644]

diff --git a/doc/:q b/doc/:q
deleted file mode 100644 (file)
index d659723..0000000
--- a/doc/:q
+++ /dev/null
@@ -1,25 +0,0 @@
-
-  7 +--------------------------------+----------------------+----------------------------------------------------------+
-  8 |            Policy Name         |     Policy state     |                       Query API                          |
-  9 +--------------------------------+----------------------+----------------------------------------------------------+
- 10 | wifi                           | allowed / disallowed | dpm_restriction_get_wifi_state                           |
- 11 | wifi-hotspot                   | allowed / disallowed | dpm_restriction_get_wifi_hotspot                         |
- 12 | wifi-profile-change            | allowed / disallowed | dpm_wifi_is_profile_change_restricted                    |
- 13 | wifi-ssid-restriction          | allowed / disallowed | dpm_wifi_is_network_access_restricted                    |
- 14 | bluetooth                      | allowed / disallowed | dpm_restriction_get_bluetooth_mode_change_state          |
- 15 | bluetooth-tethering            | allowed / disallowed | dpm_restriction_get_bluetooth_tethering_state            |
- 16 | bluetooth-desktop-connectivity | allowed / disallowed | dpm_restriction_get_bluetooth_desktop_connectivity_state |
- 17 | bluetooth-pairing              | allowed / disallowed | dpm_restriction_get_bluetooth_pairing_state              |
- 18 | bluetooth-device-restriction   | allowed / disallowed | dpm_bluetooth_is_device_restricted                       |
- 19 | bluetooth-uuid-restriction     | allowed / disallowed | dpm_bluetooth_is_uuid_restricted                         |
- 20 | usb                            | allowed / disallowed | dpm_restriction_get_usb_state                            |
- 21 | usb-tethering                  | allowed / disallowed | dpm_restriction_get_usb_tethering_state                  |
- 22 | usb-debugging                  | allowed / disallowed | dpm_restriction_get_usb_debugging_state                  |
- 23 | settings-changes               | allowed / disallowed | dpm_restriction_get_setting_changes_state                |
- 24 | external-storage               | allowed / disallowed | dpm_restriction_get_external_storage_state               |
- 25 | camera                         | allowed / disallowed | dpm_restriction_get_camera_state                         |
- 26 | clipboard                      | allowed / disallowed | dpm_restriction_get_clipboard_state                      |
- 27 | location                       | allowed / disallowed | dpm_restriction_get_location_state                       |
- 28 | microphone                     | allowed / disallowed | dpm_restriction_get_microphone_state                     |
- 29 +--------------------------------+----------------------+----------------------------------------------------------+
-
diff --git a/doc/tizen-audit-api.md b/doc/tizen-audit-api.md
new file mode 100644 (file)
index 0000000..466096c
--- /dev/null
@@ -0,0 +1,24 @@
+```c
+int audit_user_log_get_time(audit_user_log_h handle,
+int audit_user_log_get_pid(audit_user_log_h handle, pid_t *pid);
+int audit_user_log_get_type(audit_user_log_h handle, int *type);
+int audit_user_log_get_text(audit_user_log_h handle, char **text);
+
+int audit_trail_clear_user_log(audit_trail_h handle);
+int audit_trail_foreach_user_log(audit_trail_h handle,
+int audit_trail_add_user_log_cb(audit_trail_h handle,
+int audit_trail_remove_user_log_cb(audit_trail_h handle,
+
+int audit_system_log_get_time(audit_system_log_h handle,
+int audit_system_log_get_subject_name(audit_system_log_h handle,
+.
+.
+.
+int audit_system_log_get_object_inode(audit_system_log_h handle, ino_t *inode);
+int audit_system_log_get_object_dev(audit_system_log_h handle, dev_t *dev);
+
+int audit_trail_clear_system_log(audit_trail_h handle);
+int audit_trail_foreach_system_log(audit_trail_h handle,
+int audit_trail_add_system_log_cb(audit_trail_h handle,
+int audit_trail_remove_system_log_cb(audit_trail_h handle,
+```