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:
Biswapriyo Nath
2025-03-10 15:52:26 +00:00
parent f2b8876eb5
commit 3ad7db1b75

View File

@@ -47,10 +47,8 @@ using mozilla::dom::Promise;
# define SECURITY_WIN32
# include <security.h>
# include <shlwapi.h>
# if !defined(__MINGW32__)
# include <Lm.h>
# include <lm.h>
# undef ACCESS_READ // nsWindowsRegKey defines its own ACCESS_READ
# endif // !defined(__MINGW32__)
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() {