"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "contrib/mod_sftp/fxp.c" between
proftpd-1.3.6b.tar.gz and proftpd-1.3.6c.tar.gz

About: ProFTPD is a highly configurable FTP server software (with FTPS and SFTP support).

fxp.c  (proftpd-1.3.6b):fxp.c  (proftpd-1.3.6c)
skipping to change at line 2987 skipping to change at line 2987
return 0; return 0;
} }
curr_path = pstrdup(fxh->pool, fxh->fh->fh_path); curr_path = pstrdup(fxh->pool, fxh->fh->fh_path);
real_path = curr_path; real_path = curr_path;
if (fxh->fh_real_path) { if (fxh->fh_real_path) {
real_path = fxh->fh_real_path; real_path = fxh->fh_real_path;
} }
/* Write an 'incomplete' TransferLog entry for this. */ /* Write an 'incomplete' TransferLog entry for this. */
abs_path = dir_abs_path(fxh->pool, real_path, TRUE); abs_path = sftp_misc_vroot_abs_path(fxh->pool, real_path, TRUE);
if (fxh->fh_flags == O_RDONLY) { if (fxh->fh_flags == O_RDONLY) {
direction = 'o'; direction = 'o';
} else { } else {
direction = 'i'; direction = 'i';
} }
if (fxh->fh_flags & O_APPEND) { if (fxh->fh_flags & O_APPEND) {
cmd = fxp_cmd_alloc(fxh->pool, C_APPE, pstrdup(fxh->pool, curr_path)); cmd = fxp_cmd_alloc(fxh->pool, C_APPE, pstrdup(fxh->pool, curr_path));
skipping to change at line 4653 skipping to change at line 4653
/* No errors. */ /* No errors. */
xerrno = errno = 0; xerrno = errno = 0;
pr_fs_clear_cache2(dst); pr_fs_clear_cache2(dst);
pr_fsio_stat(dst, &st); pr_fsio_stat(dst, &st);
fxp_cmd_dispatch(cmd); fxp_cmd_dispatch(cmd);
/* Write a TransferLog entry as well. */ /* Write a TransferLog entry as well. */
abs_path = dir_abs_path(fxp->pool, dst, TRUE); abs_path = sftp_misc_vroot_abs_path(fxp->pool, dst, TRUE);
xferlog_write(0, session.c->remote_name, st.st_size, abs_path, 'b', 'i', xferlog_write(0, session.c->remote_name, st.st_size, abs_path, 'b', 'i',
'r', session.user, 'c', "_"); 'r', session.user, 'c', "_");
status_code = fxp_errno2status(xerrno, &reason); status_code = fxp_errno2status(xerrno, &reason);
pr_trace_msg(trace_channel, 8, "sending response: STATUS %lu '%s'", pr_trace_msg(trace_channel, 8, "sending response: STATUS %lu '%s'",
(unsigned long) status_code, reason); (unsigned long) status_code, reason);
fxp_status_write(fxp->pool, &buf, &buflen, fxp->request_id, status_code, fxp_status_write(fxp->pool, &buf, &buflen, fxp->request_id, status_code,
reason, NULL); reason, NULL);
skipping to change at line 6588 skipping to change at line 6588
} }
if (res < 0 && if (res < 0 &&
xerrno != EOF) { xerrno != EOF) {
pr_response_add_err(R_451, "%s: %s", cmd2->arg, strerror(xerrno)); pr_response_add_err(R_451, "%s: %s", cmd2->arg, strerror(xerrno));
fxp_cmd_dispatch_err(cmd2); fxp_cmd_dispatch_err(cmd2);
} else { } else {
pr_response_add(R_226, "%s", "Transfer complete"); pr_response_add(R_226, "%s", "Transfer complete");
session.xfer.path = sftp_misc_vroot_abs_path(cmd2->pool,
session.xfer.path, FALSE);
fxp_cmd_dispatch(cmd2); fxp_cmd_dispatch(cmd2);
} }
} }
} else if (fxh->dirh != NULL) { } else if (fxh->dirh != NULL) {
cmd_rec *cmd2; cmd_rec *cmd2;
cmd2 = fxp_cmd_alloc(fxp->pool, C_MLSD, (char *) fxh->dir); cmd2 = fxp_cmd_alloc(fxp->pool, C_MLSD, (char *) fxh->dir);
cmd2->cmd_class = CL_DIRS; cmd2->cmd_class = CL_DIRS;
cmd2->cmd_id = pr_cmd_get_id(C_MLSD); cmd2->cmd_id = pr_cmd_get_id(C_MLSD);
skipping to change at line 11308 skipping to change at line 11310
fxp_cmd_dispatch_err(cmd2); fxp_cmd_dispatch_err(cmd2);
errno = xerrno; errno = xerrno;
} else { } else {
char *abs_path; char *abs_path;
/* The TransferLog format wants the full path to the deleted file, /* The TransferLog format wants the full path to the deleted file,
* regardless of a chroot. * regardless of a chroot.
*/ */
abs_path = dir_abs_path(fxp->pool, path, TRUE); abs_path = sftp_misc_vroot_abs_path(fxp->pool, path, TRUE);
xferlog_write(0, session.c->remote_name, st.st_size, abs_path, xferlog_write(0, session.c->remote_name, st.st_size, abs_path,
'b', 'd', 'r', session.user, 'c', "_"); 'b', 'd', 'r', session.user, 'c', "_");
pr_response_add(R_250, "%s command successful", (char *) cmd2->argv[0]); pr_response_add(R_250, "%s command successful", (char *) cmd2->argv[0]);
fxp_cmd_dispatch(cmd2); fxp_cmd_dispatch(cmd2);
errno = 0; errno = 0;
} }
 End of changes. 4 change blocks. 
3 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)