summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/scp.c b/scp.c
index 31e6709fbcaaf..60682c68769bc 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.195 2018/02/10 06:15:12 djm Exp $ */
+/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */
/*
* scp - secure remote copy. This is basically patched BSD rcp which
* uses ssh to do the data transfer (instead of using rcmd).
@@ -311,7 +311,7 @@ do_cmd(char *host, char *remuser, int port, char *cmd, int *fdin, int *fdout)
}
/*
- * This functions executes a command simlar to do_cmd(), but expects the
+ * This function executes a command similar to do_cmd(), but expects the
* input and output descriptors to be setup by a previous call to do_cmd().
* This way the input and output of two commands can be connected.
*/
@@ -1092,6 +1092,8 @@ sink(int argc, char **argv)
SCREWUP("bad mode");
mode = (mode << 3) | (*cp - '0');
}
+ if (!pflag)
+ mode &= ~mask;
if (*cp++ != ' ')
SCREWUP("mode not delimited");