[Bug 1030519] Re: /proc/self/exe is not necessarily correct on overlayfs
Mike Mestnik
1030519 at bugs.launchpad.net
Wed Aug 1 23:52:11 UTC 2012
That's only some what reasonable. One would expect a perl API to work
always(but it doesn't)... However the same is not true of kernel APIs,
the opposite is vary much the case.
You don't call open() and then turn right around and operate on the new
file handle, no you don't even do this usually in perl. The same could
be true of files in proc and actually using stuff in proc is a vary bad
API to begin with and perl should migrate to using another API for this.
With open you test the return code and based on that you 'trust' the
file handle is iether usable or not usable. The same is true of proc,
you need to at the vary least see if this is a file that's executable, a
simple test.
I believe that every application using proc should be modified to not
depend on the API, as it CAN be changed at any time. It's not supposed
to be used by applications, that's why /sys was written.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to perl in Ubuntu.
https://bugs.launchpad.net/bugs/1030519
Title:
/proc/self/exe is not necessarily correct on overlayfs
Status in “logwatch” package in Ubuntu:
Incomplete
Status in “perl” package in Ubuntu:
New
Bug description:
Perl should check the value from /proc/self/exe for correctness. I'll
open a bug in logwatch also, however there are likely many more
applications that make use of this and depend on it's correctness.
Bug number 1007089 tracks the overlayfs bug.
/etc/cron.daily/00logwatch:
sh: 1: /bin/perl: not found
sh: 1: /bin/perl: not found
system 'cat '/var/log/mail.log' '/var/log/mail.log.1' | /bin/perl /usr/share/logwatch/scripts/shared/expandrepeats ''| /bin/perl /usr/share/logwatch/scripts/shared/applystddate ''>/tmp/logwatch.BMbdlb_J/maillog' failed: 32512 at /usr/sbin/logwatch line 871.
run-parts: /etc/cron.daily/00logwatch exited with return code 2
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: perl 5.14.2-6ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-23.31-lowlatency-pae 3.2.14
Uname: Linux 3.2.0-23-lowlatency-pae i686
ApportVersion: 2.0.1-0ubuntu8
Architecture: i386
Date: Sun Jul 29 09:06:20 2012
SourcePackage: perl
UpgradeStatus: Upgraded to precise on 2012-01-03 (208 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logwatch/+bug/1030519/+subscriptions
More information about the foundations-bugs
mailing list