Archive-Unzip-Burst

 view release on metacpan or  search on metacpan

unzip-6.0/History.600  view on Meta::CPAN

 - Where: used the newer version from UnZip 5.52 [Chr. Spieler]

6.00c13 (02 Oct 05):
 - AOS/VS, Atari, AtheOS, BeOS, UNIX: fixed symlink code by avoiding fclose()
    on NULL handle in extract.c [Dan Yefimov]
 - AOS/VS, Atari, AtheOS, BeOS, UNIX (and unzpriv.h, fileio.c): modified the
    symlink code to use the opened outfile handle for re-reading the symlink
    target data; modified open_outfile to allow read access on outfile handle
    (security fix against "ToCToU" vulnerability) [Chr. Spieler]
 - UNIX (unix.c, Makefile, configure): fixed "ToCToU" security vulnerability
    in close_outfile by using fchown() & fchmod() instead of chown() & chmod()
    (only when available); added check for function existence to configure
    [Dan Yefimov, Matthias Scheler, Chr. Spieler]
 - fileio.c - open_outfile(): deny access for group&world to currently open
    outfile on all systems that support umask() (AOS/VS, Atari, AtheOS, BeOS,
    QDOS, Tandem, UNIX) [Chr. Spieler]
 - unzpriv.h, fileio.c - open_outfile(): open outfile in "write update" mode
    when supporting symlinks or QLZIP extensions; these features require the
    ability to reread the opened outfile [Chr. Spieler]
 - fileio.c: added WriteTxtErr() macro to allow differenciating between
    text-mode write function calls (in UzpMessagePrnt()) and binary write calls

unzip-6.0/History.600  view on Meta::CPAN

 - vms/build_unzip.com: optimized the distinction between "compile destination
    subdir" for integrated BZIP2 compilation (should distinguish between the
    different compilers supported for VAX) and "external library dir" for
    user-supplied BZIP2 (and ZLIB) libraries (user-supplied library is expected
    to work with any supported compiler on VAX, so no dependency on the
    specific compiler used).  [Steven M. Schweda]
 - unzip.c: replaced tab characters in output messages by appropiate number of
    spaces (assuming standard tab spacing of 8 chars), to prevent mis-formatted
    output on terminals with non-standard tabstop settings.  [S. M. Schweda]
 - unix/unix.c
    * set_symlnk_attribs(): fixed uid/gid size check before calling lchown();
    * set_direc_attribs(): repared wrongly inserted patch and fixed uid/gid
      size check before calling chown().  [Chr. Spieler]
 - vms/vms.c: fixed user-query code for existing files on VMS when extracting
    in "-V" mode (retaining version numbers); fixed some problems with exotic
    extended ODS5 file names, and files named ".".  [Steven M. Schweda]
 - vms/cmdline.c, vms/unz_cli.cld: extended CLI to support the new extended
    meaning of the -o flag (-oo => "overwrite ALL existing" when retaining
    version numbers ("-V") and extracting archive members with attached version
    number (new /EXISTING option).  [Steven M. Schweda]
 - extract.c - extract_or_test_entrylist(): added code to skip the generic user
    query "overwrite (y/n/r)?" when extracting an entry with attached version
    number in "-V" (keep version number) mode.  [Steven M. Schweda, C. Spieler]

unzip-6.0/atheos/atheos.c  view on Meta::CPAN

        if (ptr) {
            setAtheOSexfield(G.filename, ptr);
        }
    }

    have_uidgid_flg = get_extattribs(__G__ &(zt.t3), z_uidgid);

    /* if -X option was specified and we have UID/GID info, restore it */
    if (have_uidgid_flg) {
        TTrace((stderr, "close_outfile:  restoring Unix UID/GID info\n"));
        if (chown(G.filename, (uid_t)z_uidgid[0], (gid_t)z_uidgid[1]))
        {
            if (uO.qflag)
                Info(slide, 0x201, ((char *)slide,
                  "warning:  cannot set UID %lu and/or GID %lu for %s\n",
                  z_uidgid[0], z_uidgid[1], FnFilter1(G.filename)));
            else
                Info(slide, 0x201, ((char *)slide,
                  " (warning) cannot set UID %lu and/or GID %lu",
                  z_uidgid[0], z_uidgid[1]));
        }

unzip-6.0/atheos/atheos.c  view on Meta::CPAN

} /* end function defer_dir_attribs() */


