search for: process_symlink

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

2009 Feb 26
1
sftp SSH2_FXP_SYMLINK argument order
...with Symbolic links in http://www.openssh.org/txt/draft-ietf-secsh-filexfer-02.txt it seems to say that the first argument ('linkpath') specifies the name of the symlink file to create. ("linkpath' specifies the path name of the symlink to be created"). However, sftp-server.c:process_symlink() seems to reverse this. I.E. the first argument ('oldpath') is passed as the first argument to symlink(). But for symlink() the second argument specifies the new file to create. I guess its kinda hard to fix this now, as a lot of deployments may rely on the old behaviour. But maybe it wou...
2006 Aug 19
0
[PATCH] add statfs extension to sftp-server
...); + buffer_put_int64(&msg, st->f_bfree); + buffer_put_int64(&msg, st->f_bavail); + buffer_put_int64(&msg, st->f_files); + buffer_put_int64(&msg, st->f_ffree); + send_msg(&msg); + buffer_free(&msg); +} + /* parse incoming */ static void @@ -1049,6 +1068,25 @@ process_symlink(void) } static void +process_extended_statfs(u_int32_t id) +{ + char *path; + struct statfs st; + int ret; + + path = get_string(NULL); + debug3("request %u: statfs", id); + logit("statfs \"%s\"", path); + + ret = statfs(path, &st); + if (ret == -1) + send_sta...
2003 Feb 05
2
Minor races in sftp-server.c
...dpath, newpath) == -1) + status = errno_to_portable(errno); + else if (unlink(oldpath) == -1) { + status = errno_to_portable(errno); + /* clean spare link */ + unlink(newpath); + } else + status = SSH2_FX_OK; send_status(id, status); xfree(oldpath); xfree(newpath); @@ -878,19 +881,16 @@ process_symlink(void) { u_int32_t id; - struct stat st; char *oldpath, *newpath; - int ret, status = SSH2_FX_FAILURE; + int ret, status; id = get_int(); oldpath = get_string(NULL); newpath = get_string(NULL); TRACE("symlink id %u old %s new %s", id, oldpath, newpath); - /* fail if 'new...
2007 Dec 07
2
[PATCH] add statfs extension to sftp-server
...); + buffer_put_int64(&msg, st->f_bfree); + buffer_put_int64(&msg, st->f_bavail); + buffer_put_int64(&msg, st->f_files); + buffer_put_int64(&msg, st->f_ffree); + send_msg(&msg); + buffer_free(&msg); +} + /* parse incoming */ static void @@ -1049,6 +1068,25 @@ process_symlink(void) } static void +process_extended_statfs(u_int32_t id) +{ + char *path; + struct statfs st; + int ret; + + path = get_string(NULL); + debug3("request %u: statfs", id); + logit("statfs \"%s\"", path); + + ret = statfs(path, &st); + if (ret == -1) + send_sta...
2013 Apr 09
19
[PATCH 00/17] Btrfs-progs: some receive related patches
Most fixes are trivial. The one from Alex is fixing a real bug that several users have reported. Alex sent the patch half a year ago and it was not yet integrated. The patch "Use /proc/mounts instead of /etc/mtab" is a repost. The patch "btrfs-receive optionally honors the end-cmd" is a preparation step to allow backup tools to multiplex a single communication stream (e.g. a