]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/spawn-polkit-agent.h
tree-wide: drop license boilerplate
[thirdparty/systemd.git] / src / shared / spawn-polkit-agent.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 This file is part of systemd.
6
7 Copyright 2012 Lennart Poettering
8 ***/
9
10 #include "bus-util.h"
11
12 int polkit_agent_open(void);
13 void polkit_agent_close(void);
14
15 static inline void polkit_agent_open_if_enabled(
16 BusTransport transport,
17 bool ask_password) {
18
19 /* Open the polkit agent as a child process if necessary */
20
21 if (transport != BUS_TRANSPORT_LOCAL)
22 return;
23
24 if (!ask_password)
25 return;
26
27 polkit_agent_open();
28 }