summaryrefslogtreecommitdiff
path: root/bubblewrap.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2020-03-30 12:31:36 +0200
committerAlexander Larsson <alexl@redhat.com>2020-03-30 12:31:36 +0200
commit6f815ceeadd2728903b83f227945769c582e5c74 (patch)
treefac373021af11edc0730c4b13161c34be675bbba /bubblewrap.c
parent61955e933dfb5811377dbae3dd40eec60853f37a (diff)
downloadbubblewrap-6f815ceeadd2728903b83f227945769c582e5c74.tar.gz
drop_privs: More explicit argument name
changed_uid => already_changed_uid
Diffstat (limited to 'bubblewrap.c')
-rw-r--r--bubblewrap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bubblewrap.c b/bubblewrap.c
index 0db9f2c..b3d52bc 100644
--- a/bubblewrap.c
+++ b/bubblewrap.c
@@ -838,11 +838,11 @@ switch_to_user_with_privs (void)
/* Call setuid() and use capset() to adjust capabilities */
static void
drop_privs (bool keep_requested_caps,
- bool changed_uid)
+ bool already_changed_uid)
{
assert (!keep_requested_caps || !is_privileged);
/* Drop root uid */
- if (is_privileged && !changed_uid &&
+ if (is_privileged && !already_changed_uid &&
setuid (opt_sandbox_uid) < 0)
die_with_error ("unable to drop root uid");