* Re: [PATCH setup] Add new option --chown-admin [not found] ` <cc769e09-6a2b-ccdd-12f6-0f596e25d7d9@t-online.de> @ 2022-07-08 14:38 ` Jon Turney 2022-07-09 12:21 ` Christian Franke 0 siblings, 1 reply; 2+ messages in thread From: Jon Turney @ 2022-07-08 14:38 UTC (permalink / raw) To: The Cygwin Mailing List, Christian Franke On 07/07/2022 15:45, Christian Franke wrote: > Jon Turney wrote: >> On 06/07/2022 17:34, Christian Franke wrote: >>> Jon Turney wrote: >>>> On 06/07/2022 08:14, Christian Franke wrote: [...] >>>>> >>>>> BTW: 'nt_sec.setDefaultSecurity (isAdmin)' is never called with >>>>> 'isAdmin==true' as 'root_scope' is always 0. >>>> >>>> root_scope is set later, by the "Install For" option on the "Select >>>> Root Install Directory" page. >>>> >>>> To me, this looks like a (very long standing) bug that we shouldn't >>>> be calling setAdminGroup() here, but after root_scope has been set. >>> >>> If this bug is very old, I'm not sure whether this should be fixed. >>> Setting admin group to files which are owned "only" by current user >>> is possibly not very effective. >> >> It's true that some people might be relying on that buggy behaviour. > > I have one very old Cygwin installation from Win7 times. Very old > installed files still have group="Administrator", newer files have > group="None". The timestamps suggest that the regression was introduced > early in 2012. The first file with group="None" is from March 2 2012. Hmm... [1] seems like the obvious suspect for the change responsible for that, but I don't immediately see how... [1] https://cygwin.com/git/?p=cygwin-apps/setup.git;a=commitdiff;h=befc9dd806824f22ebb740be96ba8c0ae8f63bb4;hp=34d534a6d74e5516d6691fb1d9cb6309682afa0b ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH setup] Add new option --chown-admin 2022-07-08 14:38 ` [PATCH setup] Add new option --chown-admin Jon Turney @ 2022-07-09 12:21 ` Christian Franke 0 siblings, 0 replies; 2+ messages in thread From: Christian Franke @ 2022-07-09 12:21 UTC (permalink / raw) To: The Cygwin Mailing List Jon Turney wrote: > On 07/07/2022 15:45, Christian Franke wrote: >> Jon Turney wrote: >>> On 06/07/2022 17:34, Christian Franke wrote: >>>> Jon Turney wrote: >>>>> On 06/07/2022 08:14, Christian Franke wrote: > [...] >>>>>> >>>>>> BTW: 'nt_sec.setDefaultSecurity (isAdmin)' is never called with >>>>>> 'isAdmin==true' as 'root_scope' is always 0. >>>>> >>>>> root_scope is set later, by the "Install For" option on the >>>>> "Select Root Install Directory" page. >>>>> >>>>> To me, this looks like a (very long standing) bug that we >>>>> shouldn't be calling setAdminGroup() here, but after root_scope >>>>> has been set. >>>> >>>> If this bug is very old, I'm not sure whether this should be fixed. >>>> Setting admin group to files which are owned "only" by current user >>>> is possibly not very effective. >>> >>> It's true that some people might be relying on that buggy behaviour. >> >> I have one very old Cygwin installation from Win7 times. Very old >> installed files still have group="Administrator", newer files have >> group="None". The timestamps suggest that the regression was >> introduced early in 2012. The first file with group="None" is from >> March 2 2012. > > Hmm... [1] seems like the obvious suspect for the change responsible > for that, but I don't immediately see how... > > [1] > https://cygwin.com/git/?p=cygwin-apps/setup.git;a=commitdiff;h=befc9dd806824f22ebb740be96ba8c0ae8f63bb4;hp=34d534a6d74e5516d6691fb1d9cb6309682afa0b > Hmm... correct as this change moves UserSettings ctor behind setDefaultSecurity (): Old version 34d534a: ... UserSettings Settings (local_dir); ... nt_sec.setDefaultSecurity (); ... Main.WindowCreate() New version befc9dd: ... nt_sec.setDefaultSecurity (); ... UserSettings Settings (local_dir); ... Main.WindowCreate() The UserSettings ctor has a somewhat hidden side effect which sets root_scope correctly: UserSettings::UserSettings(...); open_settings("setup.rc", ...); io_stream::open("cygfile:///etc/setup/setup.rc", ...); io_stream_cygfile::io_stream_cygfile("/etc/setup/setup.rc", ...); get_root_dir_now(); read_mounts(""); read_mounts_nt(""); root_scope = isuser ? IDC_ROOT_USER : IDC_ROOT_SYSTEM; Conclusion: Regression introduced Feb 24, 2012 (befc9dd). ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-09 12:21 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <3096f251-d7ca-073b-d7d7-751b7fe3e8c1@t-online.de> [not found] ` <405df5c6-ce47-0254-ae4d-4a23ff3533d5@dronecode.org.uk> [not found] ` <e7e0a117-1f85-a59c-5654-010652be5044@t-online.de> [not found] ` <5b45ccdc-da32-ff11-037f-c00828f397c5@dronecode.org.uk> [not found] ` <cc769e09-6a2b-ccdd-12f6-0f596e25d7d9@t-online.de> 2022-07-08 14:38 ` [PATCH setup] Add new option --chown-admin Jon Turney 2022-07-09 12:21 ` Christian Franke
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).