X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fmts.c;h=b52740df5608ca25aa02e9a32551f9806a192fc3;hp=7c70e46b42815b561160aa744a077f7422d019b7;hb=88b2142594d5ea1e8385dae5eca81eed1018c555;hpb=b6fbaae87d9cf00b74d94050c10ba3e700545178 diff --git a/sbr/mts.c b/sbr/mts.c index 7c70e46..b52740d 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -7,15 +7,13 @@ */ #include /* for snprintf() */ -#include #include #include #include #include +#include #include - -#define NOTOK (-1) -#define OK 0 +#include /* ** static prototypes @@ -112,29 +110,7 @@ getuserinfo(void) ** information in the GECOS field, like phone number. */ for (cp = tmp; *np != '\0' && *np != ',';) { -#ifndef BSD42 *cp++ = *np++; -#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. - */ - if (*np == '&') { /* blech! */ - strcpy(cp, pw->pw_name); - *cp = toupper(*cp); - while (*cp) - cp++; - np++; - } else { - *cp++ = *np++; - } -#endif /* BSD42 */ } *cp = '\0'; strncpy(username, pw->pw_name, sizeof(username));