From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57386: 29.0.50; support make-symbolic-link without admin priviledge on Windows Date: Thu, 25 Aug 2022 12:09:10 +0300 Message-ID: <83y1vc3d1l.fsf@gnu.org> References: <838rnd638m.fsf@gnu.org> <83wnax4hw5.fsf@gnu.org> <83h72050tc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3207"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57386@debbugs.gnu.org To: =?UTF-8?Q?Ki=C3=AAn_?= =?UTF-8?Q?Nguy=E1=BB=85n?= Quang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 25 11:14:31 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oR8wY-0000fd-J0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 11:14:30 +0200 Original-Received: from localhost ([::1]:39354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR8wX-0007GR-6d for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 05:14:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8sF-0004N7-03 for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 05:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59184) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8sE-00056G-LZ for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 05:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8sE-0002y3-HB for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 05:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Aug 2022 09:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57386 X-GNU-PR-Package: emacs Original-Received: via spool by 57386-submit@debbugs.gnu.org id=B57386.166141854811319 (code B ref 57386); Thu, 25 Aug 2022 09:10:02 +0000 Original-Received: (at 57386) by debbugs.gnu.org; 25 Aug 2022 09:09:08 +0000 Original-Received: from localhost ([127.0.0.1]:48929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8rM-0002wV-0v for submit@debbugs.gnu.org; Thu, 25 Aug 2022 05:09:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8rJ-0002vz-6b for 57386@debbugs.gnu.org; Thu, 25 Aug 2022 05:09:07 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58916) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8rD-00051a-Ue; Thu, 25 Aug 2022 05:08:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=QVDd6Jcy9gdrOQEyD5mr/N6gBShC3iNDNukLKI4D/fI=; b=Pd8HUnZj6aKkZa1PbESR fBLL8/7lY/1ljl3vhsWJvuFcBW/A5NX7nEhPxXf4ZwjC7hsucO3+J1G89cK7+XU+lEo99IqNPG9I0 wKpD6R7NBP4KTDmAaCM+U/pqC6bBS7x/9tQnv1vcW9EIOf6kPZq8ofDaouSar0cuBCxXT+qw7Oiie Umlb3cffhvqy6KuWVWZchqDU4aOd6ts+h3aG796eWSzkTNORv+aRzSrJjDVzYUyh8icShSQFTb5me WYoGb75gaqu67+4nqYBcSS8EpsmemCchcRGBEpd7iwpCoR7eeBmlm4eSwkCmvNQQVtBVWLM7hEr1R Jeauf3S0iIahfg==; Original-Received: from [87.69.77.57] (port=1669 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8rD-0007Lo-Ds; Thu, 25 Aug 2022 05:08:59 -0400 In-Reply-To: (message from =?UTF-8?Q?Ki=C3=AAn_?= =?UTF-8?Q?Nguy=E1=BB=85n?= Quang on Thu, 25 Aug 2022 17:52:50 +0900) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240689 Archived-At: > From: Kiên Nguyễn Quang > Date: Thu, 25 Aug 2022 17:52:50 +0900 > Cc: 57386@debbugs.gnu.org > > That's a separate problem, which we will resolve if and when it > becomes relevant. For now, this problem doesn't exist, since AFAIK > there are no features yet which we want to use that are available only > in Windows 11 and later. So please assume that version checks in > Emacs are reliable, and always will be, no matter what MS says about > that. > > Thanks. > > The new flag is available starting from Windows 10 Creator update, which means two (or 3? I don't know) > updates after the first Windows 10 release. > Since the version returned for all Windows 10 are the same, you see, that's the problem. If that's the problem (is anyone who has Windows 10 still likely to use those old releases, given the automatic updates in Windows 10 that cannot be turned off? and if they do, do they indeed get ERROR_INVALID_PARAMETER?), we can handle that as well. We have already an API for accessing the Registry (see w32-read-registry and its C counterpart w32_read_registry), and report-emacs-bug already uses it to obtain the full description of the version, the build number and all. If needed, we can use a similar technique to make an accurate version test. > I think the error is already caught and should be replaced with the new one if we retry calling the API, can you > elaborate more on how it can still affect Emacs? When you call an API with a parameter that is invalid, you are risking an exception, depending on the API and the build (debug or not). This has various unpleasant consequences; in the worst case, the Emacs process could be terminated. As documented, the problem is limited to CRT functions, but our general policy is to avoid that even when using the Win32 APIs. And version check is a simple enough way of avoiding that, so I see no reason not to do it here.