Log messages refactoring continued
authorZbigniew Jasinski <z.jasinski@samsung.com>
Mon, 17 Jun 2013 13:39:23 +0000 (15:39 +0200)
committerBartlomiej Grzelewski <b.grzelewski@samsung.com>
Thu, 6 Feb 2014 16:11:45 +0000 (17:11 +0100)
[Issue#]        SSDWSSP-323
[Bug/Feature]   Log messages refactoring
[Cause]         Legal issues with prohibited words in logs (ie. password)
[Solution]      Use SECURE_LOG* macro
[Verification]  Compile and run. No tests should fail

Change-Id: I8997084a6fbac44b21b253fa4a8765ebf6625ae9

src/client/security-server-client.c
src/server/security-server-cookie.c
src/server/security-server-main.c

index 9028981..d3bc4ac 100644 (file)
@@ -628,9 +628,9 @@ err:
 
     SEC_SVR_DBG("security_server_check_privilege_by_pid returned %d", ret);
     if (ret > 0)
-        SEC_SVR_DBG("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", cr.pid, subject, object, access_rights, ret, path);
+        SECURE_LOGD("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", cr.pid, subject, object, access_rights, ret, path);
     else
-        SEC_SVR_ERR("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", cr.pid, subject, object, access_rights, ret, path);
+        SECURE_LOGE("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", cr.pid, subject, object, access_rights, ret, path);
 
     free(path);
     free(subject);
index 7103e44..c564052 100644 (file)
@@ -284,9 +284,9 @@ cookie_list *search_cookie_new(const cookie_list *c_list,
 
                 SEC_SVR_DBG("SMACK have access returned %d", ret);
                 if (ret > 0)
-                    SEC_SVR_DBG("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", current->pid, current->smack_label, object, access_rights, ret, current->path);
+                    SECURE_LOGD("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", current->pid, current->smack_label, object, access_rights, ret, current->path);
                 else
-                    SEC_SVR_ERR("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", current->pid, current->smack_label, object, access_rights, ret, current->path);
+                    SECURE_LOGE("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", current->pid, current->smack_label, object, access_rights, ret, current->path);
 
                 if (ret == 1)
                 {
index 188b4a0..799dedf 100644 (file)
@@ -1124,9 +1124,9 @@ int process_pid_privilege_check(int sockfd, int datasize)
     path = read_exe_path_from_proc(pid);
 
     if (retval > 0)
-        SEC_SVR_DBG("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", pid, subject, object, access_rights, retval, path);
+        SECURE_LOGD("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", pid, subject, object, access_rights, retval, path);
     else
-        SEC_SVR_ERR("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", pid, subject, object, access_rights, retval, path);
+        SECURE_LOGE("SS_SMACK: caller_pid=%d, subject=%s, object=%s, access=%s, result=%d, caller_path=%s", pid, subject, object, access_rights, retval, path);
 
     if (path != NULL)
         free(path);