This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]Package extention recognition (revision 1)


----- Original Message -----
From: "Robert Collins" <robert.collins@itdomain.com.au>
To: "Michael A Chase" <mchase@ix.netcom.com>
Cc: <cygwin-patches@cygwin.com>
Sent: Friday, January 25, 2002 02:04
Subject: Re: [PATCH]Package extention recognition (revision 1)


> On Fri, 2002-01-25 at 20:44, Michael A Chase wrote:
> > ----- Original Message -----
> > ".bz2" only 'protects' WinZip users until WinZip starts handling bzip2
> > files.  That may never happen, but ".cwp" (or ".rpm" or ".deb") isn't
> > vulnerable to WinZip improvements.
>
> .cwp is hardly protection, it's just as, or more, vulnerable to Winzip
> improvements. .deb and .rpm are more resilient, but hardly beyond access
> for Winzip.
>
> > > > The current un-patched code leaves off ".tar" inadvertently.
>
> > >
> > > I'll apply the lot if you'll
> > > 1) cleanup the strduping,
> >
> > The strdup() was in one of the lines I didn't change.  I'll change it.
> > While I'm at it, I'll look for other strdup() calls in the file and
change
> > them as well.
>
> There shouldn't be any strdups elsewhere, I recall now why I hadn't
> changed fromcwd.cc's strdup calls - because the code was commented out.
> Having actually looked closely at this, I'm inclined to add a FIXME line
> rather than your patch - not because your code is wrong, but because the
> structs you are operating on are gone! (There's no info struct, and no
> trust enum any more...).

I had originally only touched it to make sure the additional allowed archive
extensions wouldn't break the code.  There's already a FIXME.  Maybe it
should be replaced with something that says the structures no longer exist.
Unless the right answer is to just delete the whole mess.

  // Reinstate this FIXME:

to

  // Reinstate this FIXME: Use new classes in place of obsolete structures.

> > > 2) Answer my query about filemanip.
> >
> > The '-' lines below are from the unpatched filemanip.cc.  Notice the ';'
at
> > the end of the 'if' lines.  That causes the return after the ".tar.gz"
'if'
> > statement to always be executed.  As a result, the test for ".tar" never
> > gets executed.
>
> Doh!.
>
> > My original patch (which I forgot to attach to the first message)
included a
> > test for ".cwp" to test the waters.  Should I add it back?  If I do,
should
> > I also add ".rpm", and ".deb"?
>
> No, I think bz2 will last us until .deb or rpm is ready. And we
> shouldn't try to read something we can't :]. However your patch still
> looks wrong because it removes the .tar support - which costs us nothing
> to have, and may be useful for someone :}.

The second patch left out ".tar" because it wasn't being executed.  I'll put
it back.

--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]