2009/8/16 Rein Klazes <w...@online.nl>:
> @@ -3510,7 +3511,8 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, 
> PEXPLICIT_ACCESSW pEntries,
>             DWORD sid_size = FIELD_OFFSET(SID, 
> SubAuthority[SID_MAX_SUB_AUTHORITIES]);
>             DWORD domain_size = MAX_COMPUTERNAME_LENGTH + 1;
>             SID_NAME_USE use;
> -            if (!LookupAccountNameW(NULL, pEntries[i].Trustee.ptstrName, 
> ppsid[i], &sid_size, NULL, &domain_size, &use))
> +            if ( strcmpW( pEntries[i].Trustee.ptstrName, CURRENT_USER ) &&

What will the memory pointed to by ppsid[i] be set to in this case?
Hint: whatever the memory was last used for, not the SID of the
current user which is what is desired.

> +                    !LookupAccountNameW(NULL, pEntries[i].Trustee.ptstrName, 
> ppsid[i], &sid_size, NULL, &domain_size, &use))
>             {
>                 WARN("bad user name %s for trustee %d\n", 
> debugstr_w(pEntries[i].Trustee.ptstrName), i);
>                 ret = ERROR_INVALID_PARAMETER;

-- 
Rob Shearman


Reply via email to