--- ./Makefile Tue Feb 16 18:12:51 1993 +++ ../pcnfsd.93.02.16-cert/./Makefile Tue Mar 12 18:03:18 2002 @@ -22,7 +22,7 @@ HDRS= pcnfsd.h common.h no_type: - @echo "Usage: make {sunos | sunos.403c | svr4 | bsd | ultrix.4x}" + @echo "Usage: make {sunos | sunos.403c | svr4 | bsd | ultrix.4x | irix5}" sunos: $(SVR_SRCS) $(TST_SRCS) $(HDRS) Makefile.sunos @-mkdir sunos @@ -44,9 +44,13 @@ @-mkdir ultrix.4x make -f Makefile.ultrix.4x +irix5: $(SVR_SRCS) $(TST_SRCS) $(HDRS) Makefile.irix5 + @-mkdir -p irix5 + $(MAKE) -f Makefile.irix5 + clean: - rm -rf sunos sunos.403c svr4 bsd ultrix.4x + rm -rf sunos sunos.403c svr4 bsd ultrix.4x irix5 clean_sunos: rm -rf sunos @@ -62,3 +66,6 @@ clean_ultrix.4x: rm -rf ultrix.4x + +clean_irix5: + rm -rf irix5 --- ./pcnfsd_cache.c Mon Feb 8 19:14:25 1993 +++ ../pcnfsd.93.02.16-cert/./pcnfsd_cache.c Tue Mar 12 16:34:59 2002 @@ -66,6 +66,7 @@ for (i = 0; i < CACHE_SIZE; i++) { if (!strcmp(User_cache[i].cuname, name)) { +#ifdef NOTDEF c1 = strlen(pw); c2 = strlen(User_cache[i].cpw); if ((!c1 && !c2) || @@ -77,6 +78,31 @@ } User_cache[i].cuname[0] = '\0'; /* nuke entry */ return (0); +#else + /* This is the code as fixed by lrm, so it behaves just like + v2_auth_results(). This fixes a bug that occurs in the following circumstances: + + 1) someone successfully authenticates a user with a blank + password. + 2) Someone else tries to authenticate the same user, but using a + non-blank password. + + The second authentication will (incorrectly) succeed. This is because + crypt("foo", "") returns "" (look at the above code and this + will make more sense). + */ + c1 = strlen(pw); + c2 = strlen(User_cache[i].cpw); + if ((c1 && !c2) || (c2 && !c1) || + strcmp(User_cache[i].cpw, crypt(pw, User_cache[i].cpw))) { + User_cache[i].cuname[0] = '\0'; /* nuke entry */ + return (0); + } else { + *p_uid = User_cache[i].cuid; + *p_gid = User_cache[i].cgid; + return (1); + } +#endif } } return (0); --- ./common.h Fri Jan 29 17:51:15 1993 +++ ../pcnfsd.93.02.16-cert/./common.h Tue Mar 12 17:53:20 2002 @@ -236,6 +236,20 @@ **===================================================================== */ +#ifdef OSVER_IRIX5 +#define SVR4 /* Build for SVR4-style system */ +#define SVR4_STYLE_PRINT /* /usr/bin/lp -c -d%s %s */ +#define SVR4_STYLE_PR_LIST /* /usr/bin/lpstat -v */ +#define SVR4_STYLE_QUEUE /* /usr/bin/lpstat -p lp */ +#define SVR4_STYLE_CANCEL /* cancel lp-xx */ +#define SVR4_STYLE_STATUS /* /usr/bin/lpstat -a lp -p lp */ +#define SVR4_STYLE_MONITOR /* /etc/printcap */ +#define SHADOW_SUPPORT /* Enable use of shadow password file */ +#define USER_CACHE /* Cache recent user names */ +#define WTMP /* Update /var/adm/wtmp database */ +#define USE_YP /* Consult the NIS "auto.home" map */ +#endif /* OSVER_IRIX5 */ + #ifdef OSVER_SOLARIS2X #define SVR4_STYLE_PRINT #define SVR4_STYLE_PR_LIST --- ./pcnfsd_misc.c Fri Apr 26 07:34:28 1996 +++ ../pcnfsd.93.02.16-cert/./pcnfsd_misc.c Tue Mar 12 16:54:19 2002 @@ -55,7 +55,7 @@ #define zchar 0x5b #define NOBODY (uid_t)(-2) -char tempstr[256]; +static char tempstr[256]; extern char sp_name[1024]; /* in pcnfsd_print.c */ #define NUMUIDS 64 @@ -711,7 +711,7 @@ char *arg1; char *arg2; - if((fd = fopen("/var/pcnfsd/pcnfsd.conf", "r")) == NULL) + if((fd = fopen("/etc/pcnfsd.conf", "r")) == NULL) return; while(fgets(buff, 1024, fd)) { cp = strchr(buff, '\n'); --- ./pcnfsd_print.c Fri Apr 26 07:36:16 1996 +++ ../pcnfsd.93.02.16-cert/./pcnfsd_print.c Tue Mar 12 16:55:58 2002 @@ -96,7 +96,7 @@ char pathname[MAXPATHLEN]; char new_pathname[MAXPATHLEN]; char sp_name[MAXPATHLEN] = SPOOLDIR; -char tempstr[256]; +static char tempstr[256]; char delims[] = " \t\r\n:()"; pr_list printers = NULL;