commit bash-20110429 snapshot

This commit is contained in:
Chet Ramey
2011-12-29 13:07:22 -05:00
parent 714122265d
commit af5751ec16
5 changed files with 31 additions and 10 deletions
+16 -1
View File
@@ -9648,7 +9648,7 @@ lib/sh/eaccess.c
- eaccess(2) apparently does only half the job: it does not check that
the permission bits on a file actually allow, for instance, execution.
Need to augment with a call to sh_stataccess if eaccess returns
success on FreeBSD. Fixes FreeBSD problem reported by Jonan Hattne
success on FreeBSD. Fixes FreeBSD problem reported by Johan Hattne
<johan.hattne@utsouthwestern.edu>
3/28
@@ -11534,3 +11534,18 @@ configure.in
- if not cross-compiling, set CFLAGS_FOR_BUILD from any CFLAGS inherited
from the environment. Fixes HP/UX build problem reported by
"Daniel Richard G." <skunk@iSKUNK.ORG>
4/26
----
config-top.h
- define MULTIPLE_COPROCS to 0 so the code is still disabled but easy
to enable via configure option or editing this file
4/29
----
lib/sh/eaccess.c
- freebsd provides faccessat, with the same misfeature as their eaccess
and access implementations (X_OK returns true for uid==0 regardless
of the actual file permissions), so reorganize code to check the
file permissions as with eaccess. Report and fix from Johan Hattne
<johan.hattne@utsouthwestern.edu>
+5
View File
@@ -109,3 +109,8 @@
/* Define if you want to include code in shell.c to support wordexp(3) */
/* #define WORDEXP_OPTION */
/* Define as 1 if you want to enable code that implements multiple coprocs */
#ifndef MULTIPLE_COPROCS
# define MULTIPLE_COPROCS 0
#endif
+2 -2
View File
@@ -1694,7 +1694,7 @@ cpl_closeall ()
{
struct cpelement *cpe;
for (cpe = coproc_list.head; cpe; )
for (cpe = coproc_list.head; cpe; cpe = cpe->next)
coproc_close (cpe->coproc);
}
@@ -1704,7 +1704,7 @@ cpl_fdchk (fd)
{
struct cpelement *cpe;
for (cpe = coproc_list.head; cpe; )
for (cpe = coproc_list.head; cpe; cpe = cpe->next)
coproc_checkfd (cpe->coproc, fd);
}
+7 -6
View File
@@ -203,14 +203,16 @@ sh_eaccess (path, mode)
if (path_is_devfd (path))
return (sh_stataccess (path, mode));
#if defined (HAVE_FACCESSAT) && defined (AT_EACCESS)
return (faccessat (AT_FDCWD, path, mode, AT_EACCESS));
#elif defined (HAVE_EACCESS) /* FreeBSD */
#if (defined (HAVE_FACCESSAT) && defined (AT_EACCESS)) || defined (HAVE_EACCESS)
# if defined (HAVE_FACCESSAT) && defined (AT_EACCESS)
ret = faccessat (AT_FDCWD, path, mode, AT_EACCESS);
# else /* HAVE_EACCESS */ /* FreeBSD */
ret = eaccess (path, mode); /* XXX -- not always correct for X_OK */
# if defined (__FreeBSD__)
# endif /* HAVE_EACCESS */
# if defined (__FreeBSD__) || defined (SOLARIS)
if (ret == 0 && current_user.euid == 0 && mode == X_OK)
return (sh_stataccess (path, mode));
# endif
# endif /* __FreeBSD__ || SOLARIS */
return ret;
#elif defined (EFF_ONLY_OK) /* SVR4(?), SVR4.2 */
return access (path, mode|EFF_ONLY_OK);
@@ -231,7 +233,6 @@ sh_eaccess (path, mode)
return (sh_stataccess (path, mode));
#endif
return ret;
}
return (sh_stataccess (path, mode));
+1 -1
View File
@@ -1,4 +1,4 @@
UNSET LC_ALL LC_CTYPE
unset LC_ALL LC_CTYPE
export LANG=en_US.UTF-8
case $(printf %d\\n \'À) in