expand: Fix glibc glob(3) support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's been a while since we disabled glob(3) support by default.
It appears to be working now, however, we have to change our
code to remove a workaround that now actually prevents it from
working.

In particular, we no longer use GLOB_NOMAGIC or test GLOB_MAGCHAR.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

diff --git a/src/expand.c b/src/expand.c
index 705fef7..6d2a94a 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -1183,19 +1183,16 @@ expandmeta(str, flag)
 			goto nometa;
 		INTOFF;
 		p = preglob(str->text, RMESCAPE_ALLOC | RMESCAPE_HEAP);
-		i = glob(p, GLOB_NOMAGIC, 0, &pglob);
+		i = glob(p, 0, 0, &pglob);
 		if (p != str->text)
 			ckfree(p);
 		switch (i) {
 		case 0:
-			if (!(pglob.gl_flags & GLOB_MAGCHAR))
-				goto nometa2;
 			addglob(&pglob);
 			globfree(&pglob);
 			INTON;
 			break;
 		case GLOB_NOMATCH:
-nometa2:
 			globfree(&pglob);
 			INTON;
 nometa:
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux