summaryrefslogtreecommitdiff
path: root/grp/tst_fgetgrent.c
AgeCommit message (Collapse)Author
2018-07-18Avoid insecure usage of tmpnam in tests.Joseph Myers
Various glibc testcases use tmpnam in ways subject to race conditions (generate a temporary file name, then later open that file without O_EXCL). This patch fixes those tests to use mkstemp - generally a minimal local fix to use mkstemp instead of tmpnam, rather than a larger fix to use other testsuite infrastructure for temporary files. The unchanged use of tmpnam in posix/wordexp-test.c would fail safe in the event of a race (it's generating a name for use with mkdir rather than for a file to be opened for writing). Tested for x86_64. * grp/tst_fgetgrent.c: Include <unistd.h>. (main): Use mkstemp instead of tmpnam. * io/test-utime.c (main): Likewise. * posix/annexc.c (macrofile): Change to modifiable array. (get_null_defines): Use mkstemp instead of tmpnam. Do not remove macrofile here. * posix/bug-getopt1.c: Include <stdlib.h>. (do_test): Use mkstemp instead of tmpnam. * posix/bug-getopt2.c: Include <stdlib.h>. (do_test): Use mkstemp instead of tmpnam. * posix/bug-getopt3.c: Include <stdlib.h>. (do_test): Use mkstemp instead of tmpnam. * posix/bug-getopt4.c: Include <stdlib.h>. (do_test): Use mkstemp instead of tmpnam. * posix/bug-getopt5.c: Include <stdlib.h>. (do_test): Use mkstemp instead of tmpnam. * stdio-common/bug7.c: Include <stdlib.h> and <unistd.h>. (main): Use mkstemp instead of tmpnam. * stdio-common/tst-fdopen.c: Include <stdlib.h>. (main): Use mkstemp instead of tmpnam. * stdio-common/tst-ungetc.c: Include <stdlib.h>. (main): use mkstemp instead of tmpnam. * stdlib/isomac.c (macrofile): Change to modifiable array. (get_null_defines): Use mkstemp instead of tmpnam. Do not remove macrofile here.
2018-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
* All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
2017-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
2016-01-04Update copyright dates with scripts/update-copyrights.Joseph Myers
2015-01-02Update copyright dates with scripts/update-copyrights.Joseph Myers
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers
2012-02-09Replace FSF snail mail address with URLs.Paul Eggert
2001-07-06Update to LGPL v2.1.Andreas Jaeger
2001-07-06 Paul Eggert <eggert@twinsun.com> * manual/argp.texi: Remove ignored LGPL copyright notice; it's not appropriate for documentation anyway. * manual/libc-texinfo.sh: "Library General Public License" -> "Lesser General Public License". 2001-07-06 Andreas Jaeger <aj@suse.de> * All files under GPL/LGPL version 2: Place under LGPL version 2.1.
1999-06-09Update.Ulrich Drepper
1999-06-09 Ulrich Drepper <drepper@cygnus.com> * pwd/fgetpwent_r.c: Set errno in the correct way. * shadow/fgetspent_r.c: Likewise. * pwd/fgetpwent.c: Handle long lines correctly. Little optimizations. Free static buffer when debugging memory handling. * shadow/fgetspent.c: Likewise. * grp/fgetgrent.c: Little optimization in loop. 1999-06-09 Andreas Jaeger <aj@arthur.rhein-neckar.de> * grp/tst_fgetgrent.c (write_group): Fix generation of long line in a different way.
1999-06-08Update.Ulrich Drepper
1999-06-08 Ulrich Drepper <drepper@cygnus.com> * grp/tst_fgetgrent.c (write_users): Correctly generate long line.
1999-06-08Update.Ulrich Drepper
1999-06-08 Andreas Jaeger <aj@arthur.rhein-neckar.de> * grp/Makefile: Add rules for tst_fgetgrent. * grp/tst_fgetgrent.c: Rewritten to read only one file. * grp/tst_fgetgrent.sh: New file.
1999-06-08Test for fgetgrent function.Ulrich Drepper