[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ossec-dev] Re: use stack protector on never gcc versions that support it



Hi Jeff,

Thanks for the patch, it is very good. I just found one small issue with it.

+#if defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1) && \
+    (__GNUC_PATCHLEVEL__ >= 2)

If someone has gcc 4.2.1 or 4.3.0 the "ifdef" is not going to match
(because of patch
level). We need at least three checks:


(__GNUC__ == 4) && (__GNUC_MINOR__ == 1) &&  (__GNUC_PATCHLEVEL__ >= 2)

OR

(__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)

OR

(__GNUC__ >= 5)


Whatd do you think? Agreed?

Thanks,

--
Daniel B. Cid
dcid ( at ) ossec.net


On 8/14/07, Jeff Schroeder <jeffschroed@xxxxxxxxx> wrote:
>
> On Aug 14, 1:24 pm, Jeff Schroeder <jeffschr...@xxxxxxxxx> wrote:
> > Index: shared.h
> > ===================================================================
> > RCS file: /usr/cvsroot/ossec-hids/src/headers/shared.h,v
> > retrieving revision 1.35
> > diff -u -r1.35 shared.h
> > --- shared.h    10 Aug 2007 00:56:22 -0000      1.35
> > +++ shared.h    14 Aug 2007 19:55:45 -0000
> > @@ -9,9 +9,24 @@
> >   * Foundation
> >   */
> >
> > -/* v0.2 (2005/12/23): Adding 'u_int16_t' for Solaris.
> > +/* v0.3 (2007/12/23): Adding SSP & FORTIFY_SOURCE
> > <jeffschroe...@xxxxxxxxxxxx>
>
> The google groups webui wrapped the text of this patch.
>
> A non-wrapped version can be found at:
> http://www.digitalprognosis.com/opensource/patches/ossec-stack-protector.patch
>
>


OSSEC home | Main Index | Thread Index


OSSEC project: www.ossec.net.
Mailling list information: http://www.ossec.net/en/mailing_lists.html.