[pve-devel] [PATCH container v2] improve mountpoint parsing
Wolfgang Bumiller
w.bumiller at proxmox.com
Fri Feb 5 08:01:40 CET 2016
> On February 4, 2016 at 4:52 PM Dietmar Maurer <dietmar at proxmox.com> wrote:
>
>
> > > with the new behaviour, we don't need sanitize_mountpoint anymore:
> > >
> > > Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> >
> > Acked-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
>
> This looks potentially dangerous to me. Is there a reason (bug) for that
> change? Or is this just a cleanup?
It makes more sense than the sanitize code which on the one hand can't
take symlinks into account (known and ignored on purpose) and on the
other hand breaks paths with multiple ../ in a row.
It's still good enough, since there is no real use case for this other
than when you're deliberately trying to break stuff).
So turning such paths into an error is a viable alternative. Using a
`format` with a verify function means it also cannot be set via `pct set`
or the API, only by directly editing files as root in /etc/pve.
More information about the pve-devel
mailing list