summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getusershell.c
AgeCommit message (Collapse)AuthorFilesLines
2019-12-10Remove includes that are no longer neeed after tedu's simplification.millert1-4/+1
OK jca@
2015-12-08rewrite guts of getusershell() to avoid possibility of overflow.tedu1-41/+45
instead of trying to allocate "just enough" memory based on the size of the file (which is mostly comments, in fact), allocate memory on demand. i.e., save memory by wasting it. also be a little stricter about parsing. after discussion with tobias. (with a bug fix from patrick keshishian) descended from bug glibc bug 18660 via tobias.
2015-09-14remove null check before free. from Michael McConvilletedu1-9/+5
ok semarie
2015-02-06SIZE_MAX is standard, we should be using it in preference to themillert1-2/+3
obsolete SIZE_T_MAX. OK miod@ beck@
2014-09-15When fopen()ing internal to libc (the API doesn't support the useguenther1-2/+2
of the resulting FILE *), then pass fopen() the 'e' mode letter to mark it close-on-exec. ok miod@
2014-01-19Fix one more off-by-one (making it an off-by-two):tobias1-2/+2
1. integer division can give an off-by-one (like 2/3 = 0 for calloc) 2. ending the shells array with NULL takes space, too ok millert@
2014-01-17Fix off-by-one on specially crafted /etc/shells file.tobias1-2/+2
ok gilles@, millert@
2013-11-24most obvious unsigned char casts for ctypederaadt1-2/+2
ok jca krw ingo
2013-09-30Use PATH_MAX, NAME_MAX and LOGIN_NAME_MAX not MAXPATHNAMELEN,millert1-6/+6
MAXNAMLEN or MAXLOGNAME where possible. OK deraadt@
2012-04-06range check st_size before calling calloc()deraadt1-3/+7
ok millert
2005-08-08zap remaining rcsid.espie1-4/+1
Kill old files that are no longer compiled. okay theo
2005-04-02Add /bin/ksh to builtin list of OK shells.millert1-2/+2
2005-03-25deregister (and deauto!). ok millert@ marco@otto1-3/+3
2004-05-18ansify function definitions and zap some `register'jfb1-5/+5
ok millert@
2003-06-02Remove the advertising clause in the UCB license which Berkeleymillert1-6/+2
rescinded 22 July 1999. Proofed by myself and Theo.
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert1-2/+2
1996-08-19Fix RCS idstholo1-7/+1
Make sure everything uses {SYS,}LIBC_SCCS properly
1995-10-18initial import of NetBSD treederaadt1-0/+143