Re: [PATCH] fs/coredump: Prevent "" / "." / ".." core path components

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 05, 2016 at 01:52:25PM -0800, Andrew Morton wrote:
> On Tue,  5 Jan 2016 19:38:13 +0100 Jann Horn <jann@xxxxxxxxx> wrote:
> 
> > Let %h and %e print empty values as "!", "." as "!" and
> > ".." as "!.".
> 
> How can an empty name cause the core file name to contain a "//"?
> 
> And how can a "//" "cause the coredump to happen one directory level
> too high"?  That's what ".." does.  And a "//" in a pathname is the
> same as a "/"?
> 
> And what's wrong with a plain old "."?  That doesn't change the
> directory level.
> 
> Confused.

Consider the case where someone decides to sort coredumps by hostname
with a core pattern like "/cores/%h/core.%e.%p.%t" or so. In this
case, hostnames "" and "." would cause the coredump to land directly
in /cores, which is not what the intent behind the core pattern is,
and ".." would cause the coredump to land in /.

Yeah, there probably aren't many people who do that, but I still
don't want this edgecase to be kind of broken.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux