[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.15 and 1.16

version 1.15, 2000/05/30 17:23:37 version 1.16, 2000/05/31 06:36:40
Line 248 
Line 248 
                                 packet_send_debug("X11 forwarding disabled in server configuration file.");                                  packet_send_debug("X11 forwarding disabled in server configuration file.");
                                 break;                                  break;
                         }                          }
 #ifdef XAUTH_PATH                          if (!options.xauth_location) {
                                   packet_send_debug("No xauth program; cannot forward with spoofing.");
                                   break;
                           }
                         if (no_x11_forwarding_flag) {                          if (no_x11_forwarding_flag) {
                                 packet_send_debug("X11 forwarding not permitted for this authentication.");                                  packet_send_debug("X11 forwarding not permitted for this authentication.");
                                 break;                                  break;
Line 289 
Line 292 
                         fatal_add_cleanup(xauthfile_cleanup_proc, NULL);                          fatal_add_cleanup(xauthfile_cleanup_proc, NULL);
                         success = 1;                          success = 1;
                         break;                          break;
 #else /* XAUTH_PATH */  
                         packet_send_debug("No xauth program; cannot forward with spoofing.");  
                         break;  
 #endif /* XAUTH_PATH */  
   
                 case SSH_CMSG_AGENT_REQUEST_FORWARDING:                  case SSH_CMSG_AGENT_REQUEST_FORWARDING:
                         if (no_agent_forwarding_flag || compat13) {                          if (no_agent_forwarding_flag || compat13) {
Line 740 
Line 739 
 {  {
         const char *shell, *cp = NULL;          const char *shell, *cp = NULL;
         char buf[256];          char buf[256];
           char cmd[1024];
         FILE *f;          FILE *f;
         unsigned int envsize, i;          unsigned int envsize, i;
         char **env;          char **env;
Line 948 
Line 948 
                                 pclose(f);                                  pclose(f);
                         } else                          } else
                                 fprintf(stderr, "Could not run %s\n", SSH_SYSTEM_RC);                                  fprintf(stderr, "Could not run %s\n", SSH_SYSTEM_RC);
                 }                  } else if (options.xauth_location != NULL) {
 #ifdef XAUTH_PATH  
                 else {  
                         /* Add authority data to .Xauthority if appropriate. */                          /* Add authority data to .Xauthority if appropriate. */
                         if (auth_proto != NULL && auth_data != NULL) {                          if (auth_proto != NULL && auth_data != NULL) {
                                 char *screen = strchr(display, ':');                                  char *screen = strchr(display, ':');
                                 if (debug_flag) {                                  if (debug_flag) {
                                         fprintf(stderr,                                          fprintf(stderr,
                                             "Running %.100s add %.100s %.100s %.100s\n",                                              "Running %.100s add %.100s %.100s %.100s\n",
                                             XAUTH_PATH, display, auth_proto, auth_data);                                              options.xauth_location, display,
                                               auth_proto, auth_data);
                                         if (screen != NULL)                                          if (screen != NULL)
                                                 fprintf(stderr,                                                  fprintf(stderr,
                                                     "Adding %.*s/unix%s %s %s\n",                                                      "Adding %.*s/unix%s %s %s\n",
                                                     screen-display, display,                                                      screen-display, display,
                                                     screen, auth_proto, auth_data);                                                      screen, auth_proto, auth_data);
                                 }                                  }
                                 f = popen(XAUTH_PATH " -q -", "w");                                  snprintf(cmd, sizeof cmd, "%s -q -",
                                       options.xauth_location);
                                   f = popen(cmd, "w");
                                 if (f) {                                  if (f) {
                                         fprintf(f, "add %s %s %s\n", display,                                          fprintf(f, "add %s %s %s\n", display,
                                             auth_proto, auth_data);                                              auth_proto, auth_data);
Line 973 
Line 974 
                                                     screen-display, display,                                                      screen-display, display,
                                                     screen, auth_proto, auth_data);                                                      screen, auth_proto, auth_data);
                                         pclose(f);                                          pclose(f);
                                 } else                                  } else {
                                         fprintf(stderr, "Could not run %s -q -\n",                                          fprintf(stderr, "Could not run %s\n",
                                             XAUTH_PATH);                                              cmd);
                                   }
                         }                          }
                 }                  }
 #endif /* XAUTH_PATH */  
   
                 /* Get the last component of the shell name. */                  /* Get the last component of the shell name. */
                 cp = strrchr(shell, '/');                  cp = strrchr(shell, '/');
                 if (cp)                  if (cp)

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16