extern iconv_t ic_send, ic_recv;
#endif
extern char curr_dir[];
+extern char *module_dir;
extern unsigned int module_dirlen;
static int log_initialised;
n = timestring(time(NULL));
break;
case 'P':
- n = lp_path(module_id);
+ n = module_dir;
break;
case 'u':
n = auth_user;
int module_dirlen = 0;
mode_t orig_umask = 002;
char *partial_dir;
+char *module_dir;
struct filter_list_struct server_filter_list;
void rprintf(UNUSED(enum logcode code), const char *format, ...)
return 0;
}
- char *lp_path(UNUSED(int mod))
-{
- return NULL;
-}
-
const char *who_am_i(void)
{
return "tester";
extern int modify_window;
extern int relative_paths;
extern int human_readable;
+extern char *module_dir;
extern unsigned int module_dirlen;
extern mode_t orig_umask;
extern char *partial_dir;
* rootdir will be ignored to avoid expansion of the string.
*
* The rootdir string contains a value to use in place of a leading slash.
- * Specify NULL to get the default of lp_path(module_id).
+ * Specify NULL to get the default of "module_dir".
*
* The depth var is a count of how many '..'s to allow at the start of the
* path. If symlink is set, combine its value with the "p" value to get
int plen = strlen(p);
if (*p == '/') {
if (!rootdir)
- rootdir = lp_path(module_id);
+ rootdir = module_dir;
rlen = strlen(rootdir);
depth = 0;
p++;
if (len == 1 && *dir == '.')
return 1;
- if ((*dir == '/' ? len : curr_dir_len + 1 + len) >= sizeof curr_dir)
+ if ((*dir == '/' ? len : curr_dir_len + 1 + len) >= sizeof curr_dir) {
+ errno = ENAMETOOLONG;
return 0;
+ }
if (!set_path_only && chdir(dir))
return 0;