summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/setuidgid.c24
2 files changed, 17 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d1c9f447..261264c26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2007-11-24 Jim Meyering <meyering@redhat.com>
+ * src/setuidgid.c: Normalize leading white space: no more TABs.
+
Test the new feature: cp -p preserves the GID whenever possible.
* tests/cp/preserve-gid: New file. Test for today's change.
* tests/cp/Makefile.am (TESTS): Add preserve-gid.
diff --git a/src/setuidgid.c b/src/setuidgid.c
index 884c89ac6..71198a4bf 100644
--- a/src/setuidgid.c
+++ b/src/setuidgid.c
@@ -45,14 +45,14 @@ usage (int status)
{
if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
- program_name);
+ program_name);
else
{
printf (_("\
Usage: %s USERNAME COMMAND [ARGUMENT]...\n\
or: %s OPTION\n\
"),
- program_name, program_name);
+ program_name, program_name);
fputs (_("\
Drop any supplemental groups, assume the user-ID and group-ID of\n\
@@ -86,7 +86,7 @@ main (int argc, char **argv)
atexit (close_stdout);
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE_NAME, VERSION,
- usage, AUTHORS, (char const *) NULL);
+ usage, AUTHORS, (char const *) NULL);
{
int c;
while ((c = getopt_long (argc, argv, "+g:", NULL, NULL)) != -1)
@@ -106,7 +106,7 @@ main (int argc, char **argv)
/* FIXME: Integer overflow */
gids[gids_count++] = strtoul (ptr, &ptr, 10);
-
+
if (*ptr != '\0' && *ptr++ != ',')
{
error (0, 0, _("invalid argument %s"), quote (optarg));
@@ -115,7 +115,7 @@ main (int argc, char **argv)
}
break;
}
-
+
default:
usage (SETUIDGID_FAILURE);
}
@@ -125,9 +125,9 @@ main (int argc, char **argv)
if (argc <= optind + 1)
{
if (argc < optind + 1)
- error (0, 0, _("missing operand"));
+ error (0, 0, _("missing operand"));
else
- error (0, 0, _("missing operand after %s"), quote (argv[optind]));
+ error (0, 0, _("missing operand after %s"), quote (argv[optind]));
usage (SETUIDGID_FAILURE);
}
@@ -181,11 +181,11 @@ main (int argc, char **argv)
if (setgid (gids[0]))
error (SETUIDGID_FAILURE, errno,
- _("cannot set group-ID to %lu"), (unsigned long int) gids[0]);
+ _("cannot set group-ID to %lu"), (unsigned long int) gids[0]);
if (setuid (uid))
error (SETUIDGID_FAILURE, errno,
- _("cannot set user-ID to %lu"), (unsigned long int) uid);
+ _("cannot set user-ID to %lu"), (unsigned long int) uid);
{
char **cmd = argv + optind + 1;
@@ -197,3 +197,9 @@ main (int argc, char **argv)
exit (exit_status);
}
}
+
+/*
+ * Local variables:
+ * indent-tabs-mode: nil
+ * End:
+ */