Bug 2149384

Summary: sudo disables coredumping
Product: [Fedora] Fedora Reporter: Zbigniew JÄ™drzejewski-Szmek <zbyszek>
Component: sudoAssignee: Radovan Sroka <rsroka>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: alakatos, kzak, mattdm, rsroka, tosykora, zfridric
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zbigniew Jędrzejewski-Szmek 2022-11-29 19:00:53 UTC
Description of problem:
I noticed this when looking into an issue with dnf5. Sudo set's ulimit core to 0, which effectively disables coredumps, making it hard to debug issues in compiled programs executed via sudo. I don't know if this is a question of configuration or defaults, but please make sudo not touch limits.

Version-Release number of selected component (if applicable):
sudo-1.9.11-4.p3.fc37.x86_64

How reproducible:
Deterministic.

Steps to Reproduce:
1. sudo grep core /proc/self/limits

Actual results:
$ sudo grep core /proc/self/limits
Max core file size        0                    0                    bytes     

Expected results:
$ sudo systemd-run -t grep core /proc/self/limits
Running as unit: run-u5051.service
Max core file size        unlimited            unlimited            bytes     

$ su -c 'grep core /proc/self/limits'
Password: 
Max core file size        unlimited            unlimited            bytes     

Additional info:
I suspect this might be related to old times where coredumps were written to the working directory and it made sense for sudo to disable coredumps. But now they are stored in a central location, so there is no reason to not allow them.

Comment 1 Ben Cotton 2023-02-07 15:00:11 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.