int set_direc_attribs(__G__ d)
    __GDEF
    direntry *d;
{
    int errval = PK_OK;

    if (UxAtt(d)->have_uidgid &&
        chown(UxAtt(d)->fn, (uid_t)UxAtt(d)->uidgid[0],
              (gid_t)UxAtt(d)->uidgid[1]))
    {
        Info(slide, 0x201, ((char *)slide,
          LoadFarString(DirlistUidGidFailed),
          UxAtt(d)->uidgid[0], UxAtt(d)->uidgid[1], FnFilter1(d->fn)));
        if (!errval)
            errval = PK_WARN;
    }
    /* Skip restoring directory time stamps on user' request. */
    if (uO.D_flag <= 0) {

unzip-6.0/beos/beos.c  view on Meta::CPAN

    if (chmod(G.filename, filtattr(__G__ G.pInfo->file_attr)))
        perror("chmod (file attributes) error");
#endif

    /* if -X option was specified and we have UID/GID info, restore it */
    if (have_uidgid_flg
        /* check that both uid and gid values fit into their data sizes */
        && ((ulg)(uid_t)(z_uidgid[0]) == z_uidgid[0])
        && ((ulg)(gid_t)(z_uidgid[1]) == z_uidgid[1])) {
        TTrace((stderr, "close_outfile:  restoring Unix UID/GID info\n"));
        if (chown(G.filename, (uid_t)z_uidgid[0], (gid_t)z_uidgid[1]))
        {
            if (uO.qflag)
                Info(slide, 0x201, ((char *)slide, CannotSetItemUidGid,
                  z_uidgid[0], z_uidgid[1], FnFilter1(G.filename),
                  strerror(errno)));
            else
                Info(slide, 0x201, ((char *)slide, CannotSetUidGid,
                  z_uidgid[0], z_uidgid[1], strerror(errno)));
        }
    }

unzip-6.0/beos/beos.c  view on Meta::CPAN

int set_direc_attribs(__G__ d)
    __GDEF
    direntry *d;
{
    int errval = PK_OK;

    if (UxAtt(d)->have_uidgid &&
        /* check that both uid and gid values fit into their data sizes */
        ((ulg)(uid_t)(UxAtt(d)->uidgid[0]) == UxAtt(d)->uidgid[0]) &&
        ((ulg)(gid_t)(UxAtt(d)->uidgid[1]) == UxAtt(d)->uidgid[1]) &&
        chown(UxAtt(d)->fn, (uid_t)UxAtt(d)->uidgid[0],
              (gid_t)UxAtt(d)->uidgid[1]))
    {
        Info(slide, 0x201, ((char *)slide, CannotSetItemUidGid,
          UxAtt(d)->uidgid[0], UxAtt(d)->uidgid[1], FnFilter1(d->fn),
          strerror(errno)));
        if (!errval)
            errval = PK_WARN;
    }
    /* Skip restoring directory time stamps on user' request. */
    if (uO.D_flag <= 0) {

unzip-6.0/proginfo/CONTRIBS  view on Meta::CPAN

  Thomas Opheys          Watcom C stat() bugfix
  Humberto Ortiz-Zuazaga Linux port; permissions bugfix; missing declarations
  Keith Owens            MVS support and extensions
  Fernando Papa          inflate memory leaks
  Rafael Pappalardo      Convex CRYPT bugfix; Convex Makefile entry, useful info
  Trevor Paquette        Unix makefile entry
  Keith Petersen         Pyramid fixes; former Info-ZIP list maintainer
  George Petrov          initial MVS, VM/CMS ports (!)
  Alan Phillips          Unix makefile entry
  Art Pina               C Set/2 crypt.c optimization bug
  Piet W. Plomp          Unix chmod()/chown() fix; msc_dos fixes; much testing
  Norbert Pueschel       Amiga timelib
  Clint Pulley           Unix makefile entry
  Antonio Querubin, Jr.  descrip.mms (VMS makefile)
  Alistair Rae           Encore preprocessor bugfix
  Eric S. Raymond        manpage tweaks for DocBook compatibility
  Wally Reiher           timezone bugfix
  Stephen Ritcey         vms/README installation correction
  Phil Ritzenthaler      ANSIfication bugfix
  Simon Roberts          Windows CE 2.1x/3.0 cmdline port
  David Robinson         MSC 6.0 stat() bugfix

unzip-6.0/qdos/qdos.c  view on Meta::CPAN

*/
/*---------------------------------------------------------------------------

  qdos.c

  QDOS-specific routines for use with Info-ZIP's UnZip 5.3 and later.

  Contains:  Qstrfix()
             QFilename()
             QMatch()
             chowner()
             Qgetch()
             QReturn()
             LastDir()
             screensize()
             do_wild()           <-- generic enough to put in file_io.c?
             mapattr()
             mapname()
             checkdir()
             qfix()
             close_outfile()

unzip-6.0/qdos/qdos.c  view on Meta::CPAN

    1,
    0,
    7,
    500,
    220,
    2,
    30
};


static jobid_t chowner(chanid_t chan)
{
    extern char *_sys_var;
    char *scht;
    long *cdb;
    long jid;

    scht = *((char **)(_sys_var + 0x78));
    cdb = *(long **)((long *)scht  + (chan & 0xffff));
    jid = *(cdb + 2);
    return jid;
}

int QReturn(int err)
{
    jobid_t me,you;

    me = getpid();
    you = chowner(getchid(0));

    if((me == you) && ((qlflag & 4) == 0))
    {
        if(isatty(0) && isatty(2) && qlwait)
        {
            char c = 0;
            fputs("Press a key to exit", stderr);
            if((io_fbyte(getchid(0), qlwait, &c) == 0) && c == 27)
            {
                io_fbyte(getchid(0), -1, &c);

unzip-6.0/tandem/README  view on Meta::CPAN

2. Changes for version 2.2 affected files:
- TANDEMC     (changes to stat() to pass file creation time)
- ZIPINFOC    (exclude TANDEM from tzset() test)
3. Fix to default time/date field to UK format (dd/mm/yyyy)
03/08/98  5.33f   Updates for TANDEMC/H to keep instep with ZIP (file buffering)
                 New DOIT macro for extracting files from archive
                 Fix in2ex to expand full vol/subvol depending on '-j' flag
17/08/98  5.33f   Set USE_EF_UT_TIME to allow for timezone changes
18/08/98  5.33f   Use define LICENSED to build object able to update timestamps
19/08/98  5.33f   Add -X flag support (restore file owner id) via unzip.c/h
                 new chown function in tandem.c.
                 Modified close_outfile to make the chown the last step.
30/11/98  5.41a  Updated mapname/chmod/in2ex, include licensing in MAKE
21/12/98  5.41a  Add decoding of new Tandem extra field EF_TANDEM
                 Make '-a' default option.  Add '-b' option to force creation
                 of 'C' filecode 180 type text files.
                 If available populate Tandem file code (e.g. Object files)
                 Rationalised TANDEMH and TANDEMC wth ZIP 2.3i
                 Fixed MORE (-M flag) processing by creating zgetch()
12/01/99  5.41a  Correct bug stopping setting of last open timestamp
24/03/99  5.41b  Split TANDEMC into TANDEMC/TANZIPC/TANUNZC
24/03/99  5.41b  Added TANNSKH to allow for declarations which require

unzip-6.0/tandem/tandem.c  view on Meta::CPAN

  extension = parsename (file,fname,ext);
  len = strlen(fname);

  err = FILE_OPEN_((char *)fname, len, &fnum, access, exclus,,,options,,,);
  err = (SETMODE(fnum, SET_FILE_SECURITY, nsk_sec_int) != CCE);
  err = FILE_CLOSE_(fnum);

  return (err != 0 ? -1 : 0);
}

/* TANDEM version of chown() function */

int chown(file, uid, gid)
  const char *file;
  uid_t uid;
  gid_t gid;
{
  FILE *stream;
  struct nsk_own_type {
    unsigned group  : 8;
    unsigned user   : 8;
  };
  union nsk_own_ov {

unzip-6.0/tandem/tanunz.c  view on Meta::CPAN

#endif

/*---------------------------------------------------------------------------
       if -X option was specified and we have UID/GID info, restore it
       this must come after the file security and modtimes changes - since once
       we have secured the file to somebody else we cannot access it again.
  ---------------------------------------------------------------------------*/

    if (uO.X_flag && eb_izux_flg & EB_UX2_VALID) {
        TTrace((stderr, "close_outfile:  restoring Unix UID/GID info\n"));
        if (chown(G.filename, (uid_t)z_uidgid[0], (gid_t)z_uidgid[1]))
        {
            if (uO.qflag)
                Info(slide, 0x201, ((char *)slide,
                  "warning:  cannot set UID %lu and/or GID %lu for %s\n",
                  z_uidgid[0], z_uidgid[1], FnFilter1(G.filename)));
            else
                Info(slide, 0x201, ((char *)slide,
                  " (warning) cannot set UID %lu and/or GID %lu",
                  z_uidgid[0], z_uidgid[1]));
        }

unzip-6.0/unix/configure  view on Meta::CPAN

#else
   forget it
#endif
}
_EOF_
$CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
[ $? -eq 0 ] && BFLAG="-fno-builtin"

# Check for missing functions
# add NO_'function_name' to flags if missing
for func in fchmod fchown lchown nl_langinfo
do
  echo Check for $func
  echo "int main(){ $func(); return 0; }" > conftest.c
  $CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null
  [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
done

# Check (seriously) for a working lchmod.
echo 'Check for lchmod'
temp_file="/tmp/unzip_test_$$"

unzip-6.0/unix/unix.c  view on Meta::CPAN

    fclose(G.outfile);
#endif

    /* if -X option was specified and we have UID/GID info, restore it */
    if (have_uidgid_flg
        /* check that both uid and gid values fit into their data sizes */
        && ((ulg)(uid_t)(z_uidgid[0]) == z_uidgid[0])
        && ((ulg)(gid_t)(z_uidgid[1]) == z_uidgid[1])) {
        TTrace((stderr, "close_outfile:  restoring Unix UID/GID info\n"));
#if (defined(NO_FCHOWN))
        if (chown(G.filename, (uid_t)z_uidgid[0], (gid_t)z_uidgid[1]))
#else
        if (fchown(fileno(G.outfile), (uid_t)z_uidgid[0], (gid_t)z_uidgid[1]))
#endif
        {
            if (uO.qflag)
                Info(slide, 0x201, ((char *)slide, CannotSetItemUidGid,
                  z_uidgid[0], z_uidgid[1], FnFilter1(G.filename),
                  strerror(errno)));
            else
                Info(slide, 0x201, ((char *)slide, CannotSetUidGid,
                  z_uidgid[0], z_uidgid[1], strerror(errno)));
        }

unzip-6.0/unix/unix.c  view on Meta::CPAN

# if (!defined(NO_LCHOWN))
      if (slnk_entry->attriblen > sizeof(unsigned)) {
        ulg *z_uidgid_p = (zvoid *)(slnk_entry->buf + sizeof(unsigned));
        /* check that both uid and gid values fit into their data sizes */
        if (((ulg)(uid_t)(z_uidgid_p[0]) == z_uidgid_p[0]) &&
            ((ulg)(gid_t)(z_uidgid_p[1]) == z_uidgid_p[1])) {
          TTrace((stderr,
            "set_symlnk_attribs:  restoring Unix UID/GID info for\n\
        %s\n",
            FnFilter1(slnk_entry->fname)));
          if (lchown(slnk_entry->fname,
                     (uid_t)z_uidgid_p[0], (gid_t)z_uidgid_p[1]))
          {
            Info(slide, 0x201, ((char *)slide, CannotSetItemUidGid,
              z_uidgid_p[0], z_uidgid_p[1], FnFilter1(slnk_entry->fname),
              strerror(errno)));
          }
        }
      }
# endif /* !NO_LCHOWN */
# if (!defined(NO_LCHMOD))

unzip-6.0/unix/unix.c  view on Meta::CPAN

int set_direc_attribs(__G__ d)
    __GDEF
    direntry *d;
{
    int errval = PK_OK;

    if (UxAtt(d)->have_uidgid &&
        /* check that both uid and gid values fit into their data sizes */
        ((ulg)(uid_t)(UxAtt(d)->uidgid[0]) == UxAtt(d)->uidgid[0]) &&
        ((ulg)(gid_t)(UxAtt(d)->uidgid[1]) == UxAtt(d)->uidgid[1]) &&
        chown(UxAtt(d)->fn, (uid_t)UxAtt(d)->uidgid[0],
              (gid_t)UxAtt(d)->uidgid[1]))
    {
        Info(slide, 0x201, ((char *)slide, CannotSetItemUidGid,
          UxAtt(d)->uidgid[0], UxAtt(d)->uidgid[1], FnFilter1(d->fn),
          strerror(errno)));
        if (!errval)
            errval = PK_WARN;
    }
    /* Skip restoring directory time stamps on user' request. */
    if (uO.D_flag <= 0) {



( run in 0.870 second using v1.01-cache-2.11-cpan-71847e10f99 )