oyranos-cms / oyranos

Colour Management System
https://gitlab.com/oyranos/oyranos
Other
18 stars 6 forks source link

detect windows privilegs #1

Closed beku closed 9 years ago

beku commented 9 years ago

Decide if to use system or user config DB to store values depending if a admin is loged in. Possible APIs might be PrivilegeCheck(), LookupPrivilegeValue(), GetTokenInformation().

beku commented 9 years ago

The current approach appears pretty hard. The PrivilegeCheck() way does not make a difference on Windows7. The currently implemented fopen("C:/Windows/oy_text.txt","w") is for all users possible. In Windows there is always the possibility that a member of a Admin group is not entitled for certain privileges. So a automatic check appears pretty fragile. Many internet forum threads point in that direction.

Adding explicit selectors for user or system scope to APIs appears the best approach ATM. This will include a broad API change, as many old behaviour and default APIs are affected. Many external projects will not work anymore. That is a big Con. Those are CompICC. ICC Examin, CinePaint, KolorServer, Synnefo and perhaps more. Pro:

beku commented 9 years ago

libOpenICC will be integrated to obtain canonical path names for installing.

Perhaps we drop XML support and switch to JSON format for the policy format. That will simplify policies as they will look like the upcoming DB format and are much easier to export/import.

beku commented 9 years ago

Added oySCOPE_e argument to DB setter functions in oyranos git. Projects need to update. So windows privileg detection is no more an issue as the apps and users can decide to which scope they want to write to.