]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/spawn-polkit-agent.h
resolved: rework parsing of /etc/hosts
[thirdparty/systemd.git] / src / shared / spawn-polkit-agent.h
index 9bf93b9922f23d867696a6c65d56e4e6029d9275..190b970b6f2b1e7644074ffbc9e4cdcd51c235cd 100644 (file)
@@ -1,40 +1,22 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
-/***
-  This file is part of systemd.
-
-  Copyright 2012 Lennart Poettering
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
 #include "bus-util.h"
 
 int polkit_agent_open(void);
 void polkit_agent_close(void);
 
-static inline void polkit_agent_open_if_enabled(
+static inline int polkit_agent_open_if_enabled(
                 BusTransport transport,
                 bool ask_password) {
 
         /* Open the polkit agent as a child process if necessary */
 
         if (transport != BUS_TRANSPORT_LOCAL)
-                return;
+                return 0;
 
         if (!ask_password)
-                return;
+                return 0;
 
-        polkit_agent_open();
+        return polkit_agent_open();
 }