From: Oliver Kurth Date: Tue, 24 Oct 2017 21:07:35 +0000 (-0700) Subject: VGAuth changes: X-Git-Tag: stable-10.3.0~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5c64af227b2eea0f23f2c8f3cf40c5d24c8548f;p=thirdparty%2Fopen-vm-tools.git VGAuth changes: - add calling LoadUserProfile()/UnloadUserProfile() in VGAuth impersonation/unimpersonation code paths - VMTools side code change to use the new VGAuth SDK. --- diff --git a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c index c259a3b25..2c3e023de 100644 --- a/open-vm-tools/services/plugins/vix/vixTools.c +++ b/open-vm-tools/services/plugins/vix/vixTools.c @@ -11376,6 +11376,10 @@ GuestAuthPasswordAuthenticateImpersonate( VGAuthContext *ctx = NULL; VGAuthError vgErr; VGAuthUserHandle *newHandle = NULL; + VGAuthExtraParams extraParams[1]; + + extraParams[0].name = VGAUTH_PARAM_LOAD_USER_PROFILE; + extraParams[0].value = VGAUTH_PARAM_VALUE_TRUE; err = VixMsg_DeObfuscateNamePassword(obfuscatedNamePassword, &username, @@ -11400,7 +11404,9 @@ GuestAuthPasswordAuthenticateImpersonate( goto done; } - vgErr = VGAuth_Impersonate(ctx, newHandle, 0, NULL); + vgErr = VGAuth_Impersonate(ctx, newHandle, + (int)ARRAYSIZE(extraParams), + extraParams); if (VGAUTH_FAILED(vgErr)) { err = VixToolsTranslateVGAuthError(vgErr); goto done; @@ -11460,6 +11466,10 @@ GuestAuthSAMLAuthenticateAndImpersonate( VGAuthContext *ctx = NULL; VGAuthError vgErr; VGAuthUserHandle *newHandle = NULL; + VGAuthExtraParams extraParams[1]; + + extraParams[0].name = VGAUTH_PARAM_LOAD_USER_PROFILE; + extraParams[0].value = VGAUTH_PARAM_VALUE_TRUE; err = VixMsg_DeObfuscateNamePassword(obfuscatedNamePassword, &token, @@ -11540,7 +11550,9 @@ GuestAuthSAMLAuthenticateAndImpersonate( #if ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS impersonate: #endif - vgErr = VGAuth_Impersonate(ctx, newHandle, 0, NULL); + vgErr = VGAuth_Impersonate(ctx, newHandle, + (int)ARRAYSIZE(extraParams), + extraParams); if (VGAUTH_FAILED(vgErr)) { err = VixToolsTranslateVGAuthError(vgErr); goto done;