#include "includes.h"
#include "utils/net.h"
+#include "rpc_client/cli_pipe.h"
+#include "../librpc/gen_ndr/ndr_lsa.h"
+#include "rpc_client/cli_lsarpc.h"
+#include "libsmb/libsmb.h"
/********************************************************
Connection cachine struct. Goes away when ctx destroyed.
return cs;
}
- cs = TALLOC_P(ctx, struct con_struct);
+ cs = talloc(ctx, struct con_struct);
if (!cs) {
*perr = NT_STATUS_NO_MEMORY;
return NULL;
}
#endif
- nt_status = cli_full_connection(&cs->cli, global_myname(), global_myname(),
+ nt_status = cli_full_connection(&cs->cli, lp_netbios_name(), lp_netbios_name(),
&loopback_ss, 0,
"IPC$", "IPC",
#if 0
"",
#endif
0,
- Undefined,
- NULL);
+ Undefined);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(2,("create_cs: Connect failed. Error was %s\n", nt_errstr(nt_status)));
}
nt_status = rpccli_lsa_open_policy(cs->lsapipe, ctx, true,
- SEC_RIGHTS_MAXIMUM_ALLOWED,
+ SEC_FLAG_MAXIMUM_ALLOWED,
&cs->pol);
if (!NT_STATUS_IS_OK(nt_status)) {
NTSTATUS net_lookup_name_from_sid(struct net_context *c,
TALLOC_CTX *ctx,
- DOM_SID *psid,
+ struct dom_sid *psid,
const char **ppdomain,
const char **ppname)
{
********************************************************/
NTSTATUS net_lookup_sid_from_name(struct net_context *c, TALLOC_CTX *ctx,
- const char *full_name, DOM_SID *pret_sid)
+ const char *full_name, struct dom_sid *pret_sid)
{
NTSTATUS nt_status;
struct con_struct *csp = NULL;
- DOM_SID *sids = NULL;
+ struct dom_sid *sids = NULL;
enum lsa_SidType *types = NULL;
csp = create_cs(c, ctx, &nt_status);