summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/glob.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Sync rev 1.49.Darren Tucker2020-04-211-3/+3
| | | | | Prevent infinite for loop since i went from ssize_t to size_t. Patch from eagleoflqj via OpenSSH github PR#178, ok djm@, feedback & ok millert@
* Check if TILDE is already defined and undef.Darren Tucker2020-02-171-0/+4
| | | | Prevents redefinition warning on AIX.
* upstream commitDamien Miller2019-11-151-17/+16
| | | | | | | revision 1.48 date: 2019/02/04 16:45:40; author: millert; state: Exp; lines: +16 -17; commitid: cpNtVC7erojNyctw; Make gl_pathc, gl_matchc and gl_offs size_t in glob_t to match POSIX. This requires a libc major version bump. OK deraadt@
* upstream commitDamien Miller2019-11-151-21/+34
| | | | | | | | revision 1.47 date: 2017/05/08 14:53:27; author: millert; state: Exp; lines: +34 -21; commitid: sYfxfyUHAfarP8sE; Fix exponential CPU use with repeated '*' operators by changing '*' handling to be interative instead of recursive. Fix by Yves Orton, ported to OpenBSD glob.c by Ray Lai. OK tb@
* upstream commitDamien Miller2019-11-151-9/+5
| | | | | | | | revision 1.46 date: 2015/12/28 22:08:18; author: mmcc; state: Exp; lines: +5 -9; commitid: 0uXuF2O13NH9q2e1; Remove NULL-checks before free() and a few related dead assignments. ok and valuable input from millert@
* upstream commitDamien Miller2019-11-151-5/+3
| | | | | | | revision 1.44 date: 2015/09/14 16:09:13; author: tedu; state: Exp; lines: +3 -5; commitid: iWfSX2BIn0sLw62l; remove null check before free. from Michael McConville ok semarie
* upstream commitDamien Miller2019-11-151-4/+4
| | | | | | | | revision 1.43 date: 2015/06/13 16:57:04; author: deraadt; state: Exp; lines: +4 -4; commitid: zOUKuqWBdOPOz1SZ; in glob() initialize the glob_t before the first failure check. from j@pureftpd.org ok millert stsp
* upstream commitDamien Miller2019-11-151-1/+4
| | | | | | revision 1.42 date: 2015/02/05 12:59:57; author: millert; state: Exp; lines: +2 -1; commitid: DTQbfd4poqBW8iSJ; Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@
* upstream commitDamien Miller2019-11-151-3/+3
| | | | | | revision 1.41 date: 2014/10/08 05:35:27; author: deraadt; state: Exp; lines: +3 -3; commitid: JwTGarRLHQKDgPh2; obvious realloc -> reallocarray conversion
* upstream commitDamien Miller2019-11-151-14/+14
| | | | | | | revision 1.40 date: 2013/09/30 12:02:34; author: millert; state: Exp; lines: +14 -15; Use PATH_MAX, NAME_MAX and LOGIN_NAME_MAX not MAXPATHNAMELEN, MAXNAMLEN or MAXLOGNAME where possible. OK deraadt@
* upstream commitDamien Miller2019-11-151-4/+4
| | | | | | | | revision 1.39 date: 2012/01/20 07:09:42; author: tedu; state: Exp; lines: +4 -4; the glob stat limit is way too low. bump to 2048. while here, failed stats should count against the limit too. ok deraadt sthen stsp
* Prevent name collisions with system glob (bz#2463)Darren Tucker2015-10-291-0/+1
| | | | | | | Move glob.h from includes.h to the only caller (sftp) and override the names for the symbols. This prevents name collisions with the system glob in the case where something other than ssh uses it (eg kerberos). With jjelen at redhat.com, ok djm@
* - djm@cvs.openbsd.org 2011/09/22 06:27:29Damien Miller2011-09-221-6/+44
| | | | | | | [glob.c] fix GLOB_KEEPSTAT without GLOB_NOSORT; the implicit sort was being applied only to the gl_pathv vector and not the corresponding gl_statv array. reported in OpenSSH bz#1935; feedback and okay matthew@
* - stsp@cvs.openbsd.org 2011/09/20 10:18:46Damien Miller2011-09-221-5/+17
| | | | | | | [glob.c] In glob(3), limit recursion during matching attempts. Similar to fnmatch fix. Also collapse consecutive '*' (from NetBSD). ok miod deraadt
* - pyr@cvs.openbsd.org 2011/05/12 07:15:10Damien Miller2011-09-221-2/+3
| | | | | | | | [openbsd-compat/glob.c] When the max number of items for a directory has reached GLOB_LIMIT_READDIR an error is returned but closedir() is not called. spotted and fix provided by Frank Denis obsd-tech@pureftpd.org ok otto@, millert@
* - djm@cvs.openbsd.org 2011/01/12 01:53:14Damien Miller2011-01-121-4/+12
| | | | | | | avoid some integer overflows mostly with GLOB_APPEND and GLOB_DOOFFS and sanity check arguments (these will be unnecessary when we switch struct glob members from being type into to size_t in the future); "looks ok" tedu@ feedback guenther@
* - nicm@cvs.openbsd.org 2010/10/08 21:48:42Damien Miller2011-01-121-39/+63
| | | | | | | | | | [openbsd-compat/glob.c] Extend GLOB_LIMIT to cover readdir and stat and bump the malloc limit from ARG_MAX to 64K. Fixes glob-using programs (notably ftp) able to be triggered to hit resource limits. Idea from a similar NetBSD change, original problem reported by jasper@. ok millert tedu jasper
* - (djm) [openbsd-compat/glob.c] restore ARG_MAX compat code.Damien Miller2010-10-071-1/+1
|
* - djm@cvs.openbsd.org 2010/09/25 09:30:16Damien Miller2010-10-071-62/+170
| | | | | | | | [sftp.c configure.ac openbsd-compat/glob.c openbsd-compat/glob.h] make use of new glob(3) GLOB_KEEPSTAT extension to save extra server rountrips to fetch per-file stat(2) information. NB. update openbsd-compat/ glob(3) implementation from OpenBSD libc to match.
* - (dtucker) [configure.ac openbsd-compat/glob.{c,h}] Bug #1407: force use ofDarren Tucker2007-12-311-1/+2
| | | | | builtin glob implementation on Mac OS X. Based on a patch from vgiffin at apple.
* - deraadt@cvs.openbsd.org 2005/11/28 17:50:12Damien Miller2007-10-261-6/+6
| | | | | [openbsd-compat/glob.c] unused arg in internal static API
* - (dtucker) [configure.ac includes.h openbsd-compat/glob.{c,h}] ExplicitlyDarren Tucker2006-09-011-1/+2
| | | | | | | test for GLOB_NOMATCH and use our glob functions if it's not found. Stops sftp from segfaulting when attempting to get a nonexistent file on Cygwin (previous versions of OpenSSH didn't use the native glob). Partly from and tested by Corinna Vinschen.
* - (dtucker) [openbsd-compat/{bsd-asprintf.c,bsd-openpty.c,bsd-snprintf.c,Darren Tucker2006-08-061-0/+2
| | | | glob.c}] Include stdlib.h for malloc and friends in compat code.
* - (djm) [openbsd-compat/glob.c]Damien Miller2006-07-241-3/+3
| | | | | | Move get_arg_max() into the ifdef HAVE_GLOB block so that it compiles on OpenBSD (or other platforms with a decent glob implementation) with -Werror
* - (djm) [acss.c auth-krb5.c auth-options.c auth-pam.c auth-shadow.c]Damien Miller2006-07-241-0/+2
| | | | | | | | | | | | | | | [canohost.c channels.c cipher-acss.c defines.h dns.c gss-genr.c] [gss-serv-krb5.c gss-serv.c log.h loginrec.c logintest.c readconf.c] [servconf.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rand-helper.c] [ssh.c sshconnect.c sshd.c openbsd-compat/bindresvport.c] [openbsd-compat/bsd-arc4random.c openbsd-compat/bsd-misc.c] [openbsd-compat/getrrsetbyname.c openbsd-compat/glob.c] [openbsd-compat/mktemp.c openbsd-compat/port-linux.c] [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c] [openbsd-compat/setproctitle.c openbsd-compat/xmmap.c] make the portable tree compile again - sprinkle unistd.h and string.h back in. Don't redefine __unused, as it turned out to be used in headers on Linux, and replace its use in auth-pam.c with ARGSUSED
* - (dtucker) [loginrec.c openbsd-compat/xmmap.c openbsd-compat/bindresvport.cDarren Tucker2006-07-121-0/+2
| | | | | openbsd-compat/glob.c openbsd-compat/mktemp.c openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c openbsd-compat/strtonum.c] Include <errno.h>.
* - (djm) [loginrec.c ssh-rand-helper.c sshd.c openbsd-compat/glob.c]Damien Miller2006-07-101-0/+1
| | | | | | [openbsd-compat/mktemp.c openbsd-compat/openbsd-compat.h] [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c] [openbsd-compat/xcrypt.c] Fix includes.h fallout, mainly fcntl.h
* - (djm) [auth-pam.c clientloop.c includes.h monitor.c session.c]Damien Miller2006-03-151-0/+3
| | | | | | | | [sftp-client.c ssh-keysign.c ssh.c sshconnect.c sshconnect2.c] [sshd.c openbsd-compat/bsd-misc.c openbsd-compat/bsd-openpty.c] [openbsd-compat/glob.c openbsd-compat/mktemp.c] [openbsd-compat/readpassphrase.c] Lots of include fixes for OpenSolaris
* - (dtucker) [openbsd-compat/glob.c] Update from OpenBSD 1.22 -> 1.25.Darren Tucker2005-11-101-85/+33
|
* - (dtucker) [openbsd-compat/{LOTS}] Move the "OPENBSD ORIGINAL" markers toDarren Tucker2005-11-101-2/+2
| | | | | after the copyright notices. Having them at the top next to the CVSIDs guarantees a conflict for each and every sync.
* - (djm) Annotate OpenBSD-derived files in openbsd-compat/ with originalDamien Miller2003-11-241-0/+2
| | | | source file path (in OpenBSD tree).
* - (bal) openbsd-compat/ OpenBSD updates. Mostly licensing, ansificationsBen Lindstrom2003-08-251-3/+3
| | | | and minor fixes.
* - (djm) Sync openbsd-compat with OpenBSD CVS.Damien Miller2003-06-031-6/+2
| | | | - No more 4-term BSD licenses in our tree
* - (djm) Sync openbsd-compat with OpenBSD -currentDamien Miller2002-09-111-22/+22
|
* - (bal) glob.c defines TILDE and AIX also defines it. #undef it first.Ben Lindstrom2002-07-041-0/+1
| | | | bug #265
* - (djm) Fix a few warnings the above turned upDamien Miller2001-06-271-2/+2
|
* - Sync with OpenBSD glob.c, strlcat.c and vis.c changesDamien Miller2001-04-131-31/+34
|
* - (djm) Another openbsd-compat/glob.c syncDamien Miller2001-03-301-29/+56
|
* - (djm) Sync openbsd-compat/glob.cDamien Miller2001-03-281-44/+37
|
* add get_arg_max(). Use sysconf() if ARG_MAX is not defined.Tim Rice2001-03-201-1/+13
|
* - (bal) glob.c update to set gl_pathv to NULL (OpenBSD CVS).Ben Lindstrom2001-03-191-2/+5
|
* - (bal) glob.c update to added GLOB_LIMITS.Ben Lindstrom2001-03-191-22/+38
|
* - Check for gl_matchc support in glob_t and fall back to theBen Lindstrom2001-03-171-2/+4
| | | | openbsd-compat/glob.[ch] support if it does not exist.
* - (djm) Add replacement glob() from OpenBSD libc if the system glob isDamien Miller2001-03-141-0/+859
missing or lacks the GLOB_ALTDIRFUNC extension - (djm) Remove -I$(srcdir)/openbsd-compat from CFLAGS, refer to headers relatively. Avoids conflict between glob.h and /usr/include/glob.h