LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-19-2007, 11:15 AM   #1
prapatbu
LQ Newbie
 
Registered: Jul 2007
Posts: 7

Rep: Reputation: 0
compile vsftpd+pam


Don't complie vsftpd with pam on slackware-12.0. Why?
 
Old 07-20-2007, 09:14 PM   #2
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 227Reputation: 227Reputation: 227
Because Slackware doesn't ship with pam
 
Old 08-05-2007, 10:48 AM   #3
prapatbu
LQ Newbie
 
Registered: Jul 2007
Posts: 7

Original Poster
Rep: Reputation: 0
thank you mRgOBLIN.i compile linux-pam and install it on system.
i compile vsftpd agian(./configue;make 2> /tmp/e).this is error
from /tmp/e(vi /tmp/e).

/usr/include/sys/sendfile.h: In function '_syscall2':
/usr/include/sys/sendfile.h:35: error: storage class specified for parameter 'sendfile'
sysdeputil.c:186: error: storage class specified for parameter 'environ'
sysdeputil.c:187: error: storage class specified for parameter 's_proctitle_space'
sysdeputil.c:187: error: parameter 's_proctitle_space' is initialized
sysdeputil.c:188: error: storage class specified for parameter 's_proctitle_inited'
sysdeputil.c:188: error: parameter 's_proctitle_inited' is initialized
sysdeputil.c:189: error: storage class specified for parameter 's_p_proctitle'
sysdeputil.c:189: error: parameter 's_p_proctitle' is initialized
sysdeputil.c:201: error: storage class specified for parameter 'do_sendfile'
sysdeputil.c:202: error: storage class specified for parameter 'vsf_sysutil_setproctitle_internal'
sysdeputil.c:203: error: storage class specified for parameter 's_proctitle_prefix_str'
sysdeputil.c:215: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:436: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:474: error: storage class specified for parameter 'do_checkcap'
sysdeputil.c:478: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:497: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:514: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:527: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:604: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:641: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:796: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:803: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:809: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:856: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:889: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:930: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:935: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:976: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1012: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1128: error: storage class specified for parameter 's_uwtmp_inserted'
sysdeputil.c:1129: error: storage class specified for parameter 's_utent'
sysdeputil.c:1134: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1173: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1189: error: old-style parameter declarations in prototyped function definition
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:1189: error: expected '{' at end of input
make: *** [sysdeputil.o] Error 1
 
Old 08-05-2007, 11:22 AM   #4
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Not that I have ever tried, but I don't believe adding PAM support is as easy as just compiling PAM. There are systematic changes that need to be made, which is why Pat has never included support for it.

Essentially, if you need PAM support, use another distribution. I would suggest Debian, personally.
 
Old 08-05-2007, 05:03 PM   #5
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Rep: Reputation: 38
There are packages for pam at LinuxPackages.net and Slacky-eu.
Don't know if they work well though...
 
Old 08-05-2007, 05:10 PM   #6
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
+1 for debian
 
Old 10-17-2007, 02:46 AM   #7
carpo_tk
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Rep: Reputation: 0
propose a fix

Hello!

I would like to propose the following patch for vsftpd-2.0.5,
which allows for compilation of vsftpd-2.0.5 from source, WITH
PAM support enabled, on Slackware 12 systems (contrary to what is
suggested in the above posts, adding PAM support is as simple as
compiling PAM from source and setting up services config files
in /etc/pam.d/) :

Quote:
--- a/sysdeputil.c 2006-07-03 01:14:10.000000000 +0300
+++ b/sysdeputil.c 2007-10-17 09:40:18.000000000 +0300
@@ -159,7 +159,7 @@
#include <linux/capability.h>
#include <errno.h>
#include <syscall.h>
-_syscall2(int, capset, cap_user_header_t, header, const cap_user_data_t, data)
+//_syscall2(int, capset, cap_user_header_t, header, const cap_user_data_t, data)
/* Gross HACK to avoid warnings - linux headers overlap glibc headers */
#undef __NFDBITS
#undef __FDMASK
The above patch, when applied to vsftpd-2.0.5 sources does generate
a few warnings during compile time, at least on Slackware 12, but
the executable otherwise works as expected. Tested. On Slack 12.

To use the above patch on a Slackware 12 system, save the above code
for example in a file named "vsftpd-2.0.5-glibc-2.5-patch", and do this:
Quote:
user@machine$ mkdir /tmp/compile
user@machine$ cd /tmp/compile
user@machine$ gunzip -c /path/to/vsftpd-2.0.5.tar.gz | tar -xv
user@machine$ cd vsftpd-2.0.5
user@machine$ cat /path/to/vsftpd-2.0.5-glibc-2.5-patch | patch -p1
After this all you need to do is edit builddefs.h to your liking, run
"make", followed by a "make install" as root to get the vsftpd
executable in the "/usr/local/sbin" folder (vsftpd default).

Best regards,
Pl. Petrov

