diff options
author | Tomasz Swierczek <t.swierczek@samsung.com> | 2019-12-18 08:19:32 +0100 |
---|---|---|
committer | Tomasz Swierczek <t.swierczek@samsung.com> | 2019-12-18 08:20:50 +0100 |
commit | 55b36e93d2f6fb1d7640fb7cbb5be54bf382e6f7 (patch) | |
tree | abeec391d593b168191b1599874b064a6c0c464a | |
parent | dc3dc6a31af832515d92094779daffeafa020838 (diff) | |
download | security-manager-55b36e93d2f6fb1d7640fb7cbb5be54bf382e6f7.tar.gz security-manager-55b36e93d2f6fb1d7640fb7cbb5be54bf382e6f7.tar.bz2 security-manager-55b36e93d2f6fb1d7640fb7cbb5be54bf382e6f7.zip |
Enhance few logs around application launching.
It was reported that some checks during our launching could be more verbose
and informative about what is going on. Added few more sentences to clearly
state if application process is improperly setup and why.
Change-Id: I47d6578dceff957cf76aa8ee690420d5a5cc9d7f
-rw-r--r-- | src/client/check-proper-drop.cpp | 6 | ||||
-rw-r--r-- | src/client/client-security-manager.cpp | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/client/check-proper-drop.cpp b/src/client/check-proper-drop.cpp index bc9ac814..ccb0b688 100644 --- a/src/client/check-proper-drop.cpp +++ b/src/client/check-proper-drop.cpp @@ -66,8 +66,10 @@ void CheckProperDrop::getThreads() bool CheckProperDrop::checkThreads() { #define REPORT_THREAD_ERROR(TID, NAME, VAL1, VAL2) { \ - LogError("Invalid value of " << (NAME) << " for thread " << (TID) << "." \ - << ". Process has " << (VAL1) << ", thread has " << (VAL2) << "."); \ + LogError("Invalid value of " << (NAME) << " for thread " << (TID) << ". " \ + << "Process has " << (VAL1) << ", thread has " << (VAL2) << ". " \ + << "Application candidate process not prepared properly for launch. " \ + << (NAME) << " values should be same for all threads."); \ return false; \ } diff --git a/src/client/client-security-manager.cpp b/src/client/client-security-manager.cpp index ba026c95..24ab61bb 100644 --- a/src/client/client-security-manager.cpp +++ b/src/client/client-security-manager.cpp @@ -853,7 +853,8 @@ int security_manager_prepare_app_candidate(void) FS::FileNameVector files = FS::getSubDirectoriesFromDirectory("/proc/self/task"); if (files.size() > 3) { // 3 because we have ., we have .. and we should have only one thread here - LogError("Too many threads in current process, can't switch to new namespace safely in multithreaded program"); + LogError("Too many threads in current process, can't switch to new namespace safely in multithreaded program. "\ + "Abort launching the application, as it may have too high privileges and pose risk to the system."); return SECURITY_MANAGER_ERROR_INPUT_PARAM; } return MountNS::createMountNamespace(); |