[BACK]Return to session.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/session.c between version 1.99 and 1.100

version 1.99, 2001/07/09 07:04:53 version 1.100, 2001/08/16 19:18:34
Line 1087 
Line 1087 
                 if (!options.use_login) {                  if (!options.use_login) {
                         char buf[256];                          char buf[256];
   
                         /*  
                          * Check for mail if we have a tty and it was enabled  
                          * in server options.  
                          */  
                         if (s->ttyfd != -1 && options.check_mail) {  
                                 char *mailbox;  
                                 struct stat mailstat;  
   
                                 mailbox = getenv("MAIL");  
                                 if (mailbox != NULL) {  
                                         if (stat(mailbox, &mailstat) != 0 ||  
                                             mailstat.st_size == 0)  
                                                 printf("No mail.\n");  
                                         else if (mailstat.st_mtime < mailstat.st_atime)  
                                                 printf("You have mail.\n");  
                                         else  
                                                 printf("You have new mail.\n");  
                                 }  
                         }  
                         /* Start the shell.  Set initial character to '-'. */                          /* Start the shell.  Set initial character to '-'. */
                         buf[0] = '-';                          buf[0] = '-';
                         strncpy(buf + 1, cp, sizeof(buf) - 1);                          strncpy(buf + 1, cp, sizeof(buf) - 1);

Legend:
Removed from v.1.99  
changed lines
  Added in v.1.100