chiark / gitweb /
tree-wide: remove Lennart's copyright lines
[elogind.git] / src / shared / spawn-polkit-agent.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include "bus-util.h"
5
6 int polkit_agent_open(void);
7 void polkit_agent_close(void);
8
9 static inline int polkit_agent_open_if_enabled(
10                 BusTransport transport,
11                 bool ask_password) {
12
13         /* Open the polkit agent as a child process if necessary */
14
15         if (transport != BUS_TRANSPORT_LOCAL)
16                 return 0;
17
18         if (!ask_password)
19                 return 0;
20
21         return polkit_agent_open();
22 }