Commit d7af7a26 authored by Jeremy Allison's avatar Jeremy Allison Committed by Gerald (Jerry) Carter
Browse files

r706: Fix erroneous commit... I've not finished testing the

symlink stuff yet. Noticed by Stefan (metze).
Jeremy.
(This used to be commit 389ad1a05b2197edb20eda270fbd5c7eed7bb2f3)
parent 41db2016
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -2400,7 +2400,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn,
	if (lp_dos_filetime_resolution(SNUM(conn))) {
		c_time &= ~1;
		sbuf.st_atime &= ~1;
		sbuf.st_ctime &= ~1;
		sbuf.st_mtime &= ~1;
		sbuf.st_mtime &= ~1;
	}

@@ -3506,17 +3506,12 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
			srvstr_pull(inbuf, link_target, pdata, sizeof(link_target), -1, STR_TERMINATE);

			/* !widelinks forces the target path to be within the share. */
			/* This means we can interpret the target as a pathname. */
			if (!lp_widelinks(SNUM(conn))) {
				pstring rel_name;
				char *last_dirp = NULL;

				srvstr_get_path(inbuf, link_target, pdata, sizeof(link_target),
						-1, STR_TERMINATE, &status);
				if (!NT_STATUS_IS_OK(status)) {
					return ERROR_NT(status);
				}
				unix_convert(link_target,conn,0,&bad_path,&sbuf);
				unix_format(link_target);

				pstrcpy(rel_name, newname);
				last_dirp = strrchr_m(rel_name, '/');
				if (last_dirp) {
@@ -3525,7 +3520,6 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
					pstrcpy(rel_name, "./");
				}
				pstrcat(rel_name, link_target);

				if (ensure_link_is_safe(conn, rel_name) != 0) {
					return(UNIXERROR(ERRDOS,ERRnoaccess));
				}