search for: okname

Displaying 13 results from an estimated 13 matches for "okname".

Did you mean: ofname
2012 Mar 06
1
Invalid user name: function okname() in scp.c
Hi OpenSSH developers In the source file *scp.c* there is a function called *okname(char *cp0)* that validates the entered username by using the scp command as follows: * *[ Fragment scp.c start ] ... int okname(char *cp0) { int c; char *cp; cp = cp0; do { c = (int)*cp; if (c & 0200) goto bad; if (!isalpha(c) &amp...
2002 Apr 12
1
scp.c::okname() problem
...from ssh or sftp. Thanks, -- Mark Index: scp.c =================================================================== RCS file: /cvs/openssh/scp.c,v retrieving revision 1.94 diff -u -p -r1.94 scp.c --- scp.c 6 Apr 2002 18:30:00 -0000 1.94 +++ scp.c 12 Apr 2002 02:13:22 -0000 @@ -1016,7 +1016,7 @@ okname(cp0) if (c & 0200) goto bad; if (!isalpha(c) && !isdigit(c) && - c != '_' && c != '-' && c != '.' && c != '+') + c != '_' && c != '-' && c != '.' && c != &...
2001 Feb 08
1
username check in scp
...incorrect, it is, at least *authoritatively* incorrect. -- Hitchiker's Guide To The Galaxy -------------- next part -------------- --- scp.c.orig Thu Feb 8 21:20:50 2001 +++ scp.c Thu Feb 8 21:21:21 2001 @@ -207,7 +207,6 @@ char *colon(char *); void lostconn(int); void nospace(void); -int okname(char *); void run_err(const char *,...); void verifydir(char *); @@ -371,8 +370,6 @@ tuser = argv[argc - 1]; if (*tuser == '\0') tuser = NULL; - else if (!okname(tuser)) - exit(1); } else { thost = argv[argc - 1]; tuser = NULL; @@ -395,8 +392,6 @@ suser = argv[...
2010 Mar 31
1
scp reject remote users with space in username
...remote user names with white spaces. (We have such user names on Windows hosts) For instance: $ scp myfile "my user"@machine:. used to work with openssh-4.2p1 and fails with 5.2p1 and 5.3p1: my user: invalid user name. I have traced this down to revision 1.129 of scp.c which now calls okname(). OTOH, ssh "my user"@machine works. Is this a bug, or a feature, and if so is there a workaround? Thanks. Christophe.
2000 Oct 11
2
scp -L option
...sible flags. */ case '4': *************** *** 283,288 **** --- 288,296 ---- case 'S': ssh_program = optarg; break; + case 'L': + highport=1; + break; /* Server options. */ case 'd': *************** *** 420,435 **** else if (!okname(suser)) continue; (void) sprintf(bp, ! "%s%s -x -o'FallBackToRsh no' -n -l %s %s %s %s '%s%s%s:%s'", ssh_program, verbose_mode ? " -v" : "", suser, host, cmd, src, tuser ? tuser : "", tuser...
2003 Feb 01
0
[Bug 483] New: scp issues "invalid user name" for a user name containing a blank
...;ve seen this error with openssh 3.5p1, with Irix scp v3.4 and on Solaris scp v3.0.2p1. The presence of a space is sufficient to produce the "invalid user name" diagnostic. Sorry but PC users often have user names of this form and probably a few Mac users, too. scp.c contains function okname that issues the "invalid user name" but since it really doesn't check with the remote host, scp doesn't really know whether the name is OK anyway. Unless there's some other reason for doing this check, I recommend just doing away with this function. ------- You are recei...
2010 Mar 15
0
Allow utf-8 usernames in scp
...valid user name". While traditionally usernames were restricted to printable us-ascii, nowadays there's little problem in allowing them. In fact, it is allowed by ssh, and even scp when copying _from_ such username. The limitation seems to lie on the if (c & 0200) goto bad; check on okname() at scp.c, which automatically rejects usernames with the high bit set. Can you please remove such limitation? Thanks,
2001 May 12
4
Erase the source file open; specify a tempfile name option
...f (src) { + *src++ = 0; + if (*src == 0) + src = "."; + if ((host = strchr(argv[i], '@')) == NULL) { + host = argv[i]; + suser = NULL; + } else { + *host++ = 0; + suser = argv[i]; + if (*suser == '\0') + suser = pwd->pw_name; + else if (!okname(suser)) + continue; + } + host = cleanhostname(host); } - *src++ = 0; - if (*src == 0) - src = "."; - if ((host = strchr(argv[i], '@')) == NULL) { - host = argv[i]; + else { + src = argv[i]; + host = "localhost"; suser = NULL; - } else { - *...
2017 Aug 04
4
Filter files received on scp server
Hey, So, I would be looking at type A. Forgive me if my understanding of how OpenSSH operates is not reflective of reality. I am assuming that, the file transfer is happening somewhat logically, with a name being known, content written, blah blah. >From reading scp.c, it appears that, the client end at least knows the file name so I must assume the server end must be given it. I am hoping to
2000 Jul 07
0
Patch to add scp -L option
...quot;)) != EOF) switch (ch) { /* User-visible flags. */ case '4': @@ -300,6 +310,9 @@ case 'q': showprogress = 0; break; + case 'L': + nonprivilaged_port = 1; + break; case '?': default: usage(); @@ -406,16 +419,18 @@ else if (!okname(suser)) continue; (void) sprintf(bp, - "%s%s -x -o'FallBackToRsh no' -n -l %s %s %s %s '%s%s%s:%s'", + "%s%s%s -x -o'FallBackToRsh no' -n -l %s %s %s %s '%s%s%s:%s'", SSH_PROGRAM, verbose_mode ? "...
2000 Dec 12
1
scp and filenames with weird characters
...len = strlen(ssh_program) + strlen(argv[i]) + strlen(src) + (tuser ? strlen(tuser) : 0) + - strlen(thost) + strlen(targ) + CMDNEEDS + 32; + strlen(thost) + strlen(targ) + CMDNEEDS + 40; bp = xmalloc(len); if (host) { *host++ = 0; @@ -398,7 +398,7 @@ else if (!okname(suser)) continue; sprintf(bp, - "%s%s -x -o'FallBackToRsh no' -n -l %s %s %s %s '%s%s%s:%s'", + "%s%s -x -o'FallBackToRsh no' -n -l \"%s\" \"%s\" \"%s\" \"%s\" '%s%s%s:%s'",...
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
2001 Oct 16
6
program-prefix does not work
...v[argc - 1]))) /* Dest is remote host. */ ! toremote(targ, argc, argv); else { ! tolocal(argc, argv); /* Dest is local host. */ if (targetshouldbedirectory) verifydir(argv[argc - 1]); } *************** *** 392,413 **** suser = pwd->pw_name; else if (!okname(suser)) continue; ! snprintf(bp, len, "%s%s %s -n " "-l %s %s %s %s '%s%s%s:%s'", ssh_program, verbose_mode ? " -v" : "", ssh_options, suser, host, cmd, src, tuser ? tuser : &qu...