pure-authd(8) | Pure-FTPd | pure-authd(8) |
pure-authd - External authentication agent for Pure-FTPd.
pure-authd [-p </path/to/pidfile>] [-u uid] [-g gid] [-B] <-s /path/to/socket> -r /program/to/run
pure-authd is a daemon that forks an authentication program, waits for an authentication reply, and feed them to an application server.
pure-authd listens to a local Unix socket. A new connection to that socket should feed pure-authd the following structure:
password:xxx
localhost:xxx
localport:xxx
peer:xxx
end
(replace xxx with appropriate values) . localhost, localport and peer are numeric IP addresses and ports. peer is the IP address of the remote client.
These arguments are passed to the authentication program, as environment variables:
AUTHD_PASSWORD
AUTHD_LOCAL_IP
AUTHD_LOCAL_PORT
AUTHD_REMOTE_IP
AUTHD_ENCRYPTED
The authentication program should take appropriate actions to fetch account info according to these arguments, and reply to the standard output a structure like the following one:
uid:42
gid:21
dir:/home/j
end
Only one authentication program is forked at a time. It must return quickly.
To run this program the standard way type:
pure-authd -s /var/run/ftpd.sock -r /usr/bin/my-auth-program &
pure-ftpd -lextauth:/var/run/ftpd.sock &
echo 'auth_ok:1'
echo 'uid:42'
echo 'gid:21'
echo 'dir:/home/j'
echo 'end'
Frank DENIS <j at pureftpd dot org>
ftp(1), pure-ftpd(8) pure-ftpwho(8) pure-mrtginfo(8) pure-uploadscript(8) pure-statsdecode(8) pure-pw(8) pure-quotacheck(8) pure-authd(8) pure-certd(8)
RFC 959, RFC 2389, RFC 2228 and RFC 2428.
1.0.50 | Frank Denis |