git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
608d24f
)
r21307: make it possible to pass in NULL for domain or rid,
author
Stefan Metzmacher
<metze@samba.org>
Tue, 13 Feb 2007 09:27:56 +0000
(09:27 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 19:48:08 +0000
(14:48 -0500)
if someone isn't interessted in one of it
metze
source/libcli/security/dom_sid.c
patch
|
blob
|
history
diff --git
a/source/libcli/security/dom_sid.c
b/source/libcli/security/dom_sid.c
index 54242eb515172f7af812d115b4be4b56dcb0c7f2..a72588dee1d8023cadbdda978fcfd3e917a0a954 100644
(file)
--- a/
source/libcli/security/dom_sid.c
+++ b/
source/libcli/security/dom_sid.c
@@
-225,12
+225,18
@@
NTSTATUS dom_sid_split_rid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
return NT_STATUS_INVALID_PARAMETER;
}
- if (!(*domain = dom_sid_dup(mem_ctx, sid))) {
- return NT_STATUS_NO_MEMORY;
+ if (domain) {
+ if (!(*domain = dom_sid_dup(mem_ctx, sid))) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ (*domain)->num_auths -= 1;
+ }
+
+ if (rid) {
+ *rid = sid->sub_auths[sid->num_auths - 1];
}
- (*domain)->num_auths -= 1;
- *rid = (*domain)->sub_auths[(*domain)->num_auths];
return NT_STATUS_OK;
}