Last edited by carpo_tk; 10-17-2007 at 02:48 AM. Reason: clarification
 
Old 10-18-2007, 08:37 AM   #8
prapatbu
LQ Newbie
 
Registered: Jul 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Thank You Very Much carpo_tk

this is screen when i do it.
root@slackware-12.0:~/vsftpd-2.0.5# cat ../vsftpd-2*patch | patch -p1
(Stripping trailing CRs from patch.)
patching file sysdeputil.c
patch: **** malformed patch at line 4: #include <linux/capability.h>

root@slackware:~/vsftpd-2.0.5# make
gcc -c main.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c utility.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c prelogin.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ftpcmdio.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c postlogin.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c privsock.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c tunables.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ftpdataio.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c secbuf.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ls.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c postprivparent.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c logging.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c str.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c netstr.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c sysstr.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c strlist.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c banner.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c filestr.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c parseconf.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c secutil.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ascii.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c oneprocess.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c twoprocess.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c privops.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c standalone.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c hash.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c tcpwrap.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ipaddrparse.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c access.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c features.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c readwrite.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ssl.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c sysutil.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c sysdeputil.c -O2 -Wall -W -Wshadow -idirafter dummyinc
sysdeputil.c:162: error: expected declaration specifiers or '...' before 'capset'
sysdeputil.c:162: error: expected declaration specifiers or '...' before 'header'
sysdeputil.c:162: error: expected declaration specifiers or '...' before 'data'
In file included from sysdeputil.c:170:
/usr/include/sys/sendfile.h: In function '_syscall2':
/usr/include/sys/sendfile.h:35: error: storage class specified for parameter 'sendfile'
sysdeputil.c:186: error: storage class specified for parameter 'environ'
sysdeputil.c:187: error: storage class specified for parameter 's_proctitle_space'
sysdeputil.c:187: error: parameter 's_proctitle_space' is initialized
sysdeputil.c:188: error: storage class specified for parameter 's_proctitle_inited'
sysdeputil.c:188: error: parameter 's_proctitle_inited' is initialized
sysdeputil.c:189: error: storage class specified for parameter 's_p_proctitle'
sysdeputil.c:189: error: parameter 's_p_proctitle' is initialized
sysdeputil.c:201: error: storage class specified for parameter 'do_sendfile'
sysdeputil.c:202: error: storage class specified for parameter 'vsf_sysutil_setproctitle_internal'
sysdeputil.c:203: error: storage class specified for parameter 's_proctitle_prefix_str'
sysdeputil.c:215: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:436: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:474: error: storage class specified for parameter 'do_checkcap'
sysdeputil.c:478: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:497: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:514: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:527: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:604: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:641: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:796: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:803: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:809: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:856: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:889: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:930: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:935: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:976: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1012: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1128: error: storage class specified for parameter 's_uwtmp_inserted'
sysdeputil.c:1129: error: storage class specified for parameter 's_utent'
sysdeputil.c:1134: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1173: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1189: error: old-style parameter declarations in prototyped function definition
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:1189: error: expected '{' at end of input
make: *** [sysdeputil.o] Error 1

Thank you for help
 
Old 10-19-2007, 12:37 AM   #9
carpo_tk
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Rep: Reputation: 0
fine instructions

@prapatbu: Please, try the following:
remove the source directory of vsftpd-2.0.5, if have such, and
extract it again. If you notice what the patch I posted does,
you'll see it just comments out a single line in the file
sysdeputil.c inside vsftpd-2.0.5 source directory:
its the line defining

_syscall2(int, capset, cap_user_header_t, header, const cap_user_data_t, data)

just above this:

/* Gross HACK to avoid warnings - linux headers overlap glibc headers */

so, all you need to do is to put to slashes ( // ) in front
of the _syscall line.

Then you go on and edit builddefs.h and compile, it should work
with a few warnings.

If you use what I proposed in my first post on this thread, the
output while patching is:

patching file sysdeputil.c

and just that!
I think your mistake is that you have a star ( * ) in the command
that does the patching, so it hasn't worked for you - try by writing
the full and exact file names of the files involved!
I guess you know that a star in a command for the shell gets
substituted with something else - thats what the star is actually for,
allows you to write a command, whose name matches a pattern, and
in this case, you don't want that - you just want patch to use
the patch I supplied!

Good luck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd pam authentication mikeseal Linux - Networking 5 03-14-2010 05:33 PM
VSFTPD virtual users pam problem Cmdr_K00n Linux - Networking 2 10-19-2007 01:44 AM
vsftpd with PAM... errors in builddefs.h killahsmurf Linux - Networking 1 04-25-2005 04:28 AM
vsftpd + pam + virtual users - Pam cannot load database file. mdkelly069 Linux - Networking 3 09-22-2004 11:07 PM
Vsftpd and PAM ispnepal Linux - Networking 0 06-11-2004 06:48 AM


All times are GMT -5. The time now is 11:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration