bad root privilege dropping in apport?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apport |
New
|
Undecided
|
Unassigned |
Bug Description
I have a program that purposely crashes to give me a coredump so that I can exercise gdb, but I wasn't getting any core dump.
Checking /var/log/apport.log shows "executable was modified after program start, ignoring",
but this is not in fact true.
The program lives on an NFS partition where root privileges are dropped (->nobody), the directory it lives in has 700 permissions, and thus the os.path.exists test in /usr/share/
if not os.path.
This code in drop_privileges seems wrong:
if partial:
else:
apport is running as root, so os.gete[gu]id() will return root.
If you want the e[gu]id of the task, that's what stat.st_[gu]id are.
Question: What partial privileges are intended to be dropped here?
Setting aside when to drop privileges (you need to do some things as root first), it seems like the "partial" parameter to drop_privileges should be deleted.
[It could certainly be that I'm missing something though!]