Displaying 12 results from an estimated 12 matches for "cleanhostname".
2004 Aug 31
1
[PATCH] supporting a remote scp path option in scp
...+ strlen(rscpcmd) + 20;
bp = xmalloc(len);
- (void) snprintf(bp, len, "%s -t %s", cmd,
targ);
+ (void) snprintf(bp, len, "%s -t %s",
rscpcmd, targ);
host = cleanhostname(thost);
if (do_cmd(host, tuser, bp, &remin,
&remout, argc) < 0)
@@ -473,9 +488,9 @@
suser = pwd->pw_name;
}
host = cleanhostname(host);
- l...
2015 Aug 17
3
[PATCH] Expand tilde for UNIX domain socket forwards.
On Mon, 17 Aug 2015, Todd C. Miller wrote:
> I like the idea but tilde_expand_filename() calls fatal() if it
> cannot resolve ~foo. This is not terrible when using -L and -R on
> the normal command line but it seems pretty harsh to exit when -L
> or -R are used via the ~C escape or the streamlocal-forward at openssh.com
> request.
> Message-Id: <aea6cdc1d1b42d07 at
2000 Dec 12
1
scp and filenames with weird characters
..."%s\" \"%s\" \"%s\" '%s%s%s:%s'",
ssh_program, verbose_mode ? " -v" : "",
suser, host, cmd, src,
tuser ? tuser : "", tuser ? "@" : "",
@@ -406,7 +406,7 @@
} else {
host = cleanhostname(argv[i]);
sprintf(bp,
- "exec %s%s -x -o'FallBackToRsh no' -n %s %s %s '%s%s%s:%s'",
+ "exec %s%s -x -o'FallBackToRsh no' -n \"%s\" \"%s\" \"%s\" '%s%s%s:%s'",
ssh_program, verbose_mode ? &...
2000 Oct 11
2
scp -L option
...lBackToRsh no' -n -l %s %s %s %s '%s%s%s:%s'",
ssh_program, verbose_mode ? " -v" : "",
suser, host, cmd, src,
tuser ? tuser : "", tuser ? "@" : "",
thost, targ);
} else {
host = cleanhostname(argv[i]);
(void) sprintf(bp,
! "exec %s%s -x -o'FallBackToRsh no' -n %s %s %s '%s%s%s:%s'",
ssh_program, verbose_mode ? " -v" : "",
host, cmd, src,
tuser ? tuser : "", tuser ? "@" : &quo...
2001 Oct 16
6
program-prefix does not work
...ot;-l %s %s %s %s '%s%s%s:%s'",
ssh_program, verbose_mode ? " -v" : "",
ssh_options, suser, host, cmd, src,
tuser ? tuser : "", tuser ? "@" : "",
!
thost, targ);
} else {
host = cleanhostname(argv[i]);
!
snprintf(bp, len,
"exec %s%s %s -n %s "
"%s %s '%s%s%s:%s'",
ssh_program, verbose_mode ? " -v" : "",
ssh_options, host, cmd, src,
tuser ? tuser : "", tuser ? "...
2001 May 12
4
Erase the source file open; specify a tempfile name option
...{
*host++ = 0;
@@ -403,7 +415,7 @@
(void) xfree(bp);
} else { /* local to remote */
if (remin == -1) {
- len = strlen(targ) + CMDNEEDS + 20;
+ len = strlen(targ) + cmdlen + 20;
bp = xmalloc(len);
(void) snprintf(bp, len, "%s -t %s", cmd, targ);
host = cleanhostname(thost);
@@ -428,7 +440,8 @@
char *bp, *host, *src, *suser;
for (i = 0; i < argc - 1; i++) {
- if (!(src = colon(argv[i]))) { /* Local to local. */
+ src = colon(argv[i]);
+ if (!src && !eraseflag && !*tmpfn) { /* Local to local w/cp */
len = strlen(_PATH_CP) + strlen(...
2011 Aug 17
1
openssh-unix-dev Digest, Vol 100, Issue 3
...c/usr.bin/ssh/scp.c,v
> retrieving revision 1.170
> diff -u -p -r1.170 scp.c
> --- scp.c 9 Dec 2010 14:13:33 -0000 1.170
> +++ scp.c 9 Aug 2011 06:10:08 -0000
> @@ -580,12 +580,14 @@ toremote(char *targ, int argc, char **ar
> host = cleanhostname(argv[i]);
> suser = NULL;
> }
> - xasprintf(&bp, "%s -f -- %s", cmd, src);
> + xasprintf(&bp, "%s -f %s%s", cmd,
> + *src == '-&...
2001 Feb 08
1
username check in scp
...9;FallBackToRsh no' -n -l %s %s %s %s '%s%s%s:%s'",
ssh_program, verbose_mode ? " -v" : "",
@@ -468,8 +463,6 @@
suser = argv[i];
if (*suser == '\0')
suser = pwd->pw_name;
- else if (!okname(suser))
- continue;
}
host = cleanhostname(host);
len = strlen(src) + CMDNEEDS + 20;
@@ -1017,28 +1010,6 @@
}
run_err("%s: %s", cp, strerror(errno));
exit(1);
-}
-
-int
-okname(cp0)
- char *cp0;
-{
- int c;
- char *cp;
-
- cp = cp0;
- do {
- c = *cp;
- if (c & 0200)
- goto bad;
- if (!isalpha(c) && !isdig...
2000 Jul 07
0
Patch to add scp -L option
...SSH_PROGRAM, verbose_mode ? " -v" : "",
+ nonprivilaged_port ? " -P" : "",
suser, host, cmd, src,
tuser ? tuser : "", tuser ? "@" : "",
thost, targ);
} else {
host = cleanhostname(argv[i]);
(void) sprintf(bp,
- "exec %s%s -x -o'FallBackToRsh no' -n %s %s %s '%s%s%s:%s'",
+ "exec %s%s%s -x -o'FallBackToRsh no' -n %s %s %s '%s%s%s:%s'",
SSH_PROGRAM, verbose_mode ? " -v" : &quo...
2000 Aug 12
0
[PATCH] scp -S support
...AM, verbose_mode ? " -v" : "",
+ ssh_program, verbose_mode ? " -v" : "",
suser, host, cmd, src,
tuser ? tuser : "", tuser ? "@" : "",
thost, targ);
@@ -410,7 +416,7 @@
host = cleanhostname(argv[i]);
(void) sprintf(bp,
"exec %s%s -x -o'FallBackToRsh no' -n %s %s %s '%s%s%s:%s'",
- SSH_PROGRAM, verbose_mode ? " -v" : "",
+ ssh_program, verbose_mode ? " -v" : "",
host,...
2012 Aug 19
3
Bug Report and patch fix
..., *tuser, *arg;
@@ -656,6 +669,7 @@
if (remin == -1) {
xasprintf(&bp, "%s -t %s%s", cmd,
*targ == '-' ? "-- " : "", targ);
+ verifypath(argv[i]);/*added to check for the local existence of file before trying to do anything*/
host = cleanhostname(thost);
if (do_cmd(host, tuser, bp, &remin,
&remout) < 0)
2000 Jul 20
3
scp over 2 hosts
Hi folks,
I have the that I must copy some through a Plag-Gateway of a Firewall over 2 host. A secure connection via "ssh - t hosta ssh -t hostb" works fine, but does this work with scp too? Icould not realize it either with scp (1.2.27 of ssh.com) or scp from openssh. Do you have any ideas?
Thanks
Stephan