Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

No one wants war. -- Kirk, "Errand of Mercy", stardate 3201.7


devel / comp.lang.python / Re: [Solved] Re: Windows registry PermissionError

SubjectAuthor
o Re: [Solved] Re: Windows registry PermissionErrorEryk Sun

1
Re: [Solved] Re: Windows registry PermissionError

<mailman.396.1652423844.20749.python-list@python.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=18257&group=comp.lang.python#18257

 copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: eryk...@gmail.com (Eryk Sun)
Newsgroups: comp.lang.python
Subject: Re: [Solved] Re: Windows registry PermissionError
Date: Fri, 13 May 2022 01:37:20 -0500
Lines: 22
Message-ID: <mailman.396.1652423844.20749.python-list@python.org>
References: <84e2a35c-3882-aaf5-a0a6-3efefc1ceb8d@dewhirst.com.au>
<CACL+1asQGepD+Lw7w9W-jiFUNYWLqRvZJ0uEufT5Ow1siJvJTg@mail.gmail.com>
<2e535898-3aaf-8904-017e-901acc88e8ad@dewhirst.com.au>
<CACL+1at=z_ni9CRqKi6CpHM7t9-zJ8Zgu=qTxt-wvbOU7W6sgQ@mail.gmail.com>
<678a8c64-4d6f-e96f-c890-5b429548d036@dewhirst.com.au>
<CACL+1au=bcMT0bVwjwNapZ4-ADL5-HgHAnd4qVeAu83vyxQYCw@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de 0yWbNeZrQYZaVoPSWNjdjQNHApW6GBaVGP8XqsY9on/w==
Return-Path: <eryksun@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=U/jaxn6m;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'parameter': 0.05;
'string': 0.07; 'subject:Windows': 0.07; 'cc:addr:python-list':
0.09; 'machines,': 0.09; 'subject:skip:P 10': 0.09; 'user.': 0.09;
'cc:no real name:2**0': 0.14; 'that.': 0.15; '"current': 0.16;
'accessed': 0.16; 'domain.': 0.16; 'eryk': 0.16; 'supported.':
0.16; 'targeting': 0.16; 'wrote:': 0.16; 'api': 0.17; 'probably':
0.17; 'pm,': 0.19; 'cc:addr:python.org': 0.20; 'all,': 0.20;
'subject:: [': 0.21; 'subject:] ': 0.21; 'machine': 0.22;
'cc:2**0': 0.25; "isn't": 0.27; 'assume': 0.32; 'message-
id:@mail.gmail.com': 0.32; 'unless': 0.32; "i'm": 0.33; 'skip:"
20': 0.34; 'header:In-Reply-To:1': 0.34; 'received:google.com':
0.34; 'running': 0.34; 'following': 0.35; 'from:addr:gmail.com':
0.35; 'using': 0.37; "it's": 0.37; 'received:209.85': 0.37;
'received:209': 0.39; 'should': 0.40; 'services': 0.61; 'initial':
0.61; 'skip:h 10': 0.61; 'remote': 0.63; 'key': 0.64; 'skip:r 20':
0.64; 'service': 0.64; 'well': 0.65; 'bear': 0.76; 'documented':
0.76; 'literally': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to
:cc; bh=C1eSrW8R81NIrcbHtvDuINbsBcQY5vsYx/z0eH5wIIY=;
b=U/jaxn6mGOcUpm3gUpn8JLiBxwRPSyQkCm1twZcncpK0BXFiXGC9bzdZooV8v/XGii
IMs4QMeGlTeMKF6exP+DCAMdk65a8MALVbUvIJEO1Cvx/oZstL3NFl9x9+oZI4IwkSwZ
CdMfOMaTXy37WRvaWdGevxDSlAfM+V7qbceso5G7ks+6XOjEfCManqaRBhvpLiWTi09U
PTQUU0GMOFX8qr0TyQH970kjhxer5A+zNxolwns+xi/+HLXLG27IuYyqHHKtuCQsmDRy
ePzs8TKF5K0PXUw26Yo0+omhvJMK+PSPje+8pfudO83/+hqNK6XKAWqy8HlVtnMldlsr
YSqg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:in-reply-to:references:from:date
:message-id:subject:to:cc;
bh=C1eSrW8R81NIrcbHtvDuINbsBcQY5vsYx/z0eH5wIIY=;
b=qYSkybiTAwxy8QnCrSpDpVvSBQNh+Nwf0MDAC12xSE9Am2X89PxFOaDYTRZ9BeUFXO
4I/93UFNEqPYNNG179natMgufQaEx2L4f4RHaeJCSmuGbnOi13XXBdICaOG0IQ9GFOpW
Hwp+8tINC3Q8TyYonx+jOwZ54lDm/IC9/wYcbumszTvtdIBcrIqXEJPGkMjxqDJ/VvfL
QyJumGqYEfc6UZpNIpzgajbnPXKJKQKEaECQzNNBMeBolj/xFQUxByeZADoeLAtq3rwg
dRngKhztXUj8hASqTqJytdo/JS3LzuREjjM2lY7mhi9DMXOjAxC7LLY3Fx/XTVHNBnD7
SHEQ==
X-Gm-Message-State: AOAM533w35GYA5KUiyB9AGzllNtJIwYBN4sqjlQbCc1rJLXtgCzgLCXt
1vy1JrHBfcyM8qoB038sDQpxvWWaM8/AmQ99AYqVWrzU
X-Google-Smtp-Source: ABdhPJx/n1rwaHXc29bBIGI+0MNRojAzqrukuyp0N3bQ4TowHM2mD++Rvd8KbuA1sQEGpRknFjGZuZ1QYIU08BUEc/M=
X-Received: by 2002:a17:902:b906:b0:14f:76a0:ad48 with SMTP id
bf6-20020a170902b90600b0014f76a0ad48mr3368157plb.79.1652423841123; Thu, 12
May 2022 23:37:21 -0700 (PDT)
In-Reply-To: <678a8c64-4d6f-e96f-c890-5b429548d036@dewhirst.com.au>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CACL+1au=bcMT0bVwjwNapZ4-ADL5-HgHAnd4qVeAu83vyxQYCw@mail.gmail.com>
X-Mailman-Original-References: <84e2a35c-3882-aaf5-a0a6-3efefc1ceb8d@dewhirst.com.au>
<CACL+1asQGepD+Lw7w9W-jiFUNYWLqRvZJ0uEufT5Ow1siJvJTg@mail.gmail.com>
<2e535898-3aaf-8904-017e-901acc88e8ad@dewhirst.com.au>
<CACL+1at=z_ni9CRqKi6CpHM7t9-zJ8Zgu=qTxt-wvbOU7W6sgQ@mail.gmail.com>
<678a8c64-4d6f-e96f-c890-5b429548d036@dewhirst.com.au>
 by: Eryk Sun - Fri, 13 May 2022 06:37 UTC

On 5/13/22, Mike Dewhirst <miked@dewhirst.com.au> wrote:
> On 13/05/2022 4:14 pm, Eryk Sun wrote:
>> Since self.connect() is always called, you should document that the
>> initial hkey parameter has to be one of the following predefined key
>> handles:
>>
>> HKEY_LOCAL_MACHINE
>> HKEY_USERS
>
> I'm targeting HKEY_CURRENT_USER so I assume HK_USERS includes that.

Using HKEY_CURRENT_USER with RegConnectRegistryW() to access a remote
registry isn't well defined and not documented as supported. If it
works at all, the API probably just opens a subkey of the remote
HKEY_USERS based on the string SID (security identifier string) of the
current user. That may fail as not found since user SIDs are unique to
machines, unless it's on a domain.

Bear in mind that the remote registry service is running on the remote
machine as SYSTEM (S-1-5-18) in the non-interactive services session.
If it literally accessed its "current user", then it would open
"HKEY_USERS\S-1-5-18".

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor