public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-storage v4; pve-manager 0/4] fix #623: show isos/vztmpl/snippets in subdirs
@ 2023-07-21 12:23 Noel Ullreich
  2023-07-21 12:23 ` [pve-devel] [PATCH pve-storage v4 1/3] recursively go through subdirs to find files Noel Ullreich
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Noel Ullreich @ 2023-07-21 12:23 UTC (permalink / raw)
  To: pve-devel

This patch fixes #623, allowing isos/vztmpl/snippets in subdirectories.
This feature is opt-in and can be set from the API, web interface or
with `pvesm`.

changes from v3:
* moved regex that is often used into variables
* enabled going through symlinked directories as well.
 NB: there is no logic in this patch that looks for cycles, (so a symlink
 to the directory it is in will recurse). This is not a security concern
 since it can only recurse as many times as the depth has been set to, it
 might however lead to isos/templates/etc appearing multiple times with
 cycles in their paths.
 Imo, while it is ugly, it is an edgecase of a niche feature that
 doesn't break anything, so it's ok.
* changed name of parameter from subdir-depth to scan-depth

Noel Ullreich (3):
  recursively go through subdirs to find files
  add `scan-depth` option to filesystems
  update test for recursive subdir search

 src/PVE/Storage.pm                 | 11 +++++
 src/PVE/Storage/CIFSPlugin.pm      |  1 +
 src/PVE/Storage/CephFSPlugin.pm    |  1 +
 src/PVE/Storage/DirPlugin.pm       |  1 +
 src/PVE/Storage/GlusterfsPlugin.pm |  1 +
 src/PVE/Storage/NFSPlugin.pm       |  1 +
 src/PVE/Storage/Plugin.pm          | 61 ++++++++++++++++++---------
 src/test/filesystem_path_test.pm   | 18 ++++++++
 src/test/list_volumes_test.pm      | 68 ++++++++++++++++++++++++++++++
 src/test/parse_volname_test.pm     | 40 ++++++++++++++++++
 10 files changed, 182 insertions(+), 21 deletions(-)

Noel Ullreich (1):
  ui: add field to set subdir-depth in web interface

 www/manager6/storage/Base.js | 11 +++++++++++
 1 file changed, 11 insertions(+)


-- 
2.39.2





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-07-26  9:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-21 12:23 [pve-devel] [PATCH pve-storage v4; pve-manager 0/4] fix #623: show isos/vztmpl/snippets in subdirs Noel Ullreich
2023-07-21 12:23 ` [pve-devel] [PATCH pve-storage v4 1/3] recursively go through subdirs to find files Noel Ullreich
2023-07-26  9:34   ` Fabian Grünbichler
2023-07-21 12:23 ` [pve-devel] [PATCH pve-storage v4 2/3] add `scan-depth` option to filesystems Noel Ullreich
2023-07-21 12:23 ` [pve-devel] [PATCH pve-storage v4 3/3] update test for recursive subdir search Noel Ullreich
2023-07-21 12:23 ` [pve-devel] [PATCH pve-manager v4 1/1] ui: add field to set subdir-depth in web interface Noel Ullreich
2023-07-25  8:00 ` [pve-devel] [PATCH pve-storage v4; pve-manager 0/4] fix #623: show isos/vztmpl/snippets in subdirs Noel Ullreich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal