1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

stdlib/tst-secure-getenv.c: whitespace-only changes in comments

This commit is contained in:
Florian Weimer
2012-09-04 15:01:18 +02:00
parent 292378045c
commit edb3cb8831
2 changed files with 7 additions and 5 deletions

View File

@ -3,6 +3,8 @@
* stdlib/tst-secure-getenv.c (alternative_main): Only warn on SGID * stdlib/tst-secure-getenv.c (alternative_main): Only warn on SGID
failures. failures.
* stdlib/tst-secure-getenv.c: Fix whitespace in comments.
2012-09-04 Joseph Myers <joseph@codesourcery.com> 2012-09-04 Joseph Myers <joseph@codesourcery.com>
[BZ #9914] [BZ #9914]

View File

@ -18,7 +18,7 @@
/* Test that secure_getenv works by invoking the test as a SGID /* Test that secure_getenv works by invoking the test as a SGID
program with a group ID from the supplementary group list. This program with a group ID from the supplementary group list. This
test can fail spuriously if the user is not a member of a suitable test can fail spuriously if the user is not a member of a suitable
supplementary group. */ supplementary group. */
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
@ -36,7 +36,7 @@ static char MAGIC_ARGUMENT[] = "run-actual-test";
static const char *test_dir; static const char *test_dir;
/* Return a GID which is not our current GID, but is present in the /* Return a GID which is not our current GID, but is present in the
supplementary group list. */ supplementary group list. */
static gid_t static gid_t
choose_gid (void) choose_gid (void)
{ {
@ -60,7 +60,7 @@ choose_gid (void)
/* Copies the executable into a restricted directory, so that we can /* Copies the executable into a restricted directory, so that we can
safely make it SGID with the TARGET group ID. Then runs the safely make it SGID with the TARGET group ID. Then runs the
executable. */ executable. */
static int static int
run_executable_sgid (gid_t target) run_executable_sgid (gid_t target)
{ {
@ -152,7 +152,7 @@ run_executable_sgid (gid_t target)
} }
if (kid == 0) if (kid == 0)
{ {
/* Child process. */ /* Child process. */
char *args[] = { execname, MAGIC_ARGUMENT, NULL }; char *args[] = { execname, MAGIC_ARGUMENT, NULL };
execve (execname, args, environ); execve (execname, args, environ);
printf ("execve (%s): %m\n", execname); printf ("execve (%s): %m\n", execname);
@ -228,7 +228,7 @@ alternative_main (int argc, char **argv)
{ {
if (getgid () == getegid ()) if (getgid () == getegid ())
{ {
/* This can happen if the file system is mounted nosuid. */ /* This can happen if the file system is mounted nosuid. */
fprintf (stderr, "SGID failed: GID and EGID match (%jd)\n", fprintf (stderr, "SGID failed: GID and EGID match (%jd)\n",
(intmax_t) getgid ()); (intmax_t) getgid ());
exit (MAGIC_STATUS); exit (MAGIC_STATUS);