Make allow-idmap optional (default: false) (#1541)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled

This is just to correct default behavior for now. More investigation
is necessary to properly support idmapping.
This commit is contained in:
trapexit 2025-10-06 15:46:58 -04:00 • committed by GitHub
parent 3cb35a3a65
commit 0f24bb29ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 27 additions and 4 deletions

View file

@ -16,6 +16,7 @@
#pragma once
#include <assert.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
@ -62,6 +63,9 @@ namespace ugid
Set(const uid_t newuid_,
const gid_t newgid_)
{
assert((int)newuid_ != -1);
assert((int)newgid_ != -1);
if(!initialized)
{
currentuid = GETEUID();
@ -81,7 +85,7 @@ namespace ugid
if(newgid_)
{
SETREGID(-1,newgid_);
initgroups(newuid_,newgid_);
ugid::initgroups(newuid_,newgid_);
}
if(newuid_)