r706: Fix erroneous commit... I've not finished testing the
authorJeremy Allison <jra@samba.org>
Thu, 13 May 2004 21:23:40 +0000 (21:23 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:51:34 +0000 (10:51 -0500)
symlink stuff yet. Noticed by Stefan (metze).
Jeremy.
(This used to be commit 389ad1a05b2197edb20eda270fbd5c7eed7bb2f3)

source3/smbd/trans2.c

index ba2931d80914cdcb2a1bb09792cada6cd858016e..f948b0671801ffa55b18a92736e43ddb13821c4e 100644 (file)
@@ -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));
                                }