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.
_______________________________________________
Pkg-shadow-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-shadow-devel