I had problems with installing on OS X 10.5; I ended up adding a #else to 
the above and coding my own strnlen function.

On Tuesday, November 20, 2012 12:39:18 PM UTC-6, dan (ddpbsd) wrote:
>
> On Tue, Nov 20, 2012 at 1:16 PM, bujanga <buj...@gmail.com <javascript:>> 
> wrote: 
> > Yes, 1 is a local admin issue. 
> > 
> > Here is more on 2 from a different server running FreeBSD 
> > 7.3-RELEASE-p1. I am willing to do more here if you want, just let me 
> > know. 
> > 
> > ----------------------------------------------------------------- 
> >  *** Making os_csyslogd *** 
> > 
> > gcc -g -Wall -I../ -I../headers  -DDEFAULTDIR=\"/var/ossec\" -DCLIENT 
> > -DUSE_OPENSSL      -DARGV0=\"ossec-csyslogd\" -DXML_VAR=\"var\" 
> > -DOSSECHIDS  *.c ../config/lib_config.a ../shared/lib_shared.a 
> > ../os_net/os_net.a ../os_regex/os_regex.a ../os_xml/os_xml.a -o 
> > ossec-csyslogd 
> > csyslogd.c: In function 'field_add_string': 
> > csyslogd.c:117: warning: implicit declaration of function 'strnlen' 
> > /var/tmp//cc23x9Np.o(.text+0x24f): In function `field_add_string': 
> > /root/apps/ossec/ossec-hids-2.7/src/os_csyslogd/csyslogd.c:117: 
> > undefined reference to `strnlen' 
> > /var/tmp//cc23x9Np.o(.text+0x369): In function `field_add_truncated': 
> > /root/apps/ossec/ossec-hids-2.7/src/os_csyslogd/csyslogd.c:142: 
> > undefined reference to `strnlen' 
> > /var/tmp//cc23x9Np.o(.text+0x57f): In function `field_add_int': 
> > /root/apps/ossec/ossec-hids-2.7/src/os_csyslogd/csyslogd.c:191: 
> > undefined reference to `strnlen' 
> > *** Error code 1 
> > 
> > Stop in /root/apps/ossec/ossec-hids-2.7/src/os_csyslogd. 
> > 
> > Error Making os_csyslogd 
> > *** Error code 1 
> > 
> > Stop in /root/apps/ossec/ossec-hids-2.7/src. 
> > 
> >  Error 0x5. 
> >  Building error. Unable to finish the installation. 
> > 
>
> I'd try building it with a patch like this: 
>
> --- csyslogd.c.orig     Tue Nov 20 13:33:36 2012 
> +++ csyslogd.c  Tue Nov 20 13:33:51 2012 
> @@ -16,10 +16,7 @@ 
>
>
>  /* strnlen is a GNU extension */ 
> -#ifdef __linux__ 
> - #define _GNU_SOURCE 
> - #include <string.h> 
> -#endif 
> +#include <string.h> 
>  #include "csyslogd.h" 
>  #include "os_net/os_net.h" 
>
>
> Not sure why it works on other, non-linux, platforms. Also not sure 
> why strnlen is used explicitly if string.h isn't included 
> explicitly... 
>
> > 
> > ----------------------------------------------------------------- 
> > 
> > On Tue, Nov 20, 2012 at 9:18 AM, dan (ddp) <ddp...@gmail.com<javascript:>> 
> wrote: 
> >> On Tue, Nov 20, 2012 at 10:07 AM, bujanga <buj...@gmail.com<javascript:>> 
> wrote: 
> >>> I am running a legacy FreeBSD 7.4 system and had some minor issues 
> >>> installing OSSEC as an agent. 
> >>> 
> >>> 1. It says I must be user root to install. 
> >>> I su to the user toor and save my root for console work only. Since I 
> >>> am remote, this caused a minor stumble. The install script should 
> >>> check the UID rather than the user name. 
> >>> From about line 930 of v2.6 and line 975 of v2.7 
> >>>     # Must be root 
> >>>     if [ ! "X$ME" = "Xroot" ]; then 
> >>>         catError "0x2-beroot"; 
> >>>     fi 
> >>> As a quick fix, I simply changed "Xroot" to "Xtoor". 
> >>> 
> >> 
> >> Meh, seems like an admin issue. Shouldn't have been too hard to 
> >> include a patch with a real fix though. 
> >> 
> >>> 2. Unable to install version 2.7. I did not troubleshoot this but 
> >>> immediately tried to install 2.6 instead. Version 2.6 installed 
> >>> without issue. 
> >> 
> >> Why bother sending the email if you aren't going to give us a hint? 
>

Reply via email to