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?

I feel like I'm overlooking something, do you have a counter example?

Michal

Reply via email to