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

Diff for /src/usr.bin/ssh/scp.c between version 1.4 and 1.5

version 1.4, 1999/09/30 01:21:41 version 1.5, 1999/09/30 05:11:29
Line 50 
Line 50 
   
 #include "ssh.h"  #include "ssh.h"
 #include "xmalloc.h"  #include "xmalloc.h"
 #ifdef HAVE_UTIME_H  
 #include <utime.h>  #include <utime.h>
 #ifdef _NEXT_SOURCE  
 struct utimbuf {  
   time_t actime;  
   time_t modtime;  
 };  
 #endif /* _NEXT_SOURCE */  
 #else  
 struct utimbuf  
 {  
   long actime;  
   long modtime;  
 };  
 #endif  
   
 #define _PATH_CP "cp"  #define _PATH_CP "cp"
   
 #ifndef STDIN_FILENO  
 #define STDIN_FILENO 0  
 #endif  
 #ifndef STDOUT_FILENO  
 #define STDOUT_FILENO 1  
 #endif  
 #ifndef STDERR_FILENO  
 #define STDERR_FILENO 2  
 #endif  
   
 /* For progressmeter() function. */  /* For progressmeter() function. */
 #define STALLTIME       5  #define STALLTIME       5
   
Line 830 
Line 806 
 #endif  #endif
                 if (pflag) {                  if (pflag) {
                         if (exists || omode != mode)                          if (exists || omode != mode)
 #ifdef HAVE_FCHMOD  
                                 if (fchmod(ofd, omode))                                  if (fchmod(ofd, omode))
 #else /* HAVE_FCHMOD */  
                                 if (chmod(np, omode))  
 #endif /* HAVE_FCHMOD */  
                                         run_err("%s: set mode: %s",                                          run_err("%s: set mode: %s",
                                             np, strerror(errno));                                              np, strerror(errno));
                 } else {                  } else {
                         if (!exists && omode != mode)                          if (!exists && omode != mode)
 #ifdef HAVE_FCHMOD  
                                 if (fchmod(ofd, omode & ~mask))                                  if (fchmod(ofd, omode & ~mask))
 #else /* HAVE_FCHMOD */  
                                 if (chmod(np, omode & ~mask))  
 #endif /* HAVE_FCHMOD */  
                                         run_err("%s: set mode: %s",                                          run_err("%s: set mode: %s",
                                             np, strerror(errno));                                              np, strerror(errno));
                 }                  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5