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

Diff for /src/usr.bin/ssh/Attic/sftp-int.c between version 1.36 and 1.36.2.1

version 1.36, 2001/04/15 08:43:46 version 1.36.2.1, 2001/09/27 19:03:55
Line 80 
Line 80 
 };  };
   
 const struct CMD cmds[] = {  const struct CMD cmds[] = {
           { "bye",        I_QUIT },
         { "cd",         I_CHDIR },          { "cd",         I_CHDIR },
         { "chdir",      I_CHDIR },          { "chdir",      I_CHDIR },
         { "chgrp",      I_CHGRP },          { "chgrp",      I_CHGRP },
Line 113 
Line 114 
         { NULL,                 -1}          { NULL,                 -1}
 };  };
   
 void  static void
 help(void)  help(void)
 {  {
         printf("Available commands:\n");          printf("Available commands:\n");
Line 145 
Line 146 
         printf("?                             Synonym for help\n");          printf("?                             Synonym for help\n");
 }  }
   
 void  static void
 local_do_shell(const char *args)  local_do_shell(const char *args)
 {  {
         int status;          int status;
Line 165 
Line 166 
                 /* XXX: child has pipe fds to ssh subproc open - issue? */                  /* XXX: child has pipe fds to ssh subproc open - issue? */
                 if (args) {                  if (args) {
                         debug3("Executing %s -c \"%s\"", shell, args);                          debug3("Executing %s -c \"%s\"", shell, args);
                         execl(shell, shell, "-c", args, NULL);                          execl(shell, shell, "-c", args, (char *)NULL);
                 } else {                  } else {
                         debug3("Executing %s", shell);                          debug3("Executing %s", shell);
                         execl(shell, shell, NULL);                          execl(shell, shell, (char *)NULL);
                 }                  }
                 fprintf(stderr, "Couldn't execute \"%s\": %s\n", shell,                  fprintf(stderr, "Couldn't execute \"%s\": %s\n", shell,
                     strerror(errno));                      strerror(errno));
Line 182 
Line 183 
                 error("Shell exited with status %d", WEXITSTATUS(status));                  error("Shell exited with status %d", WEXITSTATUS(status));
 }  }
   
 void  static void
 local_do_ls(const char *args)  local_do_ls(const char *args)
 {  {
         if (!args || !*args)          if (!args || !*args)
Line 198 
Line 199 
         }          }
 }  }
   
 char *  static char *
 path_append(char *p1, char *p2)  path_append(char *p1, char *p2)
 {  {
         char *ret;          char *ret;
Line 206 
Line 207 
   
         ret = xmalloc(len);          ret = xmalloc(len);
         strlcpy(ret, p1, len);          strlcpy(ret, p1, len);
         strlcat(ret, "/", len);          if (strcmp(p1, "/") != 0)
                   strlcat(ret, "/", len);
         strlcat(ret, p2, len);          strlcat(ret, p2, len);
   
         return(ret);          return(ret);
 }  }
   
 char *  static char *
 make_absolute(char *p, char *pwd)  make_absolute(char *p, char *pwd)
 {  {
         char *abs;          char *abs;
Line 226 
Line 228 
                 return(p);                  return(p);
 }  }
   
 int  static int
 infer_path(const char *p, char **ifp)  infer_path(const char *p, char **ifp)
 {  {
         char *cp;          char *cp;
Line 246 
Line 248 
         return(0);          return(0);
 }  }
   
 int  static int
 parse_getput_flags(const char **cpp, int *pflag)  parse_getput_flags(const char **cpp, int *pflag)
 {  {
         const char *cp = *cpp;          const char *cp = *cpp;
Line 269 
Line 271 
         return(0);          return(0);
 }  }
   
 int  static int
 get_pathname(const char **cpp, char **path)  get_pathname(const char **cpp, char **path)
 {  {
         const char *cp = *cpp, *end;          const char *cp = *cpp, *end;
Line 317 
Line 319 
         return (-1);          return (-1);
 }  }
   
 int  static int
 is_dir(char *path)  is_dir(char *path)
 {  {
         struct stat sb;          struct stat sb;
Line 329 
Line 331 
         return(sb.st_mode & S_IFDIR);          return(sb.st_mode & S_IFDIR);
 }  }
   
 int  static int
 remote_is_dir(int in, int out, char *path)  remote_is_dir(int in, int out, char *path)
 {  {
         Attrib *a;          Attrib *a;
Line 342 
Line 344 
         return(a->perm & S_IFDIR);          return(a->perm & S_IFDIR);
 }  }
   
 int  static int
 process_get(int in, int out, char *src, char *dst, char *pwd, int pflag)  process_get(int in, int out, char *src, char *dst, char *pwd, int pflag)
 {  {
         char *abs_src = NULL;          char *abs_src = NULL;
Line 419 
Line 421 
         return(err);          return(err);
 }  }
   
 int  static int
 process_put(int in, int out, char *src, char *dst, char *pwd, int pflag)  process_put(int in, int out, char *src, char *dst, char *pwd, int pflag)
 {  {
         char *tmp_dst = NULL;          char *tmp_dst = NULL;
Line 499 
Line 501 
         return(err);          return(err);
 }  }
   
 int  static int
 parse_args(const char **cpp, int *pflag, unsigned long *n_arg,  parse_args(const char **cpp, int *pflag, unsigned long *n_arg,
     char **path1, char **path2)      char **path1, char **path2)
 {  {
Line 644 
Line 646 
         return(cmdnum);          return(cmdnum);
 }  }
   
 int  static int
 parse_dispatch_command(int in, int out, const char *cmd, char **pwd)  parse_dispatch_command(int in, int out, const char *cmd, char **pwd)
 {  {
         char *path1, *path2, *tmp;          char *path1, *path2, *tmp;

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.36.2.1