diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-09-03 10:57:01 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-09-03 13:40:00 +0200 |
commit | 5b0e0acc819dedba3ef631e66be6c632fdf23e77 (patch) | |
tree | 83e1cefb5aa86e34e6330265f55d17ea72c3d17b /source4/auth/ntlm | |
parent | 14ffb7d699df450a4fc5fc362cec7f804cae922b (diff) | |
download | samba-5b0e0acc819dedba3ef631e66be6c632fdf23e77.tar.gz samba-5b0e0acc819dedba3ef631e66be6c632fdf23e77.tar.bz2 samba-5b0e0acc819dedba3ef631e66be6c632fdf23e77.zip |
s4:auth_winbind: fix compiler warnings
metze
Diffstat (limited to 'source4/auth/ntlm')
-rw-r--r-- | source4/auth/ntlm/auth_winbind.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source4/auth/ntlm/auth_winbind.c b/source4/auth/ntlm/auth_winbind.c index 51a1f4d41f..f680bcbf7f 100644 --- a/source4/auth/ntlm/auth_winbind.c +++ b/source4/auth/ntlm/auth_winbind.c @@ -62,6 +62,11 @@ static NTSTATUS get_info3_from_wbcAuthUserInfo(TALLOC_CTX *mem_ctx, { int i, j; struct samr_RidWithAttribute *rids = NULL; + struct dom_sid *user_sid; + struct dom_sid *group_sid; + + user_sid = (struct dom_sid *)(void *)&info->sids[0].sid; + group_sid = (struct dom_sid *)(void *)&info->sids[1].sid; info3->base.last_logon = info->logon_time; info3->base.last_logoff = info->logoff_time; @@ -101,10 +106,10 @@ static NTSTATUS get_info3_from_wbcAuthUserInfo(TALLOC_CTX *mem_ctx, return NT_STATUS_INVALID_PARAMETER; } - dom_sid_split_rid(mem_ctx, (struct dom_sid2 *) &info->sids[0].sid, + dom_sid_split_rid(mem_ctx, user_sid, &info3->base.domain_sid, &info3->base.rid); - dom_sid_split_rid(mem_ctx, (struct dom_sid2 *) &info->sids[1].sid, NULL, + dom_sid_split_rid(mem_ctx, group_sid, NULL, &info3->base.primary_gid); /* We already handled the first two, now take care of the rest */ @@ -115,9 +120,11 @@ static NTSTATUS get_info3_from_wbcAuthUserInfo(TALLOC_CTX *mem_ctx, NT_STATUS_HAVE_NO_MEMORY(rids); for (i = 2, j = 0; i < info->num_sids; ++i, ++j) { + struct dom_sid *tmp_sid; + tmp_sid = (struct dom_sid *)(void *)&info->sids[1].sid; + rids[j].attributes = info->sids[i].attributes; - dom_sid_split_rid(mem_ctx, - (struct dom_sid2 *) &info->sids[i].sid, + dom_sid_split_rid(mem_ctx, tmp_sid, NULL, &rids[j].rid); } info3->base.groups.rids = rids; |