return dom_sid_equal(sid, &null_sid);
}
+/**
+ * Return true if an array of SIDs contains a certain SID.
+ *
+ * @param [in] sids The SID array.
+ * @param [in] num_sids The size of the SID array.
+ * @param [in] sid The SID in question.
+ * @returns true if the array contains the SID.
+ */
+bool sids_contains_sid(const struct dom_sid *sids,
+ const uint32_t num_sids,
+ const struct dom_sid *sid)
+{
+ uint32_t i;
+
+ for (i = 0; i < num_sids; i++) {
+ if (dom_sid_equal(&sids[i], sid)) {
+ return true;
+ }
+ }
+ return false;
+}
+
/**
* Return true if an array of auth_SidAttr contains a certain SID with certain
* attributes.