several small bugs: don't die if no environment, don't look in
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 8 Dec 1985 00:17:56 +0000 (16:17 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 8 Dec 1985 00:17:56 +0000 (16:17 -0800)
ESM_DEADLETTER state in savemail; lowercase before getpwnam to
allow upper case regular names in alias file

SCCS-vsn: usr.sbin/sendmail/src/main.c 5.10
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 5.7
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 5.5
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 5.7
SCCS-vsn: usr.sbin/sendmail/src/version.c 5.35

usr/src/usr.sbin/sendmail/src/main.c
usr/src/usr.sbin/sendmail/src/readcf.c
usr/src/usr.sbin/sendmail/src/recipient.c
usr/src/usr.sbin/sendmail/src/savemail.c
usr/src/usr.sbin/sendmail/src/version.c

index fce91a8..ffb011d 100644 (file)
@@ -15,7 +15,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char    SccsId[] = "@(#)main.c  5.9.1.1 (Berkeley) %G%";
+static char    SccsId[] = "@(#)main.c  5.10 (Berkeley) %G%";
 #endif not lint
 
 # define  _DEFINE
 #endif not lint
 
 # define  _DEFINE
@@ -196,7 +196,10 @@ main(argc, argv, envp)
        */
 
        Argv = argv;
        */
 
        Argv = argv;
-       LastArgv = envp[i - 1] + strlen(envp[i - 1]);
+       if (i > 0)
+               LastArgv = envp[i - 1] + strlen(envp[i - 1]);
+       else
+               LastArgv = argv[argc - 1] + strlen(argv[argc - 1]);
 # endif SETPROCTITLE
 
        /*
 # endif SETPROCTITLE
 
        /*
index 847f12a..9a8f396 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)readcf.c        5.6 (Berkeley) %G%";
+static char    SccsId[] = "@(#)readcf.c        5.7 (Berkeley) %G%";
 #endif not lint
 
 # include "sendmail.h"
 #endif not lint
 
 # include "sendmail.h"
index b5a6d1e..f8c832b 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)recipient.c     5.4 (Berkeley) %G%";
+static char    SccsId[] = "@(#)recipient.c     5.5 (Berkeley) %G%";
 #endif not lint
 
 # include <pwd.h>
 #endif not lint
 
 # include <pwd.h>
@@ -434,6 +434,8 @@ finduser(name)
        {
                if (*p == (SpaceSub & 0177) || *p == '_')
                        *p = ' ';
        {
                if (*p == (SpaceSub & 0177) || *p == '_')
                        *p = ' ';
+               else if (ischar(*p) && isupper(*p))
+                       *p = tolower(*p);
        }
 
        /* look up this login name */
        }
 
        /* look up this login name */
index caa4554..c880f63 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)savemail.c      5.6 (Berkeley) %G%";
+static char    SccsId[] = "@(#)savemail.c      5.7 (Berkeley) %G%";
 #endif not lint
 
 # include <pwd.h>
 #endif not lint
 
 # include <pwd.h>
@@ -287,6 +287,11 @@ savemail(e)
                                else
                                        state = ESM_MAIL;
                        }
                                else
                                        state = ESM_MAIL;
                        }
+                       else
+                       {
+                               /* no data file -- try mailing back */
+                               state = ESM_MAIL;
+                       }
                        break;
 
                  case ESM_USRTMP:
                        break;
 
                  case ESM_USRTMP:
index 81d3d1d..e6de19f 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)version.c       5.34 (Berkeley) %G%";
+static char    SccsId[] = "@(#)version.c       5.35 (Berkeley) %G%";
 #endif not lint
 
 #endif not lint
 
-char   Version[] = "5.34";
+char   Version[] = "5.35";