Lines Matching refs:lsa_handle

155     mlsvc_handle_t *lsa_handle)
161 rc = ndr_rpc_bind(lsa_handle, server, domain, username, "LSARPC");
168 arg.servername = ndr_rpc_derive_nbhandle(lsa_handle, server);
170 ndr_rpc_unbind(lsa_handle);
176 if (ndr_rpc_server_os(lsa_handle) == NATIVE_OS_WIN2000) {
185 if ((rc = ndr_rpc_call(lsa_handle, opnum, &arg)) != 0) {
186 ndr_rpc_unbind(lsa_handle);
193 (void) memcpy(&lsa_handle->handle, &arg.domain_handle,
196 if (ndr_is_null_handle(lsa_handle))
200 ndr_rpc_release(lsa_handle);
203 ndr_rpc_unbind(lsa_handle);
210 * Obtain an LSA account handle. The lsa_handle must be a valid handle
219 lsar_open_account(mlsvc_handle_t *lsa_handle, struct mslsa_sid *sid,
226 if (ndr_is_null_handle(lsa_handle) || sid == NULL)
232 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
242 if ((rc = ndr_rpc_call(lsa_handle, opnum, &arg)) != 0)
248 ndr_inherit_handle(lsa_account_handle, lsa_handle);
257 ndr_rpc_release(lsa_handle);
264 * Close the LSA connection associated with the handle. The lsa_handle
273 lsar_close(mlsvc_handle_t *lsa_handle)
278 if (ndr_is_null_handle(lsa_handle))
283 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
285 (void) ndr_rpc_call(lsa_handle, opnum, &arg);
286 ndr_rpc_release(lsa_handle);
288 if (ndr_is_bind_handle(lsa_handle))
289 ndr_rpc_unbind(lsa_handle);
291 bzero(lsa_handle, sizeof (mlsvc_handle_t));
301 lsar_query_security_desc(mlsvc_handle_t *lsa_handle)
310 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
312 rc = ndr_rpc_call(lsa_handle, opnum, &arg);
313 ndr_rpc_release(lsa_handle);
334 lsar_query_info_policy(mlsvc_handle_t *lsa_handle, WORD infoClass,
346 if (lsa_handle == NULL || info == NULL)
353 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
357 if (ndr_rpc_call(lsa_handle, opnum, &arg) != 0) {
360 ndr_rpc_status(lsa_handle, opnum, arg.status);
408 ndr_rpc_release(lsa_handle);
417 lsar_lookup_names(mlsvc_handle_t *lsa_handle, void *key, smb_account_t *info)
434 if (lsa_handle == NULL || name == NULL || info == NULL)
439 svinfo = ndr_rpc_server_info(lsa_handle);
461 if (ndr_rpc_server_os(lsa_handle) == NATIVE_OS_WIN2000) {
463 ndr_rpc_set_nonull(lsa_handle);
464 status = (*ops[i])(lsa_handle, &names, info);
470 ndr_rpc_set_nonull(lsa_handle);
471 status = lsar_lookup_names1(lsa_handle, &names, info);
526 lsar_lookup_names1(mlsvc_handle_t *lsa_handle, lsa_names_t *names,
537 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
541 if (ndr_rpc_call(lsa_handle, opnum, &arg) != 0) {
542 ndr_rpc_release(lsa_handle);
547 ndr_rpc_status(lsa_handle, opnum, arg.status);
548 ndr_rpc_release(lsa_handle);
553 ndr_rpc_release(lsa_handle);
559 ndr_rpc_release(lsa_handle);
572 ndr_rpc_release(lsa_handle);
580 lsar_lookup_names2(mlsvc_handle_t *lsa_handle, lsa_names_t *names,
591 (void) memcpy(&arg.policy_handle, lsa_handle, sizeof (mslsa_handle_t));
596 if (ndr_rpc_call(lsa_handle, opnum, &arg) != 0) {
597 ndr_rpc_release(lsa_handle);
602 ndr_rpc_status(lsa_handle, opnum, arg.status);
603 ndr_rpc_release(lsa_handle);
608 ndr_rpc_release(lsa_handle);
614 ndr_rpc_release(lsa_handle);
627 ndr_rpc_release(lsa_handle);
635 lsar_lookup_names3(mlsvc_handle_t *lsa_handle, lsa_names_t *names,
646 (void) memcpy(&arg.policy_handle, lsa_handle, sizeof (mslsa_handle_t));
651 if (ndr_rpc_call(lsa_handle, opnum, &arg) != 0) {
652 ndr_rpc_release(lsa_handle);
657 ndr_rpc_status(lsa_handle, opnum, arg.status);
658 ndr_rpc_release(lsa_handle);
663 ndr_rpc_release(lsa_handle);
669 ndr_rpc_release(lsa_handle);
682 ndr_rpc_release(lsa_handle);
697 lsar_lookup_names4(mlsvc_handle_t *lsa_handle, lsa_names_t *names,
712 if (ndr_rpc_call(lsa_handle, opnum, &arg) != 0) {
713 ndr_rpc_release(lsa_handle);
718 ndr_rpc_status(lsa_handle, opnum, arg.status);
719 ndr_rpc_release(lsa_handle);
727 ndr_rpc_release(lsa_handle);
733 ndr_rpc_release(lsa_handle);
746 ndr_rpc_release(lsa_handle);
755 lsar_lookup_sids(mlsvc_handle_t *lsa_handle, void *key, smb_account_t *account)
761 if (lsa_handle == NULL || sid == NULL || account == NULL)
769 if (ndr_rpc_server_os(lsa_handle) == NATIVE_OS_WIN2000)
770 status = lsar_lookup_sids2(lsa_handle, (lsa_sid_t *)sid,
773 status = lsar_lookup_sids1(lsa_handle, (lsa_sid_t *)sid,
792 lsar_lookup_sids1(mlsvc_handle_t *lsa_handle, lsa_sid_t *sid,
804 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
811 if (ndr_rpc_call(lsa_handle, opnum, &arg) != 0) {
812 ndr_rpc_release(lsa_handle);
817 ndr_rpc_status(lsa_handle, opnum, arg.status);
818 ndr_rpc_release(lsa_handle);
823 ndr_rpc_release(lsa_handle);
829 ndr_rpc_release(lsa_handle);
844 ndr_rpc_release(lsa_handle);
852 lsar_lookup_sids2(mlsvc_handle_t *lsa_handle, lsa_sid_t *sid,
864 (void) memcpy(&arg.policy_handle, lsa_handle, sizeof (mslsa_handle_t));
872 if (ndr_rpc_call(lsa_handle, opnum, &arg) != 0) {
873 ndr_rpc_release(lsa_handle);
878 ndr_rpc_status(lsa_handle, opnum, arg.status);
879 ndr_rpc_release(lsa_handle);
884 ndr_rpc_release(lsa_handle);
890 ndr_rpc_release(lsa_handle);
905 ndr_rpc_release(lsa_handle);
920 lsar_lookup_sids3(mlsvc_handle_t *lsa_handle, lsa_sid_t *sid,
939 if (ndr_rpc_call(lsa_handle, opnum, &arg) != 0) {
940 ndr_rpc_release(lsa_handle);
945 ndr_rpc_status(lsa_handle, opnum, arg.status);
946 ndr_rpc_release(lsa_handle);
954 ndr_rpc_release(lsa_handle);
960 ndr_rpc_release(lsa_handle);
975 ndr_rpc_release(lsa_handle);
993 lsar_enum_accounts(mlsvc_handle_t *lsa_handle, DWORD *enum_context,
1004 if (lsa_handle == NULL || enum_context == NULL || accounts == NULL)
1013 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
1017 rc = ndr_rpc_call(lsa_handle, opnum, &arg);
1023 ndr_rpc_status(lsa_handle, opnum, arg.status);
1031 ndr_rpc_release(lsa_handle);
1045 ndr_rpc_release(lsa_handle);
1065 lsar_enum_trusted_domains(mlsvc_handle_t *lsa_handle, DWORD *enum_context,
1079 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
1083 if (ndr_rpc_call(lsa_handle, opnum, &arg) != 0) {
1094 ndr_rpc_status(lsa_handle, opnum, arg.status);
1104 ndr_rpc_release(lsa_handle);
1109 lsar_enum_trusted_domains_ex(mlsvc_handle_t *lsa_handle, DWORD *enum_context,
1123 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
1127 if (ndr_rpc_call(lsa_handle, opnum, &arg) != 0) {
1138 ndr_rpc_status(lsa_handle, opnum, arg.status);
1148 ndr_rpc_release(lsa_handle);
1190 lsar_lookup_priv_value(mlsvc_handle_t *lsa_handle, char *name,
1198 if (lsa_handle == NULL || name == NULL || luid == NULL)
1204 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
1207 if (ndr_rpc_server_os(lsa_handle) == NATIVE_OS_WIN2000)
1214 rc = ndr_rpc_call(lsa_handle, opnum, &arg);
1222 ndr_rpc_release(lsa_handle);
1235 lsar_lookup_priv_name(mlsvc_handle_t *lsa_handle, struct ms_luid *luid,
1242 if (lsa_handle == NULL || luid == NULL || name == NULL)
1248 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
1251 rc = ndr_rpc_call(lsa_handle, opnum, &arg);
1260 ndr_rpc_release(lsa_handle);
1278 lsar_lookup_priv_display_name(mlsvc_handle_t *lsa_handle, char *name,
1286 if (lsa_handle == NULL || name == NULL || display_name == NULL)
1292 (void) memcpy(&arg.handle, lsa_handle, sizeof (mslsa_handle_t));
1302 if (ndr_rpc_call(lsa_handle, opnum, &arg) != 0)
1314 ndr_rpc_release(lsa_handle);