From d9bf0729b58d4e3c0c66015961013c1cb64c4a24 Mon Sep 17 00:00:00 2001
From: Zdenek Pytela <zpytela@redhat.com>
Date: Thu, 20 Jan 2022 17:15:18 +0100
Subject: [PATCH] Allow tumblerd write to session_dbusd tmp socket files

Reference: https://gitbub.com/fedora-selinux/selinux-policy/commit/d9bf0729b58d4e3c0c66015961013c1cb64c4a24
Conflict: NA

Addresses the following AVC denial:
type=AVC msg=audit(1642635456.954:3314): avc:  denied  { write } for  pid=104519 comm="tumblerd" name="bus" dev="tmpfs" ino=40 scontext=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 tcontext=system_u:object_r:session_dbusd_tmp_t:s0 tclass=sock_file permissive=0

Resolves: rhbz#2042696
Signed-off-by: lujie54 <lujie54@huawei.com>
---
 policy/modules/contrib/thumb.te | 1 +
 1 file changed, 1 insertion(+)

diff --git a/policy/modules/contrib/thumb.te b/policy/modules/contrib/thumb.te
index 0444a36..27eb72c 100644
--- a/policy/modules/contrib/thumb.te
+++ b/policy/modules/contrib/thumb.te
@@ -146,6 +146,7 @@ optional_policy(`
 	dbus_stream_connect_session_bus(thumb_t)
 	dbus_chat_session_bus(thumb_t)
 	dbus_system_bus_client(thumb_t)
+	dbus_write_session_tmp_sock_files(thumb_t)
 ')
 
 optional_policy(`
-- 
1.8.3.1

