From: Oliver Kurth Date: Tue, 18 Dec 2018 21:19:46 +0000 (-0800) Subject: Changes to common source files not applicable to open-vm-tools. X-Git-Tag: stable-11.0.0~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e03c5b88c6e42a3bf395ad647544ae113e83779c;p=thirdparty%2Fopen-vm-tools.git Changes to common source files not applicable to open-vm-tools. --- diff --git a/open-vm-tools/vgauth/lib/impersonate.c b/open-vm-tools/vgauth/lib/impersonate.c index 3d2048804..d453b6bf6 100644 --- a/open-vm-tools/vgauth/lib/impersonate.c +++ b/open-vm-tools/vgauth/lib/impersonate.c @@ -115,7 +115,7 @@ VGAuth_CreateHandleForUsername(VGAuthContext *ctx, #ifdef _WIN32 newHandle->token = token; - newHandle->hProfile = NULL; + newHandle->hProfile = INVALID_HANDLE_VALUE; #endif newHandle->refCount = 1; diff --git a/open-vm-tools/vgauth/public/VGAuthAuthentication.h b/open-vm-tools/vgauth/public/VGAuthAuthentication.h index f578c60aa..3a5c34718 100644 --- a/open-vm-tools/vgauth/public/VGAuthAuthentication.h +++ b/open-vm-tools/vgauth/public/VGAuthAuthentication.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2017 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2018 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -80,9 +80,22 @@ VGAuthError VGAuth_UserHandleUsername(VGAuthContext *ctx, char **userName); // OUT #ifdef _WIN32 +/* + * Special accessor functions for Windows to set and get user and + * profile handles. + */ + VGAuthError VGAuth_UserHandleAccessToken(VGAuthContext *ctx, VGAuthUserHandle *handle, HANDLE *authToken); + +VGAuthError VGAuth_UserHandleGetUserProfile(VGAuthContext *ctx, + VGAuthUserHandle *handle, + HANDLE *hProfile); + +VGAuthError VGAuth_UserHandleSetUserProfile(VGAuthContext *ctx, + VGAuthUserHandle *handle, + HANDLE hProfile); #endif