summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/session.c b/session.c
index e01680423..1e9e32284 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.99 2001/07/09 07:04:53 deraadt Exp $"); 36RCSID("$OpenBSD: session.c,v 1.100 2001/08/16 19:18:34 jakob Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -1459,25 +1459,6 @@ do_child(Session *s, const char *command)
1459 if (!options.use_login) { 1459 if (!options.use_login) {
1460 char buf[256]; 1460 char buf[256];
1461 1461
1462 /*
1463 * Check for mail if we have a tty and it was enabled
1464 * in server options.
1465 */
1466 if (s->ttyfd != -1 && options.check_mail) {
1467 char *mailbox;
1468 struct stat mailstat;
1469
1470 mailbox = getenv("MAIL");
1471 if (mailbox != NULL) {
1472 if (stat(mailbox, &mailstat) != 0 ||
1473 mailstat.st_size == 0)
1474 printf("No mail.\n");
1475 else if (mailstat.st_mtime < mailstat.st_atime)
1476 printf("You have mail.\n");
1477 else
1478 printf("You have new mail.\n");
1479 }
1480 }
1481 /* Start the shell. Set initial character to '-'. */ 1462 /* Start the shell. Set initial character to '-'. */
1482 buf[0] = '-'; 1463 buf[0] = '-';
1483 strncpy(buf + 1, cp, sizeof(buf) - 1); 1464 strncpy(buf + 1, cp, sizeof(buf) - 1);