summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/trans2.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index ba2931d809..f948b06718 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -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));
}