]> andersk Git - openssh.git/blobdiff - scp.c
- (tim) [configure.ac] updwtmpx() on OpenServer seems to add duplicate entry.
[openssh.git] / scp.c
diff --git a/scp.c b/scp.c
index 3ae17c9acc9940a07da42c2709703cc78f0a6d3d..33c5891f24ff7492d2c87a5ca6c9740fff36ccdf 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -71,7 +71,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.115 2004/06/21 17:36:31 avsm Exp $");
+RCSID("$OpenBSD: scp.c,v 1.116 2004/07/08 12:47:21 dtucker Exp $");
 
 #include "xmalloc.h"
 #include "atomicio.h"
@@ -80,11 +80,7 @@ RCSID("$OpenBSD: scp.c,v 1.115 2004/06/21 17:36:31 avsm Exp $");
 #include "misc.h"
 #include "progressmeter.h"
 
-#ifdef HAVE___PROGNAME
 extern char *__progname;
-#else
-char *__progname;
-#endif
 
 void bwlimit(int);
 
@@ -946,21 +942,25 @@ bad:                      run_err("%s: %s", np, strerror(errno));
                if (pflag) {
                        if (exists || omode != mode)
 #ifdef HAVE_FCHMOD
-                               if (fchmod(ofd, omode))
+                               if (fchmod(ofd, omode)) {
 #else /* HAVE_FCHMOD */
-                               if (chmod(np, omode))
+                               if (chmod(np, omode)) {
 #endif /* HAVE_FCHMOD */
                                        run_err("%s: set mode: %s",
                                            np, strerror(errno));
+                                       wrerr = DISPLAYED;
+                               }
                } else {
                        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))
+                               if (chmod(np, omode & ~mask)) {
 #endif /* HAVE_FCHMOD */
                                        run_err("%s: set mode: %s",
                                            np, strerror(errno));
+                                       wrerr = DISPLAYED;
+                               }
                }
                if (close(ofd) == -1) {
                        wrerr = YES;
This page took 0.05725 seconds and 4 git commands to generate.