projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2793dba
)
Support getting the "fullname" out of the Signature profile setting.
author
Ken Hornstein
<kenh@pobox.com>
Wed, 15 Feb 2012 15:48:52 +0000
(10:48 -0500)
committer
Ken Hornstein
<kenh@pobox.com>
Wed, 15 Feb 2012 15:48:52 +0000
(10:48 -0500)
sbr/mts.c
patch
|
blob
|
history
diff --git
a/sbr/mts.c
b/sbr/mts.c
index
3ffdfea
..
868e603
100644
(file)
--- 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
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));
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];
if (strchr(fullname, '.')) { /* quote any .'s */
char tmp[BUFSIZ];
@@
-424,6
+427,8
@@
getuserinfo (void)
strncpy (fullname, tmp, sizeof(fullname));
}
strncpy (fullname, tmp, sizeof(fullname));
}
+ fullname[sizeof(fullname) - 1] = '\0';
+
return;
}
return;
}