Now on revision 111265. ------------------------------------------------------------ revno: 111265 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2012-12-18 21:05:56 +0200 message: Follow symlinks in MS-Windows emulations of ACL functions. src/w32.c (acl_get_file, acl_set_file): Run the file name through map_w32_filename, and resolve any symlinks in the file name, like Posix platforms do. (acl_set_file): Call revert_to_self, if any privileges were enabled. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-12-17 20:59:04 +0000 +++ src/ChangeLog 2012-12-18 19:05:56 +0000 @@ -1,3 +1,11 @@ +2012-12-18 Eli Zaretskii + + * w32.c (acl_get_file, acl_set_file): Run the file name through + map_w32_filename, and resolve any symlinks in the file name, like + Posix platforms do. + (acl_set_file): Call revert_to_self, if any privileges were + enabled. + 2012-12-17 Juanma Barranquero * makefile.w32-in ($(BLD)/editfns.$(O), $(BLD)/fileio.$(O)) === modified file 'src/w32.c' --- src/w32.c 2012-12-17 19:14:34 +0000 +++ src/w32.c 2012-12-18 19:05:56 +0000 @@ -4518,7 +4518,7 @@ errno = EINVAL; else { - /* Copy the link target name, in wide characters, fro + /* Copy the link target name, in wide characters, from reparse_data, then convert it to multibyte encoding in the current locale's codepage. */ WCHAR *lwname; @@ -4766,6 +4766,7 @@ acl_get_file (const char *fname, acl_type_t type) { PSECURITY_DESCRIPTOR psd = NULL; + const char *filename; if (type == ACL_TYPE_ACCESS) { @@ -4776,6 +4777,12 @@ DACL_SECURITY_INFORMATION ; int e = errno; + filename = map_w32_filename (fname, NULL); + if ((volume_info.flags & FILE_SUPPORTS_REPARSE_POINTS) != 0) + fname = chase_symlinks (filename); + else + fname = filename; + errno = 0; if (!get_file_security (fname, si, psd, 0, &sd_len) && errno != ENOTSUP) @@ -4819,6 +4826,7 @@ BOOL dflt; BOOL dacl_present; int e; + const char *filename; if (acl_valid (acl) != 0 || (type != ACL_TYPE_DEFAULT && type != ACL_TYPE_ACCESS)) @@ -4833,6 +4841,12 @@ return -1; } + filename = map_w32_filename (fname, NULL); + if ((volume_info.flags & FILE_SUPPORTS_REPARSE_POINTS) != 0) + fname = chase_symlinks (filename); + else + fname = filename; + if (get_security_descriptor_owner ((PSECURITY_DESCRIPTOR)acl, &psid, &dflt) && psid) flags |= OWNER_SECURITY_INFORMATION; @@ -4866,10 +4880,13 @@ errno = 0; set_file_security ((char *)fname, flags, (PSECURITY_DESCRIPTOR)acl); err = GetLastError (); - if (st >= 2) - restore_privilege (&old2); - if (st >= 1) - restore_privilege (&old1); + if (st) + { + if (st >= 2) + restore_privilege (&old2); + restore_privilege (&old1); + revert_to_self (); + } if (errno == ENOTSUP) ; ------------------------------------------------------------ revno: 111264 committer: Michael Albinus branch nick: trunk timestamp: Tue 2012-12-18 14:37:06 +0100 message: * net/tramp.el (tramp-error-with-buffer): Give a hint to use `tramp-cleanup-this-connection', when the process has died. (Bug#13151) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-17 19:43:55 +0000 +++ lisp/ChangeLog 2012-12-18 13:37:06 +0000 @@ -1,3 +1,9 @@ +2012-12-18 Michael Albinus + + * net/tramp.el (tramp-error-with-buffer): Give a hint to use + `tramp-cleanup-this-connection', when the process has died. + (Bug#13151) + 2012-12-17 Stefan Monnier * icomplete.el (icomplete-completions): Also use … to truncate prefix. === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2012-12-17 14:38:07 +0000 +++ lisp/net/tramp.el 2012-12-18 13:37:06 +0000 @@ -1455,6 +1455,11 @@ (or (and (bufferp buffer) buffer) (and (processp vec-or-proc) (process-buffer vec-or-proc)) (tramp-get-connection-buffer vec-or-proc))) + (when (string-equal fmt-string "Process died") + (message + "%s\n %s" + "Tramp failed to connect. If this happens repeatedly, try" + "`M-x tramp-cleanup-this-connection'")) (sit-for 30)))))) (defmacro with-parsed-tramp-file-name (filename var &rest body) ------------------------------------------------------------ revno: 111263 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2012-12-17 21:59:04 +0100 message: src/makefile.w32-in: Update depencencies. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-12-17 19:17:06 +0000 +++ src/ChangeLog 2012-12-17 20:59:04 +0000 @@ -1,3 +1,8 @@ +2012-12-17 Juanma Barranquero + + * makefile.w32-in ($(BLD)/editfns.$(O), $(BLD)/fileio.$(O)) + ($(BLD)/w32.$(O)): Update dependencies. + 2012-12-17 Stefan Monnier * xdisp.c (select_frame_for_redisplay): Use select_window_1 to === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2012-12-14 19:43:12 +0000 +++ src/makefile.w32-in 2012-12-17 20:59:04 +0000 @@ -781,7 +781,6 @@ $(SRC)/editfns.c \ $(SRC)/blockinput.h \ $(NT_INC)/pwd.h \ - $(NT_INC)/grp.h \ $(NT_INC)/unistd.h \ $(GNU_LIB)/intprops.h \ $(GNU_LIB)/strftime.h \ @@ -791,6 +790,7 @@ $(CODING_H) \ $(CONFIG_H) \ $(FRAME_H) \ + $(GRP_H) \ $(INTERVALS_H) \ $(LISP_H) \ $(SYSTIME_H) \ @@ -843,6 +843,7 @@ $(SRC)/commands.h \ $(SRC)/w32.h \ $(NT_INC)/pwd.h \ + $(NT_INC)/sys/acl.h \ $(NT_INC)/sys/file.h \ $(NT_INC)/sys/stat.h \ $(NT_INC)/unistd.h \ @@ -1185,6 +1186,7 @@ $(SRC)/w32select.h \ $(NT_INC)/dirent.h \ $(NT_INC)/pwd.h \ + $(NT_INC)/sys/acl.h \ $(NT_INC)/sys/file.h \ $(NT_INC)/sys/time.h \ $(GNU_LIB)/allocator.h \