> I need a wuarchive ftpd with the ability to get an AFS-token, and I
> need it really urgently....
>
> I have the source for the ftpd from transarc, but it's Berkeley 5.27
> and my wu-ftpd uses Berkeley 5.40. Not chanve to get it via diff
> or something similar....
>
> If anyone can tell me what to add to the ftpd.c to get it running
> under AFS 3.3 and AIX 3.2.5 ?
I have wu-ftpd running under HP-UX 9.01 with little difficulty.
The Makefile includes, among changes, these bits:
IFLAGS = -I.. -I../support -I/usr/afsws/include
LIBES = -lsupport -lc -L/usr/afsws/lib/afs -L/usr/afsws/lib \
-lkauth -lubik -lprot -lauth -lsys -lrxkad -lrx -llwp -lcom_err \
-lafsint /usr/afsws/lib/afs/util.a -ldes -lPW
Then I created a file afsext.c, which is compiled separately; it contains,
in addition to some small HP-specific code, this:
#include <string.h>
#include <limits.h>
#include <stdlib.h>
#include <signal.h>
#define _ANSI_C_SOURCE
#include <afs/kautils.h>
int afs_authenticate(char *name, char *passwd, char *salt, char *encrpa)
{
char *reason;
if (!ka_UserAuthenticate(name, /*inst*/"", /*realm*/0,
passwd, /*sepag*/1, &reason)) return 0;
reason = crypt(passwd, salt);
return strcmp(reason, encrpa);
}
Finally, in ftpd.c I have
/* The strcmp does not catch null passwords! */
if (pw == NULL || *pw->pw_passwd == '\0' ||
afs_authenticate(pw->pw_name, passwd, salt, pw->pw_passwd)) {
/* strcmp(xpasswd, pw->pw_passwd)) { */
#endif
reply(530, "Login incorrect.");
The rest is just window dressing or local taste. One thing that
my w-ftpd does not do is to allow 'private' directories in my
anonymous ftp tree; it looks as if, in order to do this correctly,
I would need to rewrite the 'ls' command as well as the internal
opendir passages. Some sites appear to have private facilities
encoded into their ftpd, but I don't know if such things are
available under AFS.
-- Owen
[EMAIL PROTECTED]