bool free_resolved_name = False;
#endif
char *resolved_name = NULL;
- size_t con_path_len = strlen(conn->connectpath);
char *p = NULL;
DEBUG(3,("reduce_name [%s] [%s]\n", fname, conn->connectpath));
}
/* Check for widelinks allowed. */
- if (!lp_widelinks(SNUM(conn)) && (strncmp(conn->connectpath, resolved_name, con_path_len) != 0)) {
+ if (!lp_widelinks(SNUM(conn))
+ && (strncmp(conn->connectpath, resolved_name,
+ strlen(conn->connectpath)) != 0)) {
DEBUG(2, ("reduce_name: Bad access attempt: %s is a symlink outside the share path", fname));
if (free_resolved_name) {
SAFE_FREE(resolved_name);