diff -rc /home/staff/lindsey/scratch/procmail-3.11pre7/config.h ./config.h *** /home/staff/lindsey/scratch/procmail-3.11pre7/config.h Sun Apr 27 19:27:41 1997 --- ./config.h Mon Feb 2 13:01:14 1998 *************** *** 32,37 **** --- 32,47 ---- */ #define PRESTENV {"IFS","ENV","PWD",DEFPATH,0} + * Christopher Lindsey, 02feb98 + * + * Define an alternative home directory. Since home directories are in + * AFS, we can't access them properly. This setting allows for an + * alternative home directory on an NFS or local filesystem. + */ + #define HOMEPREFIX "/var/forward/" + /************************************************************************ * Only edit below this line if you have viewed/edited this file before * ************************************************************************/ diff -rc /home/staff/lindsey/scratch/procmail-3.11pre7/src/authenticate.c ./src/authenticate.c *** /home/staff/lindsey/scratch/procmail-3.11pre7/src/authenticate.c Sun Apr 27 19:27:45 1997 --- ./src/authenticate.c Tue Feb 3 08:50:28 1998 *************** *** 51,56 **** --- 51,67 ---- int sock; }; + #ifdef HOMEPREFIX + struct passwd*convertedpw(pass)struct passwd *pass; + { + char *tmppw = (char *) malloc ((sizeof (char)) * ((strlen (pass->pw_name)) + + (strlen (HOMEPREFIX)) + 1)); + strcpy (tmppw, HOMEPREFIX); strcat (tmppw, pass->pw_name); + pass->pw_dir=tmppw; + return pass; + } + #endif + static auth_identity authi; /* reuse copy, only one active */ static void castlower(str)register char*str; /* and I'll take the low road */ *************** *** 61,71 **** static const struct passwd*cgetpwnam(user,sock)const char*const user; const int sock; ! { return getpwnam(user); /* this should be selfexplanatory :-) */ } static const struct passwd*cgetpwuid(uid,sock)const uid_t uid;const int sock; ! { return getpwuid(uid); /* no comment */ } /*const*/auth_identity*auth_finduser(user,sock)char*const user;const int sock; --- 72,92 ---- static const struct passwd*cgetpwnam(user,sock)const char*const user; const int sock; ! { ! #ifdef HOMEPREFIX ! return convertedpw(getpwnam(user)); ! #else ! return getpwnam(user); /* this should be selfexplanatory :-) */ ! #endif } static const struct passwd*cgetpwuid(uid,sock)const uid_t uid;const int sock; ! { ! #ifdef HOMEPREFIX ! return convertedpw(getpwuid(uid)); ! #else ! return getpwuid(uid); /* no comment */ ! #endif } /*const*/auth_identity*auth_finduser(user,sock)char*const user;const int sock; diff -rc /home/staff/lindsey/scratch/procmail-3.11pre7/src/procmail.c ./src/procmail.c *** /home/staff/lindsey/scratch/procmail-3.11pre7/src/procmail.c Sun Apr 27 19:27:48 1997 --- ./src/procmail.c Tue Feb 3 08:58:55 1998 *************** *** 114,119 **** --- 114,125 ---- elog("\nYour system mailbox:\t"); elog(auth_mailboxname(auth_finduid(getuid(),0))); elog(newline); + #ifdef HOMEPREFIX + elog("\nNOTE: Your default setting for $HOME has been changed to be\n "); + elog(HOMEPREFIX); + elog(auth_username(auth_finduid(getuid(),0))); + elog(" in our environment.\n"); + #endif return EXIT_SUCCESS; case HELPOPT1:case HELPOPT2:elog(pmusage);elog(PM_HELP); elog(PM_QREFERENCE);