Imported Upstream version 1.8.7
[debian/sudo] / src / utmp.c
index 97a1ea659b63413ac748f546dbb4a73759e865a1..3852cae9b79c0bf78a5d100fc82f9172a68bec88 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2011-2013 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -17,7 +17,6 @@
 #include <config.h>
 
 #include <sys/types.h>
-#include <sys/param.h>
 #include <sys/time.h>
 #include <sys/wait.h>
 #include <stdio.h>
@@ -276,12 +275,12 @@ utmp_slot(const char *line, int ttyfd)
      * doesn't take an argument.
      */
     if ((sfd = dup(STDIN_FILENO)) == -1)
-       error(1, _("unable to save stdin"));
+       fatal(_("unable to save stdin"));
     if (dup2(ttyfd, STDIN_FILENO) == -1)
-       error(1, _("unable to dup2 stdin"));
+       fatal(_("unable to dup2 stdin"));
     slot = ttyslot();
     if (dup2(sfd, STDIN_FILENO) == -1)
-       error(1, _("unable to restore stdin"));
+       fatal(_("unable to restore stdin"));
     close(sfd);
 
     debug_return_int(slot);