Author: vlendec Date: 2005-09-09 19:09:42 +0000 (Fri, 09 Sep 2005) New Revision: 10127
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10127 Log: Fix the build Modified: trunk/source/sam/idmap_rid.c trunk/source/utils/net_ads.c Changeset: Modified: trunk/source/sam/idmap_rid.c =================================================================== --- trunk/source/sam/idmap_rid.c 2005-09-09 19:08:36 UTC (rev 10126) +++ trunk/source/sam/idmap_rid.c 2005-09-09 19:09:42 UTC (rev 10127) @@ -142,6 +142,7 @@ { NTSTATUS status = NT_STATUS_UNSUCCESSFUL; struct cli_state *cli; + struct rpc_pipe_client *pipe_hnd; TALLOC_CTX *mem_ctx; POLICY_HND pol; uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; @@ -230,18 +231,22 @@ } /* query the lsa-pipe */ - if (!cli_nt_session_open (cli, PI_LSARPC)) { + pipe_hnd = cli_rpc_pipe_open_noauth(cli, PI_LSARPC, &status); + if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("rid_idmap_get_domains: could not setup connection to dc\n")); goto out; } /* query policies */ - status = cli_lsa_open_policy(cli, mem_ctx, False, des_access, &pol); + status = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, False, des_access, + &pol); if (!NT_STATUS_IS_OK(status)) { goto out; } - status = cli_lsa_query_info_policy(cli, mem_ctx, &pol, info_class, &domain_name, &domain_sid); + status = rpccli_lsa_query_info_policy(pipe_hnd, mem_ctx, &pol, + info_class, &domain_name, + &domain_sid); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("rid_idmap_get_domains: cannot retrieve domain-info\n")); goto out; @@ -252,10 +257,10 @@ /* scan trusted domains */ DEBUG(10, ("rid_idmap_get_domains: enumerating trusted domains\n")); - status = cli_lsa_enum_trust_dom(cli, mem_ctx, &pol, &enum_ctx, - &trusted_num_domains, - &trusted_domain_names, - &trusted_domain_sids); + status = rpccli_lsa_enum_trust_dom(pipe_hnd, mem_ctx, &pol, &enum_ctx, + &trusted_num_domains, + &trusted_domain_names, + &trusted_domain_sids); if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES) && @@ -313,8 +318,8 @@ status = NT_STATUS_OK; out: - cli_lsa_close(cli, mem_ctx, &pol); - cli_nt_session_close(cli); + rpccli_lsa_close(pipe_hnd, mem_ctx, &pol); + cli_rpc_pipe_close(pipe_hnd); talloc_destroy(mem_ctx); cli_shutdown(cli); Modified: trunk/source/utils/net_ads.c =================================================================== --- trunk/source/utils/net_ads.c 2005-09-09 19:08:36 UTC (rev 10126) +++ trunk/source/utils/net_ads.c 2005-09-09 19:09:42 UTC (rev 10127) @@ -980,6 +980,7 @@ ADS_STATUS rc; const char *servername, *printername; struct cli_state *cli; + struct rpc_pipe_client *pipe_hnd; struct in_addr server_ip; NTSTATUS nt_status; TALLOC_CTX *mem_ctx = talloc_init("net_ads_printer_publish"); @@ -1038,8 +1039,9 @@ asprintf(&prt_dn, "cn=%s-%s,%s", srv_cn[0], printername, srv_dn); - cli_nt_session_open(cli, PI_SPOOLSS); - get_remote_printer_publishing_data(cli, mem_ctx, &mods, printername); + pipe_hnd = cli_rpc_pipe_open_noauth(cli, PI_SPOOLSS, &nt_status); + get_remote_printer_publishing_data(pipe_hnd, mem_ctx, &mods, + printername); rc = ads_add_printer_entry(ads, prt_dn, mem_ctx, &mods); if (!ADS_ERR_OK(rc)) {