开发者

Comparing 2 string format SIDs

Can I compare 2 string-format SIDs for equality?

As per my understanding, a Group SID is a unique identifier in an Active Directory forest, so the string that I get by using ConvertSidToStringSid will also be unique and can thus be compared to any other Group SID (string format) by using strin开发者_开发技巧g comparison functions?


AFAIK the answer is "yes as long as you're using case insensitive comparison".

However, if I were you I'd consider using the EqualSid API to compare them as binary, and only convert them to string to show to the end user of your software.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