[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.73 and 1.74

version 1.73, 2001/04/16 08:19:31 version 1.74, 2001/04/17 19:34:25
Line 105 
Line 105 
 extern int log_stderr;  extern int log_stderr;
 extern int debug_flag;  extern int debug_flag;
 extern u_int utmp_len;  extern u_int utmp_len;
   
 extern int startup_pipe;  extern int startup_pipe;
   extern void destroy_sensitive_data(void);
   
 /* Local Xauthority file. */  /* Local Xauthority file. */
 static char *xauthfile;  static char *xauthfile;
Line 139 
Line 139 
                 error("unable to get login class");                  error("unable to get login class");
                 return;                  return;
         }          }
   #ifdef BSD_AUTH
           if (auth_approval(NULL, lc, authctxt->pw->pw_name, "ssh") <= 0) {
                   packet_disconnect("Approval failure for %s",
                       authctxt->pw->pw_name);
           }
 #endif  #endif
   #endif
         /* setup the channel layer */          /* setup the channel layer */
         if (!no_port_forwarding_flag && options.allow_tcp_forwarding)          if (!no_port_forwarding_flag && options.allow_tcp_forwarding)
                 channel_permit_all_opens();                  channel_permit_all_opens();
Line 825 
Line 831 
         char *argv[10];          char *argv[10];
         int do_xauth = s->auth_proto != NULL && s->auth_data != NULL;          int do_xauth = s->auth_proto != NULL && s->auth_data != NULL;
   
           /* remove hostkey from the child's memory */
           destroy_sensitive_data();
   
         /* login(1) is only called if we execute the login shell */          /* login(1) is only called if we execute the login shell */
         if (options.use_login && command != NULL)          if (options.use_login && command != NULL)
                 options.use_login = 0;                  options.use_login = 0;
Line 857 
Line 866 
                                 perror("unable to set user context");                                  perror("unable to set user context");
                                 exit(1);                                  exit(1);
                         }                          }
 #ifdef BSD_AUTH  
                         if (auth_approval(NULL, lc, pw->pw_name, "ssh") <= 0) {  
                                 error("approval failure for %s", pw->pw_name);  
                                 fprintf(stderr, "Approval failure");  
                                 exit(1);  
                         }  
 #endif  
 #else  #else
                         if (setlogin(pw->pw_name) < 0)                          if (setlogin(pw->pw_name) < 0)
                                 error("setlogin failed: %s", strerror(errno));                                  error("setlogin failed: %s", strerror(errno));
Line 1049 
Line 1051 
          * in this order).           * in this order).
          */           */
         if (!options.use_login) {          if (!options.use_login) {
                 if (stat(_PATH_SSH_USER_RC, &st) >= 0) {                  /* ignore _PATH_SSH_USER_RC for subsystems */
                   if (!s->is_subsystem && (stat(_PATH_SSH_USER_RC, &st) >= 0)) {
                         if (debug_flag)                          if (debug_flag)
                                 fprintf(stderr, "Running %s %s\n", _PATH_BSHELL,                                  fprintf(stderr, "Running %s %s\n", _PATH_BSHELL,
                                     _PATH_SSH_USER_RC);                                      _PATH_SSH_USER_RC);

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.74