Home | History | Annotate | Download | only in gen
History log of /src/lib/libc/gen/glob.c
RevisionDateAuthorComments
 1.39  29-May-2019  christos Add GLOB_TILDE_CHECK (from GNU)
 1.38  08-May-2017  christos branches: 1.38.10;
use the symbolic M_ALL and trim with M_MASK
 1.37  26-Apr-2017  christos Switch from a recursive pattern matching algorithm to handle '*'
to a backtracking one. Avoids DoS attacks with patterns "a*a*a*a*a*...b"
matching against "aaaaaaaaaaaa..." https://research.swtch.com/glob
 1.36  04-Sep-2016  joerg branches: 1.36.4;
Bump the glob limits to 512KB for total string size and 64K path
entries. The old limits were too small for some important FTP use cases
like a pkgsrc repository.
 1.35  20-Mar-2013  lukem branches: 1.35.8; 1.35.10; 1.35.14;
Use "unsigned FOO" instead of less-portable "u_FOO".
 1.34  21-Feb-2013  christos remove code that did special handling for . and .. at the end of the path.
From mouse@
 1.33  27-Dec-2012  christos Instead of changing the code to match the documentation, change the documentation
to match the code. NOCHECK is used only by csh(1) and csh(1) is too broken for
words (histchars quoting is "special").
 1.32  18-Dec-2012  christos Do as the man page says, and for GLOB_NOCHECK return the original pattern,
not a modified version with the backslash characters removed.
 1.31  30-Oct-2011  christos branches: 1.31.2; 1.31.4; 1.31.8;
PR/45517: Henning Petersen: Add restrict keywords in the definition of glob
to match the declaration.
 1.30  14-May-2011  christos PR/44959: Henning Petersen: glob forgets to closedir on out of space condition.
 1.29  22-Jan-2011  christos remove stray printf.
 1.28  21-Jan-2011  christos prevent resource DoS from brace expansion (from Maksymilian Arciemowicz)
 1.27  06-Sep-2010  christos branches: 1.27.2;
Add GLOB_STAR support from Greg Dionne.
 1.26  06-Jul-2010  christos Apply more limits to GLOB_LIMIT, number of stat(2) calls from me and number
of readdir(3) calls from Maksymilian Arciemowicz. Also reduce the memory
used by matches strings from Maksymilian Arciemowicz.
 1.25  02-Jul-2010  christos Avoid DoS attacks for patterns that have braces. Noted by Maksymilian
Arciemowicz.
XXX: Pullup to 5.x
 1.24  08-Apr-2009  christos add glob_pattern_p for glibc because cvs needs it and it is a huge mess
to compile in the gnu glob code.
 1.23  26-May-2008  ad branches: 1.23.4; 1.23.6; 1.23.8; 1.23.10; 1.23.12;
Fedora Core 9 doesn't provide ARG_MAX, so use _POSIX_ARG_MAX if it's
not available.
 1.22  22-Feb-2008  christos branches: 1.22.2; 1.22.4;
GLOB_NO_DOTDIRS patch from mouse@
Fixes re-definition of GLOB_PERIOD.
 1.21  01-Feb-2008  christos branches: 1.21.2;
Try to fix previous commit of /.. and /. handling for GLOB_PERIOD. I will
write a regression test for this.
 1.20  18-Jan-2008  christos From Richard M Kreuter: GLOB_PERIOD fix for trailing ./ or ../
 1.19  05-Dec-2007  christos From Richard M Kreuter, add GLOB_PERIOD.
 1.18  01-Dec-2006  christos branches: 1.18.2; 1.18.8; 1.18.10;
ansi, minor knf, no functional change.
 1.17  24-Nov-2006  christos fix spelling of accommodate; from Zapher.
 1.16  26-Mar-2006  christos PR/33123: Murray Armfield: standards compliance & glob.h
Certain fields in glob.h need to be size_t; fix this and version glob(3).
http://www.opengroup.org/onlinepubs/000095399/basedefs/glob.h.html
 1.15  24-Jan-2006  christos Use a separate macro, not DEBUG to enforce 8 bit chars [glob uses internally
16 bit chars]. Fix lint complaint when compiling with 8 bit chars.
 1.14  29-Nov-2005  christos WARNS=4
 1.13  13-Sep-2005  elad Don't overflow when DEBUG is defined.
