Bug 1952891: Remove mingw condition to get the password change time r=tjr
This removes the condition added in https://phabricator.services.mozilla.com/D72426 Differential Revision: https://phabricator.services.mozilla.com/D240744
This commit is contained in:
@@ -47,10 +47,8 @@ using mozilla::dom::Promise;
|
||||
# define SECURITY_WIN32
|
||||
# include <security.h>
|
||||
# include <shlwapi.h>
|
||||
# if !defined(__MINGW32__)
|
||||
# include <Lm.h>
|
||||
# undef ACCESS_READ // nsWindowsRegKey defines its own ACCESS_READ
|
||||
# endif // !defined(__MINGW32__)
|
||||
# include <lm.h>
|
||||
# undef ACCESS_READ // nsWindowsRegKey defines its own ACCESS_READ
|
||||
struct HandleCloser {
|
||||
typedef HANDLE pointer;
|
||||
void operator()(HANDLE h) {
|
||||
@@ -118,10 +116,6 @@ std::unique_ptr<char[]> GetUserTokenInfo() {
|
||||
}
|
||||
|
||||
Maybe<int64_t> GetPasswordLastChanged(const WCHAR* username) {
|
||||
# if defined(__MINGW32__)
|
||||
// NetUserGetInfo requires Lm.h which is not provided in MinGW builds
|
||||
return mozilla::Nothing();
|
||||
# else
|
||||
LPUSER_INFO_1 user_info = NULL;
|
||||
DWORD passwordAgeInSeconds = 0;
|
||||
|
||||
@@ -139,7 +133,6 @@ Maybe<int64_t> GetPasswordLastChanged(const WCHAR* username) {
|
||||
// Return the time that the password was changed so we can use this
|
||||
// for future comparisons.
|
||||
return mozilla::Some(PR_Now() - passwordAgeInSeconds * PR_USEC_PER_SEC);
|
||||
# endif
|
||||
}
|
||||
|
||||
bool IsAutoAdminLogonEnabled() {
|
||||
|
||||
Reference in New Issue
Block a user