[systemd-devel] [PATCH] fstab-generator: avoid mangling mount source and dest

Dave Reisner d at falconindy.com
Mon Jun 4 06:47:19 PDT 2012


On Mon, Jun 04, 2012 at 09:45:18AM -0400, Dave Reisner wrote:
> On Mon, Jun 04, 2012 at 03:25:29PM +0200, Kay Sievers wrote:
> > On Mon, Jun 4, 2012 at 2:04 PM, Dave Reisner <d at falconindy.com> wrote:
> > > On Mon, Jun 04, 2012 at 12:57:47PM +0200, Kay Sievers wrote:
> > >> On Sun, Jun 3, 2012 at 4:18 AM, Dave Reisner <dreisner at archlinux.org> wrote:
> > >> > This can invalidate otherwise valid source paths with trailing slashes,
> > >> > such as "host:/" in the case of a network mount. We don't really have
> > >> > any business touching these anyway, since we'll just pass this to
> > >> > /bin/mount, which sanitizes the paths for us.
> > >>
> > >> Changed it to use:
> > >>   path_is_absolute()
> > >> instead of:
> > >>   is_path(),
> > >> so that we still sanitize the input we might match against.
> > >>
> > >> Let me know, if you think that could still cause any problems?
> > >>
> > >> Thanks,
> > >> Kay
> > >
> > > Yes, this will still break CIFS shares.
> > 
> > Take II, please check. :)
> > 
> > Thanks,
> > Kay
> 
> Not the most convenient thing to type, but it gets the job done:
> 
> $ systemctl status '\x2esnap.mount'
> \x2esnap.mount - /.snap
>           Loaded: loaded (/etc/fstab)
>           Active: active (mounted) since Mon, 04 Jun 2012 09:40:09 -0400; 1min 4s ago
>            Where: /.snap
>             What: tmpfs
>          Process: 170 ExecMount=/bin/mount tmpfs /.snap -t tmpfs (code=exited, status=0/SUCCESS)
>           CGroup: name=systemd:/system/\x2esnap.mount
> 
> Could systemctl do the escaping for the user, or is that too drastic of an
> interface change?

Uggh... this was totally the wrong thread. Yes, the path mangling is fixed.

/me grabs more coffee


More information about the systemd-devel mailing list