{
if (! (xstrtoul (gr, &ptr, 10, &tmp_ul, NULL) == LONGINT_OK
&& tmp_ul <= GID_T_MAX))
- error (EXIT_FAILURE, 0, _("invalid group %s"),
+ error (SETUIDGID_FAILURE, 0, _("invalid group %s"),
quote (gr));
if (n_gids == n_gids_allocated)
gids = X2NREALLOC (gids, &n_gids_allocated);
pwd = getpwnam (user);
if (pwd == NULL)
{
- error (SETUIDGID_FAILURE, errno,
- _("unknown user-ID: %s"), quote (user));
+ error (0, errno, _("unknown user-ID: %s"), quote (user));
usage (SETUIDGID_FAILURE);
}
uid = pwd->pw_uid;
pwd = getpwuid (uid);
if (pwd == NULL)
{
- error (SETUIDGID_FAILURE, errno,
+ error (0, errno,
_("to use user-ID %s you need to use -g too"), quote (user));
usage (SETUIDGID_FAILURE);
}
{
int n = xgetgroups (pwd->pw_name, pwd->pw_gid, &gids);
if (n <= 0)
- error (EXIT_FAILURE, errno, _("failed to get groups for user %s"),
- quote (pwd->pw_name));
+ error (SETUIDGID_FAILURE, errno,
+ _("failed to get groups for user %s"), quote (pwd->pw_name));
n_gids = n;
}