-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make "HOME" directory configurable for certstore and registry #113
Comments
@mfleisz I fail to see, except very customized embedded OSs, where HOME wouldn't be set. What is the use case in this issue? If this is very specific to embedded stuff (which I am affected as well) I'd prefer to move this to 1.1 if noone objects. |
Not just embedded systems will cause problems - no Windows-based system has "HOME" set by default. In it's current state the core is unusable on anything other than a non-embedded *nix platform as it simply crashes when getenv("HOME") fails. |
Yes, windows is indeed a problem. The urgency of this issue depends if we're going to support Windows for 1.0 or not. |
@otavio: I did some work over the last couple of days to push the Windows port forward. I'll handle the configurable home issue, if it's not for Windows, it'll be for something else. ~/.freerdp is usually good for Linux and the BSDs, but then when you get out of those it's usually case by case for what's preferred. |
...and pushed. Now if you set settings->home_path to something other than NULL (NULL by default), both the certstore and registry will use that value instead of calling getenv("HOME"). |
Thx Marc-Andre, however the fix is not complete - get_local_certloc (called from x509_verify_cert in crypto.c) is still using getenv("HOME") (and later on seg faulting in strlen if HOME is not set) ... |
@mfleisz: now it should be fixed as well |
Awesome - thx :) |
Currently certstore and registry use getenv("HOME") to get a writable location for data files. On Platforms where HOME is not correctly set in the environment this will cause both data stores to fail (i.e. in case HOME is not set certstore will SEGFAULT at line 71 in certstore.c).
The best solution would be to allow the UI front end to override the "home" directory in the settings and if present, this setting is used by all data store helpers instead of getenv(HOME).
The text was updated successfully, but these errors were encountered: