summaryrefslogtreecommitdiff
path: root/source4/libcli/security
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-08-22 17:37:43 +1000
committerAndrew Tridgell <tridge@samba.org>2008-08-22 17:37:43 +1000
commit0a27ff953e17670aecc7aedb56c0f872cc4bb75d (patch)
tree18ed167d94e1a50acf04bc22fc6d8f01bf7f1a5f /source4/libcli/security
parent8acc7f7da7718c7750387c1043391618be46e15b (diff)
parentcc43037f19056ed24d7fffa54456d597c63ad105 (diff)
downloadsamba-0a27ff953e17670aecc7aedb56c0f872cc4bb75d.tar.gz
samba-0a27ff953e17670aecc7aedb56c0f872cc4bb75d.tar.bz2
samba-0a27ff953e17670aecc7aedb56c0f872cc4bb75d.zip
Merge branch 'abartlet-4-0-local' into v4-0-test
(This used to be commit 469fac2669991b130dec219e1a109a8b2ce224be)
Diffstat (limited to 'source4/libcli/security')
-rw-r--r--source4/libcli/security/dom_sid.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/libcli/security/dom_sid.c b/source4/libcli/security/dom_sid.c
index f5457e7e0e..1a7519e362 100644
--- a/source4/libcli/security/dom_sid.c
+++ b/source4/libcli/security/dom_sid.c
@@ -152,6 +152,21 @@ struct dom_sid *dom_sid_parse_talloc(TALLOC_CTX *mem_ctx, const char *sidstr)
}
/*
+ convert a string to a dom_sid, returning a talloc'd dom_sid
+*/
+struct dom_sid *dom_sid_parse_length(TALLOC_CTX *mem_ctx, const DATA_BLOB *sid)
+{
+ struct dom_sid *ret;
+ char *p = talloc_strndup(mem_ctx, sid->data, sid->length);
+ if (!p) {
+ return NULL;
+ }
+ ret = dom_sid_parse_talloc(mem_ctx, p);
+ talloc_free(p);
+ return ret;
+}
+
+/*
copy a dom_sid structure
*/
struct dom_sid *dom_sid_dup(TALLOC_CTX *mem_ctx, const struct dom_sid *dom_sid)