PR/30833, from Tomas Skare.
 1.12  13-Sep-2005  christos compat core reorg.
 1.11  04-Dec-2003  keihan netbsd.org -> NetBSD.org
NetBSD.ORG -> NetBSD.org

Now src/lib is done.
 1.10  22-Oct-1997  thorpej Allow the old-name functions to be compiled from the same source file as
the renamed functions, and add some #error directives to force the
issue with weak symbols for renamed functions when we support weak
symbols in the C library.
 1.9  22-Oct-1997  fvdl New hacks to make libc work painlessly without bumping the major number:
use type func(arg1s) asm("emitted_name") gcc mechanism.
Suggested by Bill Sommerfeld.
 1.8  21-Oct-1997  fvdl branches: 1.8.2;
Hacks to enable libc to work without bumping the major.
 1.7  21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.6  13-Jul-1997  christos Fix readdirfunc prototype
Fix RCSID's
 1.5  27-Feb-1995  cgd branches: 1.5.4;
update from Lite, with local changes. fix Ids, etc.
 1.4  06-Nov-1993  cgd branches: 1.4.4;
update to latest version.
 1.3  26-Aug-1993  jtc Declare rcsid strings so they are stored in text segment.
 1.2  30-Jul-1993  mycroft Latest versions from uunet.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  25-Feb-1995  cgd from lite, with minor name rearrangement to fit.
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.4.1  02-May-1995  jtc #include "namespace.h"
 1.5.4.2  19-Sep-1996  jtc snapshot namespace cleanup: gen
 1.5.4.1  16-Sep-1996  jtc snapshot namespace cleanup
 1.8.2.2  22-Oct-1997  thorpej Pull up from trunk:

New hacks to make libc work painlessly without bumping the major number:
use type func(arg1s) asm("emitted_name") gcc mechanism.
Suggested by Bill Sommerfeld.

