mbox series

[0/9] posix: glob fixes and refactor

Message ID 1504643122-14874-1-git-send-email-adhemerval.zanella@linaro.org
Headers show
Series posix: glob fixes and refactor | expand

Message

Adhemerval Zanella Netto Sept. 5, 2017, 8:25 p.m. UTC
This patchset sync GLIBC glob with latest gnulib code (064df0b).
Instead of dump a large patchset, I decided to split it since
different commits fixes different GLIBC bugs:

  * Patch 1/9 sync with gnulib code b5ec983 and fixes a GLIBC
    specific code regarding DT_UNKNOWN, DT_DIR, and DT_LNK
    definition.  Paul I think we should sync it back to gnulib.

  * Patch 2/9 sync with gnulib 2adc376c55194 and fixes BZ #19971.

  * Patch 3/9 sync with gnulib fd1daf4 and also fixes BZ #866.

  * Patch 4/9 sync with gnulib 3866ef6.  It is related to
    scratch_buffer code.

  * Patch 5/9 sync with gnulib 5db9301.

  * Patch 6/9 sync with gnulib 064df0b and thus it fixes
    BZ #1062.

  * Patch 7/9 is a glob consolidation to avoid the multiple
    architecture implementations.

  * Patch 8/9 just refactor internal code to use an enumeration
    instead of numeric constants.

  * Patch 9/9 fixes BZ #10246.

I think patches from 1 to 8 should be safe to push.

Adhemerval Zanella (9):
  posix: Sync glob with gnulib [BZ #1062]
  posix: accept inode 0 is a valid inode number (BZ #19971)
  posix: Allow glob to match dangling symlinks [BZ #866]
  Sync scratch_buffer with gnulib
  posix: Fix getpwnam_r usage (BZ #1062)
  posix: fix glob bugs with long login names
  posix: Consolidate glob implementation
  posix: Use enum for __glob_pattern_type result
  posix: Fix glob with GLOB_NOCHECK returning modified patterns
    (BZ#10246)

 ChangeLog                                          | 137 +++
 include/scratch_buffer.h                           |   3 +-
 malloc/scratch_buffer_grow.c                       |   6 +-
 malloc/scratch_buffer_grow_preserve.c              |   6 +-
 malloc/scratch_buffer_set_array_size.c             |   6 +-
 posix/Makefile                                     |   6 +-
 posix/bug-glob1.c                                  |  88 --
 posix/flexmember.h                                 |  45 +
 posix/glob.c                                       | 994 ++++++++-------------
 posix/glob64.c                                     |   6 -
 posix/glob_internal.h                              |  65 ++
 posix/glob_pattern_p.c                             |  33 +
 posix/globfree.c                                   |  41 +
 posix/globfree64.c                                 |  31 +
 posix/globtest.sh                                  |  37 +
 posix/tst-glob_symlinks.c                          | 132 +++
 sysdeps/gnu/glob64.c                               |   3 -
 sysdeps/unix/sysv/linux/Makefile                   |   2 +-
 sysdeps/unix/sysv/linux/alpha/glob.c               |   4 -
 sysdeps/unix/sysv/linux/alpha/globfree.c           |  37 +
 sysdeps/unix/sysv/linux/arm/glob64.c               |   1 -
 sysdeps/unix/sysv/linux/glob.c                     |  28 +
 sysdeps/unix/sysv/linux/glob64.c                   |  51 ++
 sysdeps/unix/sysv/linux/globfree.c                 |  30 +
 sysdeps/unix/sysv/linux/globfree64.c               |  36 +
 sysdeps/unix/sysv/linux/i386/alphasort64.c         |   2 +-
 sysdeps/unix/sysv/linux/i386/getdents64.c          |   2 +-
 sysdeps/unix/sysv/linux/i386/glob64.c              |  79 --
 sysdeps/unix/sysv/linux/i386/readdir64.c           |   2 +-
 sysdeps/unix/sysv/linux/i386/readdir64_r.c         |   2 +-
 sysdeps/unix/sysv/linux/i386/versionsort64.c       |   2 +-
 sysdeps/unix/sysv/linux/m68k/glob64.c              |   1 -
 sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c   |   1 -
 sysdeps/unix/sysv/linux/{i386 => }/olddirent.h     |   0
 sysdeps/unix/sysv/linux/oldglob.c                  |  43 +
 sysdeps/unix/sysv/linux/powerpc/powerpc32/glob64.c |   1 -
 sysdeps/unix/sysv/linux/s390/s390-32/glob64.c      |   2 +
 sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c     |   1 -
 sysdeps/unix/sysv/linux/wordsize-64/glob64.c       |   2 -
 sysdeps/unix/sysv/linux/x86_64/x32/glob.c          |   1 -
 sysdeps/wordsize-64/glob64.c                       |   1 -
 sysdeps/wordsize-64/{glob.c => globfree.c}         |   5 +-
 42 files changed, 1139 insertions(+), 836 deletions(-)
 delete mode 100644 posix/bug-glob1.c
 create mode 100644 posix/flexmember.h
 create mode 100644 posix/glob_internal.h
 create mode 100644 posix/glob_pattern_p.c
 create mode 100644 posix/globfree.c
 create mode 100644 posix/globfree64.c
 create mode 100644 posix/tst-glob_symlinks.c
 create mode 100644 sysdeps/unix/sysv/linux/alpha/globfree.c
 delete mode 100644 sysdeps/unix/sysv/linux/arm/glob64.c
 create mode 100644 sysdeps/unix/sysv/linux/glob.c
 create mode 100644 sysdeps/unix/sysv/linux/glob64.c
 create mode 100644 sysdeps/unix/sysv/linux/globfree.c
 create mode 100644 sysdeps/unix/sysv/linux/globfree64.c
 delete mode 100644 sysdeps/unix/sysv/linux/i386/glob64.c
 delete mode 100644 sysdeps/unix/sysv/linux/m68k/glob64.c
 delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c
 rename sysdeps/unix/sysv/linux/{i386 => }/olddirent.h (100%)
 create mode 100644 sysdeps/unix/sysv/linux/oldglob.c
 delete mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/glob64.c
 create mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/glob64.c
 delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c
 delete mode 100644 sysdeps/unix/sysv/linux/wordsize-64/glob64.c
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/x32/glob.c
 delete mode 100644 sysdeps/wordsize-64/glob64.c
 rename sysdeps/wordsize-64/{glob.c => globfree.c} (57%)

-- 
2.7.4