[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.40 and 1.41

version 1.40, 2001/08/14 09:23:02 version 1.41, 2001/12/19 07:18:56
Line 207 
Line 207 
   
         ret = xmalloc(len);          ret = xmalloc(len);
         strlcpy(ret, p1, len);          strlcpy(ret, p1, len);
         if (strcmp(p1, "/") != 0)          if (strcmp(p1, "/") != 0)
                 strlcat(ret, "/", len);                  strlcat(ret, "/", len);
         strlcat(ret, p2, len);          strlcat(ret, p2, len);
   
Line 395 
Line 395 
                 goto out;                  goto out;
         }          }
   
         for(i = 0; g.gl_pathv[i]; i++) {          for (i = 0; g.gl_pathv[i]; i++) {
                 if (infer_path(g.gl_pathv[i], &tmp)) {                  if (infer_path(g.gl_pathv[i], &tmp)) {
                         err = -1;                          err = -1;
                         goto out;                          goto out;
Line 477 
Line 477 
                 goto out;                  goto out;
         }          }
   
         for(i = 0; g.gl_pathv[i]; i++) {          for (i = 0; g.gl_pathv[i]; i++) {
                 if (infer_path(g.gl_pathv[i], &tmp)) {                  if (infer_path(g.gl_pathv[i], &tmp)) {
                         err = -1;                          err = -1;
                         goto out;                          goto out;
Line 519 
Line 519 
                 return(-1);                  return(-1);
   
         /* Figure out which command we have */          /* Figure out which command we have */
         for(i = 0; cmds[i].c; i++) {          for (i = 0; cmds[i].c; i++) {
                 int cmdlen = strlen(cmds[i].c);                  int cmdlen = strlen(cmds[i].c);
   
                 /* Check for command followed by whitespace */                  /* Check for command followed by whitespace */
Line 690 
Line 690 
         case I_RM:          case I_RM:
                 path1 = make_absolute(path1, *pwd);                  path1 = make_absolute(path1, *pwd);
                 remote_glob(in, out, path1, GLOB_NOCHECK, NULL, &g);                  remote_glob(in, out, path1, GLOB_NOCHECK, NULL, &g);
                 for(i = 0; g.gl_pathv[i]; i++) {                  for (i = 0; g.gl_pathv[i]; i++) {
                         printf("Removing %s\n", g.gl_pathv[i]);                          printf("Removing %s\n", g.gl_pathv[i]);
                         if (do_rm(in, out, g.gl_pathv[i]) == -1)                          if (do_rm(in, out, g.gl_pathv[i]) == -1)
                                 err = -1;                                  err = -1;
Line 783 
Line 783 
                 a.flags |= SSH2_FILEXFER_ATTR_PERMISSIONS;                  a.flags |= SSH2_FILEXFER_ATTR_PERMISSIONS;
                 a.perm = n_arg;                  a.perm = n_arg;
                 remote_glob(in, out, path1, GLOB_NOCHECK, NULL, &g);                  remote_glob(in, out, path1, GLOB_NOCHECK, NULL, &g);
                 for(i = 0; g.gl_pathv[i]; i++) {                  for (i = 0; g.gl_pathv[i]; i++) {
                         printf("Changing mode on %s\n", g.gl_pathv[i]);                          printf("Changing mode on %s\n", g.gl_pathv[i]);
                         do_setstat(in, out, g.gl_pathv[i], &a);                          do_setstat(in, out, g.gl_pathv[i], &a);
                 }                  }
Line 791 
Line 791 
         case I_CHOWN:          case I_CHOWN:
                 path1 = make_absolute(path1, *pwd);                  path1 = make_absolute(path1, *pwd);
                 remote_glob(in, out, path1, GLOB_NOCHECK, NULL, &g);                  remote_glob(in, out, path1, GLOB_NOCHECK, NULL, &g);
                 for(i = 0; g.gl_pathv[i]; i++) {                  for (i = 0; g.gl_pathv[i]; i++) {
                         if (!(aa = do_stat(in, out, g.gl_pathv[i], 0)))                          if (!(aa = do_stat(in, out, g.gl_pathv[i], 0)))
                                 continue;                                  continue;
                         if (!(aa->flags & SSH2_FILEXFER_ATTR_UIDGID)) {                          if (!(aa->flags & SSH2_FILEXFER_ATTR_UIDGID)) {
Line 808 
Line 808 
         case I_CHGRP:          case I_CHGRP:
                 path1 = make_absolute(path1, *pwd);                  path1 = make_absolute(path1, *pwd);
                 remote_glob(in, out, path1, GLOB_NOCHECK, NULL, &g);                  remote_glob(in, out, path1, GLOB_NOCHECK, NULL, &g);
                 for(i = 0; g.gl_pathv[i]; i++) {                  for (i = 0; g.gl_pathv[i]; i++) {
                         if (!(aa = do_stat(in, out, g.gl_pathv[i], 0)))                          if (!(aa = do_stat(in, out, g.gl_pathv[i], 0)))
                                 continue;                                  continue;
                         if (!(aa->flags & SSH2_FILEXFER_ATTR_UIDGID)) {                          if (!(aa->flags & SSH2_FILEXFER_ATTR_UIDGID)) {
Line 896 
Line 896 
         setvbuf(stdout, NULL, _IOLBF, 0);          setvbuf(stdout, NULL, _IOLBF, 0);
         setvbuf(infile, NULL, _IOLBF, 0);          setvbuf(infile, NULL, _IOLBF, 0);
   
         for(;;) {          for (;;) {
                 char *cp;                  char *cp;
   
                 printf("sftp> ");                  printf("sftp> ");

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41