Hi On Tue, Dec 1, 2026 at 2:07 PM Daniel P. Berrangé <[email protected]> wrote: > > On Tue, Dec 01, 2026 at 10:42:42AM +0100, Michal Prívozník via Devel wrote: > > On 10/6/26 14:28, Marc-André Lureau via Devel wrote: > > > For non-root (session) daemons, hooks were previously only searched > > > in /etc/libvirt/hooks. Add support for also searching in the user > > > directory (~/.config/libvirt/hooks), with the system directory > > > checked first. > > > > > > Introduce virHookGetDirs() which returns an ordered list of hook > > > directories to search. Update virHookCheck() and virHookCall() to > > > iterate over all directories, chaining hook output across them. > > > > > > Signed-off-by: Marc-André Lureau <[email protected]> > > > --- > > > src/util/virhook.c | 169 > > > ++++++++++++++++++++++++++++++++++++----------------- > > > 1 file changed, 115 insertions(+), 54 deletions(-) > > > > > > > Do we really want this? I mean, until now, there's nothing shared > > between system-wide and session daemons. I always thought of hooks as > > scripts that need to be executed as root because they prepare the host > > in a special way. And session daemon doesn't have enough permissions to > > do that. Alternatively, if a user wants to run certain hook, they can > > always symlink it into their $HOME/.config/libvirt/hooks, no? > > Agreed, the session daemon should *exclusively* run hooks that are > under $HOME. > > If an admin installs a hooks for the system daemon, we don't want > that to have side-effects on the session daemon, as there's no > guarantee the hook would even succeed.
Reading the code, if I am not mistaken, it would be a breaking change. It's fine for me.
