summaryrefslogblamecommitdiff
path: root/security/ssh/files/patch-af
blob: 17d22fcf75408f5d3c1ceb4222ed3c9f85678b58 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

                                        
               
                  






                                                    
                  







                                                                                           
                  







                                                        


                                                                   








                                                                             

                                                                   
               




                                                                     











                                                                            



                                      
                                                   






                                                               
                                                                            


                                                               
               



                                              
                                                   






                                                          
                                                                                                            


                                                          
               




                                                                              
                    
                       
       
                                           
        


                                                                 
*** sshd.c.orig	Wed May 12 20:19:29 1999
--- sshd.c	Sun Jun  6 02:37:18 1999
***************
*** 2222,2228 ****
    pwcopy.pw_class = xstrdup(pw->pw_class);
    pwcopy.pw_change = pw->pw_change;
    pwcopy.pw_expire = pw->pw_expire;
! #endif /*  __bsdi__  && _BSDI_VERSION >= 199510 */
    pwcopy.pw_dir = xstrdup(pw->pw_dir);
    pwcopy.pw_shell = xstrdup(pw->pw_shell);
    pw = &pwcopy;
--- 2222,2228 ----
    pwcopy.pw_class = xstrdup(pw->pw_class);
    pwcopy.pw_change = pw->pw_change;
    pwcopy.pw_expire = pw->pw_expire;
! #endif /*  (__bsdi__  && _BSDI_VERSION >= 199510) || (__FreeBSD__ && HAVE_LOGIN_CAP_H) */
    pwcopy.pw_dir = xstrdup(pw->pw_dir);
    pwcopy.pw_shell = xstrdup(pw->pw_shell);
    pw = &pwcopy;
***************
*** 3285,3294 ****
    struct pty_cleanup_context cleanup_context;
  #if defined (__FreeBSD__) && defined(HAVE_LOGIN_CAP_H)
    login_cap_t *lc;
  #endif
! #if defined (__bsdi__) && _BSDI_VERSION >= 199510 
    struct timeval tp;
! #endif /*  __bsdi__ && _BSDI_VERSION >= 199510 */
  
    /* We no longer need the child running on user's privileges. */
    userfile_uninit();
--- 3285,3295 ----
    struct pty_cleanup_context cleanup_context;
  #if defined (__FreeBSD__) && defined(HAVE_LOGIN_CAP_H)
    login_cap_t *lc;
+   time_t warnpassword, warnexpire;
  #endif
! #if defined(__FreeBSD__) || (defined (__bsdi__) && _BSDI_VERSION >= 199510)
    struct timeval tp;
! #endif /*  __FreeBSD__ || (__bsdi__ && _BSDI_VERSION >= 199510) */
  
    /* We no longer need the child running on user's privileges. */
    userfile_uninit();
***************
*** 3446,3451 ****
--- 3447,3460 ----
                     "The Regents of the University of California. ",
                     "All rights reserved.");
          }
+ #ifdef HAVE_LOGIN_CAP_H
+ #define DEFAULT_WARN	(2L * 7L * 86400L)	/* Two weeks */
+ 
+ 	warnpassword = login_getcaptime(lc, "warnpassword",
+ 	    DEFAULT_WARN, DEFAULT_WARN);
+ 	warnexpire = login_getcaptime(lc, "warnexpire",
+ 	    DEFAULT_WARN, DEFAULT_WARN);
+ #endif
  #endif
  
        /* Print /etc/motd unless a command was specified or printing it was
***************
*** 3469,3475 ****
                  fputs(line, stdout);
                fclose(f);
              }
! #if defined (__bsdi__) && _BSDI_VERSION >= 199510
            if (pw->pw_change || pw->pw_expire)
              (void)gettimeofday(&tp, (struct timezone *)NULL);
            if (pw->pw_change)
--- 3478,3484 ----
                  fputs(line, stdout);
                fclose(f);
              }
! #if defined(__FreeBSD__) || (defined(__bsdi__) && _BSDI_VERSION >= 199510)
            if (pw->pw_change || pw->pw_expire)
              (void)gettimeofday(&tp, (struct timezone *)NULL);
            if (pw->pw_change)
***************
*** 3922,3928 ****
            while (fgets(buf, sizeof(buf), f))
              fputs(buf, stderr);
            fclose(f);
! #if defined (__bsdi__) && _BSDI_VERSION >= 199510
            if (pw->pw_uid != UID_ROOT &&
                !login_getcapbool(lc, "ignorenologin", 0))
              exit(254);
--- 3931,3937 ----
            while (fgets(buf, sizeof(buf), f))
              fputs(buf, stderr);
            fclose(f);
! #if (defined(__FreeBSD__) && defined(HAVE_LOGIN_CAP_H)) || (defined (__bsdi__) && _BSDI_VERSION >= 199510)
            if (pw->pw_uid != UID_ROOT &&
                !login_getcapbool(lc, "ignorenologin", 0))
              exit(254);
***************
*** 4525,4531 ****
--- 4534,4544 ----
                    struct stat mailbuf;
                    
                    if (stat(mailbox, &mailbuf) == -1 || mailbuf.st_size == 0)
+ #ifdef __FreeBSD__
+                     ;
+ #else
                      printf("No mail.\n");
+ #endif
                    else if (mailbuf.st_atime > mailbuf.st_mtime)
                      printf("You have mail.\n");
                    else