From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Ki=C3=AAn_?= =?UTF-8?Q?Nguy=E1=BB=85n?= Quang Newsgroups: gmane.emacs.bugs Subject: bug#57386: 29.0.50; support make-symbolic-link without admin priviledge on Windows Date: Thu, 25 Aug 2022 10:30:01 +0900 Message-ID: References: <838rnd638m.fsf@gnu.org> <83wnax4hw5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000055977205e706bd97" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18391"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57386@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 25 03:31:14 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 1oR1iE-0004c6-19 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 03:31:14 +0200 Original-Received: from localhost ([::1]:51060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR1iC-0003OW-Ec for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Aug 2022 21:31:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR1i2-0003N9-Cg for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 21:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58725) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR1i2-00088v-3t for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 21:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR1i1-0007Ug-VX for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 21:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Ki=C3=AAn_?= =?UTF-8?Q?Nguy=E1=BB=85n?= Quang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Aug 2022 01:31:01 +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.166139102628762 (code B ref 57386); Thu, 25 Aug 2022 01:31:01 +0000 Original-Received: (at 57386) by debbugs.gnu.org; 25 Aug 2022 01:30:26 +0000 Original-Received: from localhost ([127.0.0.1]:48474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR1hS-0007Tn-5L for submit@debbugs.gnu.org; Wed, 24 Aug 2022 21:30:26 -0400 Original-Received: from mail-ej1-f53.google.com ([209.85.218.53]:43897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR1hN-0007TN-Vl for 57386@debbugs.gnu.org; Wed, 24 Aug 2022 21:30:24 -0400 Original-Received: by mail-ej1-f53.google.com with SMTP id gb36so36699921ejc.10 for <57386@debbugs.gnu.org>; Wed, 24 Aug 2022 18:30:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=akC2R85AOvIF3ae8aZHhiOfh9iI9hlr1VF7Mf+y0H8I=; b=BcRd3fFWaIClRkafaJXOikG3TPlnIoJg8ZrmiRlCr92yHk1vhaziRTohvKcipb3h53 YtKmW1mk/EcjNLC5YFd9IcuZ3aXoWcxw+BAmDPeTk03e2Dm52TY3DxEIm1JZF7gJDBA3 0Uhfbqh4uzXRjGOr3Ge0iyKQdJrWsQ5E+m1Ww6jEx9RPdG5skCZP8bqxW2L6qW2ieQrO XaPXb+3sl1j/Aqij6Q8o03Icks/DjH+MteVTabReNYonkc/27QQkjOwmz6N+eSWixsMv MXFYt/Rioh6WvtMddSErqLrF+pB/EpPQFw5N4XFGvp1vrSiLpeXn1peW7RS18KaykQjK NL1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=akC2R85AOvIF3ae8aZHhiOfh9iI9hlr1VF7Mf+y0H8I=; b=iyjxZxOsnJ6m+ALs3E5Nx8VOhPMpdnNtpa3OSixsoVqMFoER2EqVN2DBfbgobkASFX 9vBpk27Zq5hhWSCdkYbKt+nIMlVv1d/gvgoRlhm14c8p1Q/DYkzQ3OrxCe15FCHyMUCq OPT224AQS+5VAKJQTR+PP5mjp3JJAt308x9mFJskklvQ3ywMm5jKhKPEWw3T5h6WbPwN 35MU9uH6c/W6SBVNwWWuoTAqC841m2os8vgEzlW6cJa+Yz3mzfKq+ijJUyDjNtCd+BiG 6GSyLEM6rOHfDhN+ZIRim23uVS7FCVk2bkilTw1UQ7GI+heQvs+gLTzRoYHerGB5ND6c /eew== X-Gm-Message-State: ACgBeo0FrAUOLXRimTifFHP6o1Z1jubd87Qfg+w+fjc04NDeWK2Flxeg Lx7GRG3xefdl4X6a/Y6DewbyqcDPU8cer5v8lGM= X-Google-Smtp-Source: AA6agR5T/Je7gxQQM1uHkzyy8BLuhtZVLbnp7G8itLSiyrAZtF7vmA1/Pfj01NfRNMA+mOdMMvPXqEMF4Bih+Hi807c= X-Received: by 2002:a17:907:209c:b0:731:27bb:da8c with SMTP id pv28-20020a170907209c00b0073127bbda8cmr906500ejb.555.1661391015874; Wed, 24 Aug 2022 18:30:15 -0700 (PDT) In-Reply-To: <83wnax4hw5.fsf@gnu.org> 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:240675 Archived-At: --00000000000055977205e706bd97 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable In my new patch, if we received the ERROR_INVALID_PARAMETER, we will try to create the symbolic link again without the new flag. Isn't that ok for now? The Windows version API has returned the same thing from the start of Windows 10 so we pretty much can't detect the Windows version by using it. Unless we read the information directly from the registry and parse it by ourselves, which is something I would like to avoid. On Thu, Aug 25, 2022 at 3:26 AM Eli Zaretskii wrote: > > From: Ki=C3=AAn Nguy=E1=BB=85n Quang > > Date: Thu, 25 Aug 2022 03:05:37 +0900 > > Cc: 57386@debbugs.gnu.org > > > > You're right, there's a stupid check against parameters on the version > that doesn't support the new flag. > > Since from Windows 10, the Windows version checking is not recommended > (and not accurate) anymore, I > > think we can just retry if the function is called with invalid > parameters. > > That will probably slow down the down-level Windows versions, but the > difference should not be too much. > > Unfortunately, invalid parameters could cause Emacs to abort, > depending on how it was linked. So I still think checking the version > of Windows is the way to go. That MS don't recommend that doesn't > mean we must abide by their recommendations. > --00000000000055977205e706bd97 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In my new patch, if we received the ERROR_INVALID_PAR= AMETER, we will try to create the symbolic link again without the new flag.=
Isn't that ok for now?
The Windows version API has= returned the same thing from the start of Windows 10 so we pretty much can= 't detect the Windows version by using it.
Unless we read the= information directly from the registry and parse it by ourselves, which is= something I would like to avoid.

On Thu, Aug 25, 2022 at 3:26 AM Eli Zarets= kii <eliz@gnu.org> wrote:
> From: Ki=C3=AAn Ng= uy=E1=BB=85n Quang <kien.n.quang@gmail.com>
> Date: Thu, 25 Aug 2022 03:05:37 +0900
> Cc: 57386@d= ebbugs.gnu.org
>
> You're right, there's a stupid check against parameters on the= version that doesn't support the new flag.
> Since from Windows 10, the Windows version checking is not recommended= (and not accurate) anymore, I
> think we can just retry if the function is called with invalid paramet= ers.
> That will probably slow down the down-level Windows versions, but the = difference should not be too much.

Unfortunately, invalid parameters could cause Emacs to abort,
depending on how it was linked.=C2=A0 So I still think checking the version=
of Windows is the way to go.=C2=A0 That MS don't recommend that doesn&#= 39;t
mean we must abide by their recommendations.

--00000000000055977205e706bd97--