Don't try to handle symlinks on versions of the SSH File Transfer Protocol

that don't support it, e.g. the Solaris 9/x86 sshd (SSH-2.0-Sun_SSH_1.0;
..._1.1 from Solaris 10/x86 is fine)

OK'd by pooka@
This commit is contained in:
hubertf 2006-11-23 01:51:15 +00:00
parent c8ab6b2b31
commit 1ee989e6be
1 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ssshfs.c,v 1.6 2006/11/21 23:09:23 pooka Exp $ */
/* $NetBSD: ssshfs.c,v 1.7 2006/11/23 01:51:15 hubertf Exp $ */
/*
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
@ -491,6 +491,9 @@ ssshfs_readlink(struct puffs_usermount *pu, void *opc,
struct ssshnode *ssn = opc;
char *res;
if (sftp_proto_version(sftpc) < 3)
return EOPNOTSUPP;
res = do_readlink(sftpc, ssn->name);
if (!res)
return EIO;
@ -572,6 +575,9 @@ ssshfs_symlink(struct puffs_usermount *pu, void *opc, void **newnode,
Attrib *a;
int rv;
if (sftp_proto_version(sftpc) < 3)
return EOPNOTSUPP;
if (*link_target == '/') {
strcpy(buf, link_target);
} else {