1827210 Members
2964 Online
109716 Solutions
New Discussion

trying to compile vsftpd

 
SOLVED
Go to solution
Amy Musser
Occasional Contributor

trying to compile vsftpd

I am running HP-UX 11iv2 and I'm trying to compile vsftpd 2.0.3 and I'm getting the following error.

# make
gcc -c sysdeputil.c -O2 -Wall -W -Wshadow -idirafter dummyinc
sysdeputil.c: In function `vsf_sysdep_check_auth':
sysdeputil.c:289: warning: initialization from incompatible pointer type
sysdeputil.c: In function `vsf_sysutil_setproctitle_internal':
sysdeputil.c:827: warning: assignment discards qualifiers from pointer target type
sysdeputil.c: In function `vsf_insert_uwtmp':
sysdeputil.c:1146: warning: implicit declaration of function `updwtmpx'
sysdeputil.c:1146: error: `WTMPX_FILE' undeclared (first use in this function)
sysdeputil.c:1146: error: (Each undeclared identifier is reported only once
sysdeputil.c:1146: error: for each function it appears in.)
sysdeputil.c: In function `vsf_remove_uwtmp':
sysdeputil.c:1166: error: `WTMPX_FILE' undeclared (first use in this function)
*** Error exit code 1

Stop.


Anyone else ever run into this?
6 REPLIES 6
Alex Lavrov.
Honored Contributor

Re: trying to compile vsftpd

After some googling I saw that it's a pretty common problem on HPUX when compiling different applications and it appears as bug report. Like here:
http://mail.gnome.org/archives/gnome-list/1998-November/msg00443.html
Yes, it's old, but it seems that the problem is still actual.

I think you should ask for a patch from developers os vsftpd.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Steven E. Protter
Exalted Contributor

Re: trying to compile vsftpd

Almost every single application that was open source that I used in various HP classes required some minor changes in the configuration files or header files before it would compile in HP-UX.

What you are trying is not very common. Proftpd has been ported to HP-UX and has the bugs pretty much worked out.

If you suceed, perhaps take the time to create a depot version, but beware of security issues and instability. Test heavily before you rely on it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ermin Borovac
Honored Contributor
Solution

Re: trying to compile vsftpd

HP-UX doesn't use wtmpx file, instead it uses wtmp file (/var/adm/wtmp). This binary file records all logins and logouts.

To fix simply edit sysdeputil.c and find the following section. Last line before #endif is what you need to add. This will make vsftpd use wtmp related functions (not wtmpx equivalents).

#ifdef __hpux
#include
#ifdef SF_DISCONNECT
#define VSF_SYSDEP_HAVE_HPUX_SENDFILE
#endif
#include
#include
#ifdef PSTAT_SETCMD
#define VSF_SYSDEP_HAVE_HPUX_SETPROCTITLE
#endif
#undef VSF_SYSDEP_HAVE_UTMPX
#endif

After modifying sysdeputil.c as described vsftpd should compile without any problems.
Amy Musser
Occasional Contributor

Re: trying to compile vsftpd

Editing that file and adding that line worked. Thanks for the tip Ermin.
feuillet
Advisor

Re: trying to compile vsftpd

Hi!

I follow this instructions when I install vsftpd but I have still this error...

The difference is that I work with HPUX 11iv1 and not v2 : this is a probleme?

Thanks
Muthukumar_5
Honored Contributor

Re: trying to compile vsftpd

feuilet,

If you are having more problem then post as a separate thread with issues and log informations to get help. If you add question with this thread then, amy has to assign points. :)

Start to create a new thread with your try and issues.

-Muthu
Easy to suggest when don't know about the problem!