[pbs-devel] [PATCH v2 proxmox-backup] client: catalog shell: avoid navigating below archive root

Christian Ebner c.ebner at proxmox.com
Tue Sep 3 14:38:56 CEST 2024


On 8/30/24 10:00, Wolfgang Bumiller wrote:
> On Thu, Aug 08, 2024 at 01:42:03PM GMT, Christian Ebner wrote:
>> Avoid to underflow the catalogs shell position stack by navigating
>> below the archives root directory into the catalog root. Otherwise
>> the shell will panic, as the root entry is always expected to be
>> present.
>>
>> This threats the archive root directory as being it's own parent
>> directory, mimicking the behaviour of most common shells.
>>
>> Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
>> ---
>> Encountered while implementing the catalog shell for the split pxar
>> archive case.
>>
>> Without this additional check, a `cd ..` in the pxar archive root of
>> the catalog shell will panic.
> 
> 
> What about `cd ../../..` when *not* at a root, would we now ignore this
> without any error messages?

True, the case where the current working directory is not the root 
directory is not handled correctly as is. Will send a new version of the 
patch fixing that.

Thanks a lot!





More information about the pbs-devel mailing list