Modified error log in case of failed relabel_self setup
authorTomasz Swierczek <t.swierczek@samsung.com>
Fri, 27 Oct 2023 14:05:59 +0000 (16:05 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Wed, 29 Nov 2023 10:07:42 +0000 (11:07 +0100)
Error in this place sometimes happens on VD images, but without
harsh consequences, as if it happened in places where the label
list is still empty. Added number of labels to be printed.

Change-Id: I564b819dd53ae359b908ee111573cdde950343ce

src/client/client-label-monitor.cpp

index 7050cf2..a92f151 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2022 Samsung Electronics Co., Ltd. All rights reserved
+ * Copyright (c) 2016-2023 Samsung Electronics Co., Ltd. All rights reserved
  *
  * This file is licensed under the terms of MIT License or the Apache License
  * Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
@@ -149,7 +149,7 @@ static lib_retcode apply_relabel_list(app_labels_monitor *monitor)
                         { return label.c_str(); });
 
         if (smack_set_relabel_self(temp.data(), temp.size()) != 0) {
-            LogError("smack_set_relabel_self failed");
+            LogError("smack_set_relabel_self failed, number of labels: " << temp.size());
             return SECURITY_MANAGER_ERROR_SET_RELABEL_SELF_FAILED;
         }
     } catch (PermissibleSet::PermissibleSetException::FileOpenError &e) {