]> git.ipfire.org Git - thirdparty/libvirt.git/commit
src: Detect close_range syscall during virGlobalInit()
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 22 Aug 2023 07:45:47 +0000 (09:45 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Aug 2023 10:45:17 +0000 (12:45 +0200)
commit15ce9e888bebe1465bcd376d97274939cbae4942
tree6e91b84b62c7539d9ae5c0b319a83063be69076e
parent520eb3e15bc87a43b37a6670b2f0f4e89039d6e3
src: Detect close_range syscall during virGlobalInit()

The whole purpose of virCloseRangeInit() is to be called
somewhere during initialization (ideally before first virExec()
or virCommandRun()), so that the rest of the code already knows
kernel capabilities. While I can put the call somewhere into
remote_daemon.c (when a daemon initializes), we might call
virCommand*() even from client library (i.e. no daemon).

Therefore, put it into virGlobalInit() with the rest of
initialization code.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
src/libvirt.c