Module Name: src Committed By: christos Date: Sun Aug 12 13:31:42 UTC 2012
Modified Files: src/lib/libc/gen: glob.3 Log Message: more markup, sort options To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/lib/libc/gen/glob.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/gen/glob.3 diff -u src/lib/libc/gen/glob.3:1.40 src/lib/libc/gen/glob.3:1.41 --- src/lib/libc/gen/glob.3:1.40 Tue Oct 25 05:28:17 2011 +++ src/lib/libc/gen/glob.3 Sun Aug 12 09:31:41 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: glob.3,v 1.40 2011/10/25 09:28:17 wiz Exp $ +.\" $NetBSD: glob.3,v 1.41 2012/08/12 13:31:41 christos Exp $ .\" .\" Copyright (c) 1989, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -31,7 +31,7 @@ .\" .\" @(#)glob.3 8.3 (Berkeley) 4/16/94 .\" -.Dd November 30, 2010 +.Dd August 12, 2012 .Dt GLOB 3 .Os .Sh NAME @@ -230,6 +230,18 @@ does the same thing to ease typing of .Xr find 1 patterns .Pc . +.It Dv GLOB_LIMIT +Limit the amount of memory used to store matched strings to +.Li 64K , +the number of +.Xr stat 2 +calls to 128, and the number of +.Xr readdir 3 +calls to 16K. +This option should be set for programs that can be coerced to a denial of +service attack via patterns that expand to a very large number of matches, +such as a long string of +.Li */../*/.. .It Dv GLOB_MAGCHAR Set by the .Fn glob @@ -237,6 +249,10 @@ function if the pattern included globbin See the description of the usage of the .Fa gl_matchc structure member for more details. +.It Dv GLOB_NOESCAPE +Disable the use of the backslash +.Pq Ql \e +character for quoting. .It Dv GLOB_NOMAGIC Is the same as .Dv GLOB_NOCHECK @@ -247,28 +263,6 @@ if it does not contain any of the specia is provided to simplify implementing the historic .Xr csh 1 globbing behavior and should probably not be used anywhere else. -.It Dv GLOB_NOESCAPE -Disable the use of the backslash -.Pq Ql \e -character for quoting. -.It Dv GLOB_TILDE -Expand patterns that start with -.Ql ~ -to user name home directories. -.It Dv GLOB_LIMIT -Limit the amount of memory used to store matched strings to -.Li 64K , -the number of -.Xr stat 2 -calls to 128, and the number of -.Xr readdir 3 -calls to 16K. -This option should be set for programs that can be coerced to a denial of -service attack via patterns that expand to a very large number of matches, -such as a long string of -.Li */../*/.. -.It Dv GLOB_PERIOD -Allow metacharacters to match a leading period in a filename. .It Dv GLOB_NO_DOTDIRS Hide .Sq Li \&. @@ -277,13 +271,19 @@ and from metacharacter matches, regardless of whether .Dv GLOB_PERIOD is set and whether the pattern component begins with a literal period. -.Dv GLOB_STAR +.It Dv GLOB_PERIOD +Allow metacharacters to match a leading period in a filename. +.It Dv GLOB_STAR Indicates that two adjacent .Li * characters will do a recursive match in all subdirs, without following symbolic links and three adjacent .Li * characters will also follow symbolic links. +.It Dv GLOB_TILDE +Expand patterns that start with +.Ql ~ +to user name home directories. .El .Pp If, during the search, a directory is encountered that cannot be opened @@ -486,11 +486,14 @@ compatible with the exception that the flags .Dv GLOB_ALTDIRFUNC , .Dv GLOB_BRACE , +.Dv GLOB_LIMIT , .Dv GLOB_MAGCHAR , +.Dv GLOB_NOESCAPE , .Dv GLOB_NOMAGIC , +.Dv GLOB_NO_DOTDIRS , +.Dv GLOB_PERIOD , +.Dv GLOB_STAR , .Dv GLOB_TILDE , -and -.Dv GLOB_LIMIT and the fields .Fa gl_matchc and