mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-18 22:08:08 +02:00
To talk to ovsdb, we use the unix socket at /var/run/openvswitch/db.sock. But that socket is owned by another user and NetworkManager would need dac_override capability to open it. We want to drop dac_override, but we still need to talk to ovsdb. Add a GetFD() method to nm-sudo. We still first try to open the socket directly. Maybe it just works. Note that SELinux may block passing file descriptors from nm-sudo. If it doesn't work for you, test with SELinux permissive mode and wait for an SELinux update.
15 lines
507 B
C
15 lines
507 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
|
|
#ifndef __NM_SUDO_CALL_H__
|
|
#define __NM_SUDO_CALL_H__
|
|
|
|
#include "libnm-base/nm-sudo-utils.h"
|
|
|
|
typedef void (*NMSudoCallGetFDCallback)(int fd_take, GError *error, gpointer user_data);
|
|
|
|
void nm_sudo_call_get_fd(NMSudoGetFDType fd_type,
|
|
GCancellable * cancellable,
|
|
NMSudoCallGetFDCallback callback,
|
|
gpointer user_data);
|
|
|
|
#endif /* __NM_SUDO_CALL_H__ */
|