30 lines
842 B
Diff
30 lines
842 B
Diff
From d99b5a313a2790b1ca703023112f548cbe65617a Mon Sep 17 00:00:00 2001
|
|
From: Stephen Smalley <stephen.smalley.work@gmail.com>
|
|
Date: Tue, 19 May 2026 08:13:40 -0400
|
|
Subject: [PATCH] sandbox/seunshare: fix fd_tmpdir_r check
|
|
Content-type: text/plain
|
|
|
|
Check fd_tmpdir_r not fd for a failed pin_dir() here.
|
|
|
|
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
|
|
---
|
|
sandbox/seunshare.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/sandbox/seunshare.c b/sandbox/seunshare.c
|
|
index 3afe1554ae56..7a4233fbee00 100644
|
|
--- a/sandbox/seunshare.c
|
|
+++ b/sandbox/seunshare.c
|
|
@@ -1034,7 +1034,7 @@ int main(int argc, char **argv) {
|
|
*/
|
|
if (tmpdir_r) {
|
|
fd_tmpdir_r = pin_dir(tmpdir_r, &sb);
|
|
- if (fd < 0)
|
|
+ if (fd_tmpdir_r < 0)
|
|
goto childerr;
|
|
/*
|
|
* tmpdir_r checks differ in that it is
|
|
--
|
|
2.54.0
|
|
|