| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 | #! /bin/sh# Copyright (C) 2013-2017 Free Software Foundation, Inc.## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2, or (at your option)# any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program.  If not, see <http://www.gnu.org/licenses/>.# Check that UID or GID too high for the ustar format are correctly# rwcognized and diagnosed by configure.  See bug#8343 and bug#13588.. test-init.shcat > configure.ac <<ENDAC_INIT([$me], [1.0])AM_INIT_AUTOMAKE([tar-ustar])AC_CONFIG_FILES([Makefile])AC_OUTPUTEND: > Makefile.amrun_configure(){  st=0; ./configure ${1+"$@"}  >stdout || st=$?  cat stdout || exit 1  test $st -eq 0 || exit 1}checked (){  grep "^checking $1\.\.\. $2$" stdout}$ACLOCAL$AUTOCONF$AUTOMAKEmkdir bincat > bin/id <<'END'#!/bin/sh -ecase "$*" in  -u) echo "${am_uid-1000}";;  -g) echo "${am_gid-1000}";;   *) echo "id: bad/unexpected usage" >&2; exit 1;;esacENDchmod a+x bin/idPATH=$(pwd)/bin$PATH_SEPARATOR$PATH# Problematic ID reported in# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.am_uid=16777216; export am_uidam_gid=1000;     export am_gidrun_configurechecked "whether UID '$am_uid' is supported by ustar format" "no"checked "whether GID '1000' is supported by ustar format" "yes"checked "how to create a ustar tar archive" "none"# Another problematic ID reported in# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.am_uid=1000;     export am_uidam_gid=17000000; export am_gidrun_configurechecked "whether UID '1000' is supported by ustar format" "yes"checked "whether GID '$am_gid' is supported by ustar format" "no"checked "how to create a ustar tar archive" "none"# The minimal ID that is too big.two_to_twentyone=$((32 * 32 * 32 * 32 * 2))# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.am_uid=$two_to_twentyone; export am_uidam_gid=$two_to_twentyone; export am_gidrun_configurechecked "whether UID '$two_to_twentyone' is supported by ustar format" "no"checked "whether GID '$two_to_twentyone' is supported by ustar format" "no"checked "how to create a ustar tar archive" "none":
 |