Patch for scp (openssh 1.2.2p1)

tit tim.tassonis at trivadis.com
Thu Mar 9 22:52:30 EST 2000


Hi

While ssh allows for usernames containing a dot, scp gives an error
"Invalid user name". The following patch fixed that behaviour:

diff -ru scp.c-save scp.c
--- scp.c-save  Thu Mar  9 12:21:43 2000
+++ scp.c   Thu Mar  9 12:22:25 2000
@@ -1062,7 +1062,7 @@
        c = *cp;
        if (c & 0200)
            goto bad;
-       if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-')
+       if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-' && c !=
'.')
            goto bad;
    } while (*++cp);
    return (1);

Hope that this can be applied (so i don't have to do it anymore with any
upgrade).

Regards
Tim





More information about the openssh-unix-dev mailing list