"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "contrib/mod_sftp/misc.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).

misc.c  (proftpd-1.3.6b):misc.c  (proftpd-1.3.6c)
skipping to change at line 290 skipping to change at line 290
(void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION, (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
"%schmod(%s) to %04o failed: %s", use_root_privs ? "root " : "", "%schmod(%s) to %04o failed: %s", use_root_privs ? "root " : "",
path, (unsigned int) st.st_mode, strerror(xerrno)); path, (unsigned int) st.st_mode, strerror(xerrno));
} }
} }
} }
return 0; return 0;
} }
const char *sftp_misc_get_chroot(pool *p) {
return pr_table_get(session.notes, "mod_sftp.chroot-path", NULL);
}
const char *sftp_misc_namelist_shared(pool *p, const char *c2s_names, const char *sftp_misc_namelist_shared(pool *p, const char *c2s_names,
const char *s2c_names) { const char *s2c_names) {
register unsigned int i; register unsigned int i;
const char *name = NULL, **client_names, **server_names; const char *name = NULL, **client_names, **server_names;
pool *tmp_pool; pool *tmp_pool;
array_header *client_list, *server_list; array_header *client_list, *server_list;
tmp_pool = make_sub_pool(p); tmp_pool = make_sub_pool(p);
pr_pool_tag(tmp_pool, "Share name pool"); pr_pool_tag(tmp_pool, "Share name pool");
skipping to change at line 326 skipping to change at line 330
break; break;
} }
} }
} }
name = pstrdup(p, name); name = pstrdup(p, name);
destroy_pool(tmp_pool); destroy_pool(tmp_pool);
return name; return name;
} }
/* If we are chrooted, AND mod_vroot is present, then abs_path will not
* actually point to the real absolute path on disk. Try to account for
* this.
*/
char *sftp_misc_vroot_abs_path(pool *p, const char *path, int interpolate) {
const char *curr_chroot_path, *real_chroot_path;
char *abs_path;
curr_chroot_path = session.chroot_path;
real_chroot_path = sftp_misc_get_chroot(p);
if (real_chroot_path != NULL &&
pr_module_exists("mod_vroot.c") == TRUE) {
session.chroot_path = real_chroot_path;
}
abs_path = dir_abs_path(p, path, interpolate);
session.chroot_path = curr_chroot_path;
return abs_path;
}
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added

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