summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Bloch <m.bloch@samsung.com>2022-10-24 17:47:14 +0200
committerMichal Bloch <m.bloch@samsung.com>2022-10-24 19:26:39 +0200
commit35b0a0ba8583ecd461331e05e22f5efc39bc48a8 (patch)
treedbacd8535aae9b20da2f395f43514318f4b88277
parent8e64a826a1f659215cc36ffc74a16ff28112c6b1 (diff)
downloadsessiond-35b0a0ba8583ecd461331e05e22f5efc39bc48a8.tar.gz
sessiond-35b0a0ba8583ecd461331e05e22f5efc39bc48a8.tar.bz2
sessiond-35b0a0ba8583ecd461331e05e22f5efc39bc48a8.zip
Work-around a sub session creation issue
Seems to be a libsmack issue at a glance. Change-Id: I10dfc7e3cbc83450d730eaf4d008ac33e9b50a4b Signed-off-by: Michal Bloch <m.bloch@samsung.com>
-rw-r--r--src/service/src/fs_helpers.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/service/src/fs_helpers.cpp b/src/service/src/fs_helpers.cpp
index 504cb9e..c11d797 100644
--- a/src/service/src/fs_helpers.cpp
+++ b/src/service/src/fs_helpers.cpp
@@ -139,6 +139,15 @@ static int copy_label(auto label, auto dest_path, auto type)
return 0;
}
+ /* WORK-AROUND. It appears that for symlinks, ENOENT
+ * is returned instead of ENODATA but otherwise has
+ * the same meaning. We can be certain of the existence
+ * of the files because we wouldn't have reached here
+ * if creation failed, so don't bother checking for a
+ * false negative, and ignore this error. */
+ if (ret == -1 && errno == ENOENT)
+ return 0;
+
return ret;
}