avoid putting in a full name in network forward operations
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 10 Dec 1982 03:15:37 +0000 (19:15 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 10 Dec 1982 03:15:37 +0000 (19:15 -0800)
SCCS-mr: usr.sbin/sendmail/src/envelope.c 103
SCCS-vsn: usr.sbin/sendmail/src/envelope.c 3.2

usr/src/usr.sbin/sendmail/src/envelope.c

index b584bc7..ea9d3d3 100644 (file)
@@ -3,7 +3,7 @@
 #include "sendmail.h"
 #include <sys/stat.h>
 
 #include "sendmail.h"
 #include <sys/stat.h>
 
-SCCSID(@(#)envelope.c  3.1             %G%);
+SCCSID(@(#)envelope.c  3.2             %G%);
 
 /*
 **  NEWENVELOPE -- allocate a new envelope
 
 /*
 **  NEWENVELOPE -- allocate a new envelope
@@ -582,7 +582,8 @@ setsender(from)
                        FullName = NULL;
 
                /* extract full name from passwd file */
                        FullName = NULL;
 
                /* extract full name from passwd file */
-               if (FullName == NULL && pw->pw_gecos != NULL)
+               if (FullName == NULL && pw->pw_gecos != NULL &&
+                   strcmp(pw->pw_name, CurEnv->e_from.q_user) == 0)
                {
                        buildfname(pw->pw_gecos, CurEnv->e_from.q_user, buf);
                        if (buf[0] != '\0')
                {
                        buildfname(pw->pw_gecos, CurEnv->e_from.q_user, buf);
                        if (buf[0] != '\0')