[Pkg-shadow-devel] [Git][debian/adduser][master] assume CAP_SYS_ADMIN not present if /proc not accessible
Marc Haber (@zugschlus)
gitlab at salsa.debian.org
Sun Feb 23 09:00:05 GMT 2025
Marc Haber pushed to branch master at Debian / adduser
Commits:
a25b0066 by Marc Haber at 2025-02-23T09:58:39+01:00
assume CAP_SYS_ADMIN not present if /proc not accessible
Thanks: Chris Hofstaedtler
Closes: #1098711
- - - - -
1 changed file:
- AdduserLogging.pm
Changes:
=====================================
AdduserLogging.pm
=====================================
@@ -115,7 +115,7 @@ sub logmsglevel {
sub check_sys_admin {
# this checks for SYS_ADMIN privilege, see #1074567
return $has_sys_admin if defined $has_sys_admin;
- open my $fh, '<', '/proc/self/status' or die "Can't open /proc/self/status: $!";
+ open my $fh, '<', '/proc/self/status' or return 0;
while (my $line = <$fh>) {
if ($line =~ /^CapEff:\s+[0-9a-fA-F]{10}([0-9a-fA-F]+)/) {
View it on GitLab: https://salsa.debian.org/debian/adduser/-/commit/a25b00667059d3b24a4fc1abddac63f961b963a9
--
View it on GitLab: https://salsa.debian.org/debian/adduser/-/commit/a25b00667059d3b24a4fc1abddac63f961b963a9
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-shadow-devel/attachments/20250223/19b670f2/attachment-0001.htm>
More information about the Pkg-shadow-devel
mailing list