summaryrefslogtreecommitdiff
path: root/fs/cachefiles/security.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-23 17:23:05 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-23 17:23:05 +0100
commit1a910d5fb23961c8b03dc1f0465f68fbb4d4a70a (patch)
tree0de41ccf345a287971e9767783612383a427191b /fs/cachefiles/security.c
parenteca38256279414c7c17b091434c79e3a9a8608cc (diff)
parent62b2447ec6cf3f8ce4b768cacd7b787a04f54a14 (diff)
Merge v6.12.11
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cachefiles/security.c')
-rw-r--r--fs/cachefiles/security.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cachefiles/security.c b/fs/cachefiles/security.c
index fe777164f1d8..fc6611886b3b 100644
--- a/fs/cachefiles/security.c
+++ b/fs/cachefiles/security.c
@@ -18,7 +18,7 @@ int cachefiles_get_security_ID(struct cachefiles_cache *cache)
struct cred *new;
int ret;
- _enter("{%s}", cache->secctx);
+ _enter("{%u}", cache->have_secid ? cache->secid : 0);
new = prepare_kernel_cred(current);
if (!new) {
@@ -26,8 +26,8 @@ int cachefiles_get_security_ID(struct cachefiles_cache *cache)
goto error;
}
- if (cache->secctx) {
- ret = set_security_override_from_ctx(new, cache->secctx);
+ if (cache->have_secid) {
+ ret = set_security_override(new, cache->secid);
if (ret < 0) {
put_cred(new);
pr_err("Security denies permission to nominate security context: error %d\n",