summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-05-13 21:23:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:34 -0500
commitd7af7a26195da2146a16bf9950abcac716079fd7 (patch)
treef174537756d6dc82d95fd10040203ff1c1ab979e
parent41db2016adc464691ea2c3497aedca55fcf004ed (diff)
downloadsamba-d7af7a26195da2146a16bf9950abcac716079fd7.tar.gz
samba-d7af7a26195da2146a16bf9950abcac716079fd7.tar.bz2
samba-d7af7a26195da2146a16bf9950abcac716079fd7.zip
r706: Fix erroneous commit... I've not finished testing the
symlink stuff yet. Noticed by Stefan (metze). Jeremy. (This used to be commit 389ad1a05b2197edb20eda270fbd5c7eed7bb2f3)
-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));
}