[6808] in Athena Bugs

home help back first fref pref prev next nref lref last post

showmount -e doesn't always seperate the directory name and export list

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Sun Jan 6 21:53:49 1991

Date: Sun, 6 Jan 91 21:53:37 -0500
From: Mark W. Eichin <eichin@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU

portnoy% /usr/etc/showmount -e atmos.washington.edu
export list for atmos.washington.edu:
/tmp_mnt/disk0      nfsclients
/usr                nfsclients
/export/exec/kvm/sun4c.sunos.4.1.1
                    sunhosts
/export/root/rainbowrainbow
/export/swap/rainbowrainbow
/export/root/cargsun1
                    cargsun1

/source/bsd-4.3/common/usr.etc/showmount/showmount.c, line 152:
		fprintf(stdout, "%-20s", ex->ex_name);
		if (strlen(ex->ex_name) > 20) {
			fprintf(stdout, "\n                    ");
		}
line 158:
			fprintf(stdout, "everyone");
line 161:
			fprintf(stdout, "%s ", gr->g_name);

Suggested fixes:
1) line 153 should be (> becomes >=):
		if (strlen(ex->ex_name) >= 20) {
2) line 158 and 161 should be (prepend space to the string
			fprintf(stdout, " everyone");
			fprintf(stdout, " %s ", gr->g_name);
3) line 152 should be (-20 becomes -21)
		fprintf(stdout, "%-21s", ex->ex_name);

You get the idea.
						_Mark_

home help back first fref pref prev next nref lref last post