missed an absolute pathname!
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 22 Jul 1990 00:27:20 +0000 (16:27 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 22 Jul 1990 00:27:20 +0000 (16:27 -0800)
SCCS-vsn: usr.bin/from/from.c 5.6

usr/src/usr.bin/from/from.c

index ac9eddd..cec234a 100644 (file)
@@ -12,13 +12,14 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)from.c     5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)from.c     5.6 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #include <ctype.h>
 #include <pwd.h>
 #include <stdio.h>
 #endif /* not lint */
 
 #include <sys/types.h>
 #include <ctype.h>
 #include <pwd.h>
 #include <stdio.h>
+#include <paths.h>
 
 main(argc, argv)
        int argc;
 
 main(argc, argv)
        int argc;
@@ -63,7 +64,7 @@ main(argc, argv)
                        }
                        file = pwd->pw_name;
                }
                        }
                        file = pwd->pw_name;
                }
-               (void)sprintf(buf, "/usr/spool/mail/%s", file);
+               (void)sprintf(buf, "%s/%s", _PATH_MAILDIR, file);
                file = buf;
        }
        if (!freopen(file, "r", stdin)) {
                file = buf;
        }
        if (!freopen(file, "r", stdin)) {