diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-02-04 21:41:22 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-02-04 21:41:22 +0000 |
commit | 41ac7a2ca323edd2f65b09d7ba4cc282674b678d (patch) | |
tree | 554022cc20c76196cabb82e934465243e02e8e05 | |
parent | ffecb0714db0a789b78303fb3e76226e32bb9b81 (diff) |
use base 8 for umask/chmod
-rw-r--r-- | usr.bin/ssh/sftp-int.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/sftp-int.c b/usr.bin/ssh/sftp-int.c index 3d68bec5255..24444e14e93 100644 --- a/usr.bin/ssh/sftp-int.c +++ b/usr.bin/ssh/sftp-int.c @@ -27,7 +27,7 @@ /* XXX: recursive operations */ #include "includes.h" -RCSID("$OpenBSD: sftp-int.c,v 1.3 2001/02/04 15:32:25 stevesk Exp $"); +RCSID("$OpenBSD: sftp-int.c,v 1.4 2001/02/04 21:41:21 markus Exp $"); #include "buffer.h" #include "xmalloc.h" @@ -289,6 +289,7 @@ parse_args(const char **cpp, int *pflag, unsigned long *n_arg, char **path1, char **path2) { const char *cmd, *cp = *cpp; + int base = 0; int i, cmdnum; /* Skip leading whitespace */ @@ -383,6 +384,7 @@ parse_args(const char **cpp, int *pflag, unsigned long *n_arg, break; case I_LUMASK: case I_CHMOD: + base = 8; case I_CHOWN: case I_CHGRP: /* Get numeric arg (mandatory) */ @@ -391,7 +393,7 @@ parse_args(const char **cpp, int *pflag, unsigned long *n_arg, "to the %s command.", cmd); return(-1); } - *n_arg = strtoul(cp, (char**)&cp, 0); + *n_arg = strtoul(cp, (char**)&cp, base); if (!*cp || !strchr(WHITESPACE, *cp)) { error("You must supply a numeric argument " "to the %s command.", cmd); |