Closed beku closed 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:
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.
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.
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().