summaryrefslogtreecommitdiff
path: root/source3/lib/util_sid.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_sid.c')
-rw-r--r--source3/lib/util_sid.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index 17af94a79c..9ca3a59ad4 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -176,3 +176,16 @@ BOOL sid_equal(DOM_SID *sid1, DOM_SID *sid2)
return True;
}
+
+
+/*****************************************************************
+ calculates size of a sid
+*****************************************************************/
+int sid_size(DOM_SID *sid)
+{
+ if (sid == NULL)
+ {
+ return 0;
+ }
+ return sid->num_auths * sizeof(uint32) + 8;
+}