chiark / gitweb /
util: add shell_maybe_quote() call for preparing a string for shell cmdline inclusion
[elogind.git] / src / shared / spawn-ask-password-agent.c
index 6e31d8d138e8dd3103213c22d276536ce6404720..0d7458806dc3e7ef7a9decbf5f45719c722be93d 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <sys/types.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <string.h>
-#include <sys/prctl.h>
 #include <signal.h>
-#include <fcntl.h>
 
 #include "log.h"
 #include "util.h"
@@ -49,7 +45,7 @@ int ask_password_agent_open(void) {
                        SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH,
                        SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH, "--watch", NULL);
         if (r < 0)
-                log_error_errno(-r, "Failed to fork TTY ask password agent: %m");
+                log_error_errno(r, "Failed to fork TTY ask password agent: %m");
 
         return r;
 }