X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=zotnet%2Fmts%2Fmts.c;h=26e480779f286b1102734921dbad35325d6a695d;hp=254a758e6e90862bf1982b8017df7563a236c941;hb=84b98d0484fe61d4ebe205016e35a06da194f525;hpb=ba22f50e4261b7a2a07cd5baf6b035425c45df28 diff --git a/zotnet/mts/mts.c b/zotnet/mts/mts.c index 254a758..26e4807 100644 --- a/zotnet/mts/mts.c +++ b/zotnet/mts/mts.c @@ -415,12 +415,16 @@ getuserinfo (void) * "Dan Harkless ". Naturally, you'll want your MTA to have * an alias (e.g. in /etc/aliases) from "fakeusername" to your account name. */ -#ifndef GCOS_HACK - /* What is this code here for? As of 2000-01-25, GCOS_HACK doesn't appear - anywhere else in nmh. -- Dan Harkless */ +#ifndef BSD42 for (cp = fullname; *np && *np != (MMailids ? '<' : ','); *cp++ = *np++) continue; -#else +#else /* BSD42 */ + /* On BSD(-derived) systems, the system utilities that deal with the GECOS + field (finger, mail, sendmail, etc.) translate any '&' character in it to + the login name, with the first letter capitalized. So, for instance, + fingering a user "bob" with the GECOS field "& Jones" would reveal him to + be "In real life: Bob Jones". Surprisingly, though, the OS doesn't do + the translation for you, so we have to do it manually here. */ for (cp = fullname; *np && *np != (MMailids ? '<' : ','); ) { if (*np == '&') { /* blech! */ strcpy (cp, pw->pw_name); @@ -432,7 +436,7 @@ getuserinfo (void) *cp++ = *np++; } } -#endif +#endif /* BSD42 */ *cp = '\0'; if (MMailids) {