Allow the old-name functions to be compiled from the same source file as
the renamed functions, and add some #error directives to force the
issue with weak symbols for renamed functions when we support weak
symbols in the C library.
 1.8.2.1  21-Oct-1997  thorpej file glob.c was added on branch netbsd-1-3 on 1997-10-22 06:41:32 +0000
 1.18.10.1  05-Aug-2010  riz Pull up following revision(s) (requested by christos in ticket #1399):
lib/libc/gen/glob.c: patch
lib/libc/gen/glob.3: revision 1.37 via patch
crypto/dist/ssh/sftp.c: patch
crypto/dist/ssh/sftp-glob.c: patch
Add GLOB_LIMIT to the glob calls to prevent DoS attacks.
Apply more limits to GLOB_LIMIT, number of stat(2) calls from me and number
of readdir(3) calls from Maksymilian Arciemowicz. Also reduce the memory
used by matches strings from Maksymilian Arciemowicz.
 1.18.8.2  23-Mar-2008  matt sync with HEAD
 1.18.8.1  09-Jan-2008  matt sync with HEAD
 1.18.2.1  05-Aug-2010  riz Pull up following revision(s) (requested by christos in ticket #1399):
lib/libc/gen/glob.c: patch
lib/libc/gen/glob.3: revision 1.37 via patch
crypto/dist/ssh/sftp.c: patch
crypto/dist/ssh/sftp-glob.c: patch
Add GLOB_LIMIT to the glob calls to prevent DoS attacks.
Apply more limits to GLOB_LIMIT, number of stat(2) calls from me and number
of readdir(3) calls from Maksymilian Arciemowicz. Also reduce the memory
used by matches strings from Maksymilian Arciemowicz.
 1.21.2.1  24-Mar-2008  keiichi sync with head.
 1.22.4.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.22.2.1  04-Jun-2008  yamt sync with head
 1.23.12.1  20-May-2011  matt bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).
 1.23.10.2  24-Apr-2011  riz Pull up following revision(s) (requested by spz in ticket #1597):
lib/libc/gen/glob.c: revision 1.28
lib/libc/gen/glob.c: revision 1.29
prevent resource DoS from brace expansion (from Maksymilian Arciemowicz)
remove stray printf.
 1.23.10.1  19-Jul-2010  riz Pull up following revision(s) (requested by christos in ticket #1430):
lib/libc/gen/glob.c: revision 1.25
lib/libc/gen/glob.c: revision 1.26
lib/libc/gen/glob.3: revision 1.37
crypto/dist/ssh/sftp.c: patch
crypto/dist/ssh/sftp-glob.c: patch
Add GLOB_LIMIT to the glob calls to prevent DoS attacks.
Apply more limits to GLOB_LIMIT, number of stat(2) calls from me and number
of readdir(3) calls from Maksymilian Arciemowicz. Also reduce the memory
used by matches strings from Maksymilian Arciemowicz.
Avoid DoS attacks for patterns that have braces. Noted by Maksymilian
Arciemowicz.
XXX: Pullup to 5.x
 1.23.8.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.23.6.2  26-May-2008  ad Fedora Core 9 doesn't provide ARG_MAX, so use _POSIX_ARG_MAX if it's
not available.
 1.23.6.1  26-May-2008  ad file glob.c was added on branch christos-time_t on 2008-05-26 13:06:39 +0000
 1.23.4.2  24-Apr-2011  riz Pull up following revision(s) (requested by spz in ticket #1597):
lib/libc/gen/glob.c: revision 1.28
lib/libc/gen/glob.c: revision 1.29
prevent resource DoS from brace expansion (from Maksymilian Arciemowicz)
remove stray printf.
 1.23.4.1  19-Jul-2010  riz branches: 1.23.4.1.2;
Pull up following revision(s) (requested by christos in ticket #1430):
lib/libc/gen/glob.c: revision 1.25
lib/libc/gen/glob.c: revision 1.26
lib/libc/gen/glob.3: revision 1.37
crypto/dist/ssh/sftp.c: patch
crypto/dist/ssh/sftp-glob.c: patch
Add GLOB_LIMIT to the glob calls to prevent DoS attacks.
Apply more limits to GLOB_LIMIT, number of stat(2) calls from me and number
of readdir(3) calls from Maksymilian Arciemowicz. Also reduce the memory
used by matches strings from Maksymilian Arciemowicz.
Avoid DoS attacks for patterns that have braces. Noted by Maksymilian
Arciemowicz.
XXX: Pullup to 5.x
 1.23.4.1.2.1  24-Apr-2011  riz Pull up following revision(s) (requested by spz in ticket #1597):
lib/libc/gen/glob.c: revision 1.28
lib/libc/gen/glob.c: revision 1.29
prevent resource DoS from brace expansion (from Maksymilian Arciemowicz)
remove stray printf.
 1.27.2.1  08-Feb-2011  bouyer Sync with HEAD
 1.31.8.2  23-Jun-2013  tls resync from head
 1.31.8.1  25-Feb-2013  tls resync with head
 1.31.4.1  24-Sep-2016  bouyer Pull up following revision(s) (requested by joerg in ticket #1404):
lib/libc/gen/glob.c: revision 1.36
Bump the glob limits to 512KB for total string size and 64K path
entries. The old limits were too small for some important FTP use cases
like a pkgsrc repository.
 1.31.2.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.35.14.1  18-Jan-2017  skrll Sync with netbsd-5
 1.35.10.1  13-Nov-2016  snj Pull up following revision(s) (requested by joerg in ticket #1247):
lib/libc/gen/glob.c: revision 1.36
Bump the glob limits to 512KB for total string size and 64K path
entries. The old limits were too small for some important FTP use cases
like a pkgsrc repository.
 1.35.8.1  18-Sep-2016  snj Pull up following revision(s) (requested by joerg in ticket #1247):
lib/libc/gen/glob.c: revision 1.36
Bump the glob limits to 512KB for total string size and 64K path
entries. The old limits were too small for some important FTP use cases
like a pkgsrc repository.
 1.36.4.2  11-May-2017  pgoyette Sync with HEAD
 1.36.4.1  02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.38.10.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed