search for: process_readdir

Displaying 5 results from an estimated 5 matches for "process_readdir".

2003 May 31
11
[Bug 581] SFTP "ls" listings never end
...running on Compaq/HP Tru64 UNIX 5.1 is sent an "ls" command for a directory on an NFS-mounted volume, it either returns an endlessly-repeating directory listing, or seems to hang without returning anything. The problem has to do with the semantics of the readdir call, as used in the process_readdir routine in sftp-server.c. readdir returns NULL to indicate the end of the directory listing. However, process_readdir may then later call readdir again on the same directory handle. For a local volume, it will continue returning NULL. However, for an NFS-mounted volume, after returning NULL onc...
2001 Jul 25
1
[PATCH]: sftp: Avoid paths beginning with "//"
...urn(ret); Index: sftp-server.c =================================================================== RCS file: /cvs/openssh_cvs/sftp-server.c,v retrieving revision 1.34 diff -u -p -r1.34 sftp-server.c --- sftp-server.c 2001/07/04 03:32:33 1.34 +++ sftp-server.c 2001/07/25 08:44:31 @@ -756,8 +756,8 @@ process_readdir(void) stats = xrealloc(stats, nstats * sizeof(Stat)); } /* XXX OVERFLOW ? */ - snprintf(pathname, sizeof pathname, - "%s/%s", path, dp->d_name); + snprintf(pathname, sizeof pathname, "%s%s%s", path, + strcmp(path, "/") ? "/" : &qu...
2011 Dec 01
1
[Bug 1953] New: Implementation of xattr in sftp-server for sshfs
...movexattr are needed. But for a user interface like sftp-client, high level functions like set-/getfacl and set-/getfattr would be necessary. These are rather complex and would unnecessarily burden the sftp-client code in my opinion. Additionally, I changed the limitation of entries per message in process_readdir from max. 100 entries to a packet size limitation, because the size per entry may be enlarged by xattr data. But typically, much more than 100 entries can now be sent in one message. I hope, that you are interested in my patch. Thanks, Eberhard -- Configure bugmail: https://bugzilla.mindrot.o...
2009 Feb 12
2
[patch 1/3] add protocol extension to ATTR message
This patch adds all the missing commonly used UNIX attributes: st_dev, st_ino, st_nlink, st_rdev, st_blocks, st_blksize, st_ctime. In addition it extends st_atime and st_mtime to 64bits, and adds nanosecond resolution to all three timestamps. This is implemented as an extension to the ATTR message. This patch alone is sufficient for SSHFS to be able to use these attributes. The following two
2006 May 15
1
[PATCH 8/12] openssh-4.3p2 return code check bugs
...atus = SSH2_FX_FAILURE; + goto out; + } a = get_attrib(); TRACE("fsetstat id %u handle %d", id, handle); fd = handle_to_fd(handle); @@ -654,6 +671,7 @@ process_fsetstat(void) status = errno_to_portable(errno); } } +out: send_status(id, status); } @@ -697,6 +715,11 @@ process_readdir(void) id = get_int(); handle = get_handle(); + if (handle < 0) { + send_status(id, SSH2_FX_FAILURE); + return; + } + TRACE("readdir id %u handle %d", id, handle); dirp = handle_to_dir(handle); path = handle_to_name(handle);