X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fmts.c;h=868e603c5a506170cf275963dba9cfca62e28c42;hb=681fb6f84e8094c2c857d4341d3e2fb97d377908;hp=3ffdfead5d785a467cd9977022ca036e93d8240d;hpb=2793dbafc546ab90800df3591cb63f4747e3374d;p=mmh diff --git a/sbr/mts.c b/sbr/mts.c index 3ffdfea..868e603 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -412,9 +412,12 @@ getuserinfo (void) strncpy (username, pw->pw_name, sizeof(username)); /* The $SIGNATURE environment variable overrides the GECOS field's idea of - your real name. */ + your real name. If SIGNATURE isn't set, use the Signature profile + setting if it exists. */ if ((cp = getenv ("SIGNATURE")) && *cp) strncpy (fullname, cp, sizeof(fullname)); + else if ((cp = context_find("Signature"))) + strncpy (fullname, cp, sizeof(fullname)); if (strchr(fullname, '.')) { /* quote any .'s */ char tmp[BUFSIZ]; @@ -424,6 +427,8 @@ getuserinfo (void) strncpy (fullname, tmp, sizeof(fullname)); } + fullname[sizeof(fullname) - 1] = '\0'; + return; }