#619599 Enhancement: start/stop pure-authd when /etc/pure-ftpd/conf/ExtAuth is present

Package:
pure-ftpd
Source:
pure-ftpd
Description:
Secure and efficient FTP server
Submitter:
Borut Mrak
Date:
2011-07-18 16:15:04 UTC
Severity:
wishlist
#619599#5
Date:
2011-03-25 13:56:59 UTC
From:
To:
I needed to enable the external authentication daemon pure-authd.

Found out about /etc/pure-ftpd/conf/ExtAuth, but the FTP daemon would not
start, because the socket (which gets created by pure-authd) was missing.

It seemed illogical to create another init script, since the upload handler
is already started from the pure-ftpd init script. The auth daemon has to be
started before pure-ftpd because it needs to create the authentication
socket first (configured in ExtAuth, but in my opinion it should be static,
the ExtAuth value changed to boolean, like CallUploadScript[B)

I'm attaching the diff from the old init script (I did this on Lenny, but I
checked the sid init script and it doesn't seem like anything changed).

I'm also attaching an example python external authentication script which
could be a little more polished, but it was just a proof of concept for me.
If you're interested in including it, I'm willing to spruce it up a little.

There are also a few new variables to be set in
/etc/default/pure-ftpd-common:

AUTHDSCRIPT=/path/to/authhandler[B
AUTHDUID=
AUTHDGID=

in line with the variables used for upload handler.

#619599#10
Date:
2011-07-18 16:01:41 UTC
From:
To:
 	Yours is nicer than mine - I just hard-coded the values in my
/etc/defaults/pure-ftpd-common, but basically does the same thing, and it
has worked fine for years.  It would be nice to see this included.