Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RMS and user impersonation

17 views
Skip to first unread message

Baruch

unread,
Apr 14, 2010, 7:02:01 AM4/14/10
to
Hi all,

I'm developing an RMS aware application that can protectes office files
using the AD RMS SDK.
It all works fine, but I'm having some difficulties with user impersonation.

The impersonation succeeds, however when trying to activate the user, i get
an error that the machie needs activation even though it was activiated right
before.
Furthermore, event after activating the machine and than calling
DRMIsActivated with DRM_ACTIVATE_MACHINE, it returns
E_DRM_NEEDS_MACHINE_ACTIVATION.

I'm also creating the client session with the corect user id of the user
being impersonated.

I'm doing the impersonation using LognUser and ImpersonateLoggedOnUser:

/////////////////////////
HANDLE token;
BOOL res = LogonUser( L"MyUser",
L"MyDomain",
L"MyPassword",
LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_DEFAULT,
&token ) );

if( S_OK == res )
{
res = ::ImpersonateLoggedOnUser( token ) );

if( S_OK == res )
{
//Continue here...
}
}

//////////////////////////

Without impersonation everyting works fine.
Do you know how exactly i can combine RMS and user impersonation?
From looking at Office applications suce as Word, it seems possible to
impersonate and restrict permission as other user.

Best regards,
Baruch

Baruch

unread,
Apr 25, 2010, 8:55:01 AM4/25/10
to
Any input?
0 new messages