| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; q=dns; s= | |
| default; b=G5Iw6aD2oJSqNZUq5n3n3tDd3yb+uSEj7ldvj8AuPssfvZDCYjBNR | |
| olN2J4QlPBEucNnQ4y+wtHOY1KAnyjtF+gUd/spRDYwiJSql7rB8L72CwcV6sWvb | |
| n7KHS1Gj1hX7F2xsnqphOdqIBI8zx9B9DQOQsDHmvQKZ6nL6rCJoOg= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; s=default; | |
| bh=kRpSdtDnUk75Qde5xNCrF4I3jsg=; b=LVAZObipqCukpATubdQBGzHnCIO7 | |
| 6B6wMavBBtextij8SUKUmjdw7SKB/02E4LDzFdhLMz1ovTbK/eUN9GyyJLwa6QMj | |
| J/tmTZFz4bptIXxz4D/xzktLx1BXQXUaxSHp3aJXwXbjcQGbfoSKxLAEz3kt+R9u | |
| R67msaOkrzjGiTA= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-4.7 required=5.0 tests=AWL,BAYES_05,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 |
| X-HELO: | calimero.vinschen.de |
| Date: | Fri, 11 Sep 2015 13:10:12 +0200 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Group Permissions on root folders problem (Windows 10 TP build 10061) |
| Message-ID: | <20150911111012.GF26699@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <CAMH9mcFEL3mao+m-DEYM84kC1HOPeSBpZXD+mDf0USobF9oY7g AT mail DOT gmail DOT com> <CAMH9mcFOKjvjiFvvk1ju0ZxBDK28MaktdnYwj5_CjvbgnpVO4A AT mail DOT gmail DOT com> <20150616155843 DOT GE31537 AT calimero DOT vinschen DOT de> <20150905155916 DOT 8403bea8d4f631c1f7a314e3 AT nifty DOT ne DOT jp> <20150906114444 DOT GA27066 AT calimero DOT vinschen DOT de> <20150911190414 DOT e77404dc09587954644ab65d AT nifty DOT ne DOT jp> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <20150911190414.e77404dc09587954644ab65d@nifty.ne.jp> |
| User-Agent: | Mutt/1.5.23 (2014-03-12) |
--f61P+fpdnY2FZS1u
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi Takashi,
On Sep 11 19:04, Takashi Yano wrote:
> Hi Corinna,
>=20
> Regarding the first problem:
> > > a) Group permissions on root folders
>=20
> On Sun, 6 Sep 2015 13:44:44 +0200
> Corinna Vinschen wrote:
> > The group permission problem is easy (and I'm wondering if it really was
> > such a bright idea to let user SID =3D=3D group SID slip through in Cyg=
win,
> > rather tnan sticking to the former idea to change the group SID to
> > "Users" in this case). csih needs a patch to not check for the group
> > x bit if user SID =3D=3D group SID.
>=20
> Do you intend a patch like this? I have confirmed that sshd
> is successfully installed and works nicely with this patch
> under a Microsoft Account.
>=20
> --- cygwin-service-installation-helper.sh.orig 2015-02-24 04:57:56.000000=
000 +0900
> +++ cygwin-service-installation-helper.sh 2015-09-11 18:41:56.870882800 +=
0900
> @@ -2442,6 +2442,8 @@
> # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> _csih_setup()
> {
> + local perms=3D"d..x..x..[xt]"
> +
> csih_stacktrace "${@}"
> $_csih_trace
> if [ "$_csih_setup_already_called" -eq 0 ]
> @@ -2462,7 +2464,13 @@
> csih_error "Problem with LocalSystem or Adminstrator IDs"
> fi
>=20=20
> - if ! csih_check_dir_perms "${LOCALSTATEDIR}" "d..x..x..[xt]"
> + if [ `/usr/bin/stat -c '%g' ${LOCALSTATEDIR}` -eq \
> + `/usr/bin/stat -c '%u' ${LOCALSTATEDIR}` ]
> + then
> + perms=3D"d..x.....[xt]"
> + fi
> +
> + if ! csih_check_dir_perms "${LOCALSTATEDIR}" "${perms}"
> then
> csih_error "Problem with ${LOCALSTATEDIR} directory. Exiting."
> fi
In theory, yes. The problem is just that checking the uid/gid equality
is not safe, given that you can easily create that via passwd/group
files. What I was thinking of is to convert the uid/gid values into
SIDs using the `getent' tool and to compare those, along the lines of
uid=3D$(/usr/bin/stat -c '%u')
user_sid=3D$(getent passwd -w $uid | awk -F: '{print $4}')
gid=3D$(/usr/bin/stat -c '%g')
grp_sid=3D$(getent group -w $gid | awk -F: '{print $4}')
if [ "${user_sid}" =3D "${grp_sid}" ]
...
Can you check if that works in your env and perhaps create a new patch
using the SIDs?
Thanks a lot,
Corinna
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--f61P+fpdnY2FZS1u
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJV8raUAAoJEPU2Bp2uRE+g2I8P/1JHS7JVQFNp26P0+xrmCntf
HhEP0jlC1OvEj1w9IU1NrU7l39tWm7Mqu7Q0e6zEaqJsmkEUgkXwbJlqZGnxoe9G
wPQqXNwap9530q390zHuptq66lR/qfw/dUjaBNa4F00KzvwBQn9wlBn20WmRhcb3
cOd+X5HV2+TlXDQ4VKbQX9hkgFngDg0TJMhCjF79amZu5Q9DqHzYG1f5O+LeDMy/
pD8XH4DiUc3XOKL5j592ichODf0Z5L25TQveU7oYD8RAQ8aC9jmMvDn5L3CKEas5
keSleH/c58Cq9BfzTuRpeECs+Xa875rxHJcmnYmfVbSPQtSu4q+c6zfGGWYRpyOA
pzMu5euwQIza5/Mvn6lLthY+COWlfp2aZHH+6pd7c/cZLxyn850QtyFtDTAoDZPj
W0zqcAohJQ03Rw9nWg0bn/6tOYgNM4BKFJmz7HAC2P8LO6eLIHYbgXhr0uMdb290
Bacg//SNjYoy+CizZJtarx4Z8lZU7EXeACL1EMMIJSRQ1esnj7dD4vybDzoYhcME
p0cmN8JsVc4iqqYcAa4KXgDHtJ1AJgjUQg5u6BLWqltj0SytXnzDeJyKS+3vqe4h
wIpPCfWlX4IaoDNCBsicKiHSHhiLezq0zMm/ilM8GVgYDMUZsu42MpJaJgCsDw7b
hL1YNwh0A3GCjLh2SmtH
=G83a
-----END PGP SIGNATURE-----
--f61P+fpdnY2FZS1u--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |