full name. Dot notation should be made to work someday also.
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 3.21
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.33
# include <sys/stat.h>
# include "sendmail.h"
# include <sys/stat.h>
# include "sendmail.h"
-static char SccsId[] = "@(#)recipient.c 3.20 %G%";
+static char SccsId[] = "@(#)recipient.c 3.21 %G%";
/*
** SENDTO -- Designate a send list.
/*
** SENDTO -- Designate a send list.
register struct passwd *pw;
extern struct passwd *finduser();
register struct passwd *pw;
extern struct passwd *finduser();
+ /* warning -- finduser may trash buf */
pw = finduser(buf);
if (pw == NULL)
{
pw = finduser(buf);
if (pw == NULL)
{
** NULL if name is unknown or ambiguous.
**
** Side Effects:
** NULL if name is unknown or ambiguous.
**
** Side Effects:
{
extern struct passwd *getpwent();
register struct passwd *pw;
{
extern struct passwd *getpwent();
register struct passwd *pw;
+ register char *p;
+
+ /*
+ ** Make name canonical.
+ */
+
+ for (p = name; *p != '\0'; p++)
+ {
+ if (*p == (SPACESUB & 0177) || *p == '_')
+ *p = ' ';
+ }
setpwent();
while ((pw = getpwent()) != NULL)
{
char buf[MAXNAME];
setpwent();
while ((pw = getpwent()) != NULL)
{
char buf[MAXNAME];
if (strcmp(pw->pw_name, name) == 0)
return (pw);
buildfname(pw->pw_gecos, pw->pw_name, buf);
if (strcmp(pw->pw_name, name) == 0)
return (pw);
buildfname(pw->pw_gecos, pw->pw_name, buf);
- gotaspace = FALSE;
- for (p = buf; (p = index(p, ' ')) != NULL; )
- {
- *p++ = SPACESUB & 0177;
- gotaspace = TRUE;
- }
- if (gotaspace && sameword(buf, name))
+ if (index(buf, ' ') != NULL && sameword(buf, name))
{
if (Verbose)
message(Arpa_Info, "sending to login name %s",
{
if (Verbose)
message(Arpa_Info, "sending to login name %s",
-static char SccsId[] = "@(#)SendMail version 3.32 of %G%";
+static char SccsId[] = "@(#)SendMail version 3.33 of %G%";
-char Version[] = "3.32 [%G%]";
+char Version[] = "3.33 [%G%]";