Opened 7 years ago
Last modified 7 years ago
#11660 new Bugs
interprocess::winapi::get_last_bootup_time(std::string &stamp) fails, resulting in bad IPC name
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | bootup time | Cc: |
Description
Using interprocess::managed_shared_memory fails on Windows 7 in restricted environments (i.e. running under IIS/AppPool). It fails to create IPC primites properly, even if an administrator account is being impersonated. It doesn't fail if running a regular process as the IIS/AppPool user. It fails in that the shared memory object created doesn't have the intended name, and when boost interprocess attempts to open the primitive in another process it fails, do to file name discrepancies.
Specifically, interprocess::winapi::get_last_bootup_time(std::string &stamp) fails to retrieve the bootup time, as a consequence of failing to open the system log file (GetLastError() produces ERROR_ACCESS_DENIED) and instead produces an empty string. This does not occur in the other process.
The attached alternate implementation for getting a bootup time is working for me in the above scenario.
Attachments (1)
Change History (3)
by , 7 years ago
Attachment: | stable_get_last_bootup_time.hpp added |
---|
comment:1 by , 7 years ago
This issue also happens if execute this function with Windows 8 built-in Guest account, and the attached alternate implementation works for me either.
comment:2 by , 7 years ago
After doing more test, I've found that attached alternate implementation has precision issue, that's, the boot-up time may sometimes not the same.
Alternate implementation