Ensure that only parse_prs.c access internal members of the prs_struct.
[samba.git] / source3 / auth / auth_winbind.c
index c6a1727ebeaf90e69c4a4be6c9ac997d56053d5b..5e1567d3c1975dc3adbe1cdceaa679948e5f1328 100644 (file)
@@ -36,8 +36,8 @@ static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct winbindd_response
                if (!prs_init(&ps, len, mem_ctx, UNMARSHALL)) {
                        return NT_STATUS_NO_MEMORY;
                }
-               prs_append_data(&ps, info3_ndr, len);
-               ps.data_offset = 0;
+               prs_copy_data_in(&ps, info3_ndr, len);
+               prs_set_offset(&ps,0);
                if (!net_io_user_info3("", info3, &ps, 1, 3)) {
                        DEBUG(2, ("get_info3_from_ndr: could not parse info3 struct!\n"));
                        return NT_STATUS_UNSUCCESSFUL;
@@ -127,9 +127,8 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context,
 /* module initialisation */
 NTSTATUS auth_init_winbind(struct auth_context *auth_context, const char *param, auth_methods **auth_method) 
 {
-       if (!make_auth_methods(auth_context, auth_method)) {
+       if (!make_auth_methods(auth_context, auth_method))
                return NT_STATUS_NO_MEMORY;
-       }
 
        (*auth_method)->name = "winbind";
        (*auth_method)->auth = check_winbind_security;