]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Change `error (1, ...' to `error (EXIT_FAILURE, ...'.
authorJim Meyering <jim@meyering.net>
Fri, 30 Aug 2002 23:04:53 +0000 (23:04 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 30 Aug 2002 23:04:53 +0000 (23:04 +0000)
login-utils/su.c

index 3d834679efec454ae0b1864e9aaad8111b189e46..5b1328ccf0e8768f6c6ff0290ccc7431f5f1e9b3 100644 (file)
@@ -347,13 +347,13 @@ change_identity (const struct passwd *pw)
 #ifdef HAVE_INITGROUPS
   errno = 0;
   if (initgroups (pw->pw_name, pw->pw_gid) == -1)
-    error (1, errno, _("cannot set groups"));
+    error (EXIT_FAILURE, errno, _("cannot set groups"));
   endgrent ();
 #endif
   if (setgid (pw->pw_gid))
-    error (1, errno, _("cannot set group id"));
+    error (EXIT_FAILURE, errno, _("cannot set group id"));
   if (setuid (pw->pw_uid))
-    error (1, errno, _("cannot set user id"));
+    error (EXIT_FAILURE, errno, _("cannot set user id"));
 }
 
 /* Run SHELL, or DEFAULT_SHELL if SHELL is empty.
@@ -526,7 +526,7 @@ main (int argc, char **argv)
 
   pw = getpwnam (new_user);
   if (pw == 0)
-    error (1, 0, _("user %s does not exist"), new_user);
+    error (EXIT_FAILURE, 0, _("user %s does not exist"), new_user);
   endpwent ();
 
   /* Make sure pw->pw_shell is non-NULL.  It may be NULL when NEW_USER
@@ -549,7 +549,7 @@ main (int argc, char **argv)
 #ifdef SYSLOG_FAILURE
       log_su (pw, 0);
 #endif
-      error (1, 0, _("incorrect password"));
+      error (EXIT_FAILURE, 0, _("incorrect password"));
     }
 #ifdef SYSLOG_SUCCESS
   else