static WERROR dcesrv_netr_GetDcName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct netr_GetDcName *r)
{
+ struct auth_session_info *session_info =
+ dcesrv_call_session_info(dce_call);
const char * const attrs[] = { NULL };
struct ldb_context *sam_ctx;
struct ldb_message **res;
sam_ctx = samdb_connect(mem_ctx,
dce_call->event_ctx,
dce_call->conn->dce_ctx->lp_ctx,
- dce_call->conn->auth_state.session_info,
+ session_info,
dce_call->conn->remote_address,
0);
if (sam_ctx == NULL) {
static WERROR dcesrv_netr_LogonControl_base_call(struct dcesrv_netr_LogonControl_base_state *state)
{
- struct dcesrv_connection *conn = state->dce_call->conn;
struct loadparm_context *lp_ctx = state->dce_call->conn->dce_ctx->lp_ctx;
- struct auth_session_info *session_info = conn->auth_state.session_info;
+ struct auth_session_info *session_info =
+ dcesrv_call_session_info(state->dce_call);
enum security_user_level security_level;
struct dcerpc_binding_handle *irpc_handle;
struct tevent_req *subreq;
static WERROR dcesrv_netr_GetAnyDCName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct netr_GetAnyDCName *r)
{
+ struct auth_session_info *session_info =
+ dcesrv_call_session_info(dce_call);
struct netr_DomainTrustList *trusts;
struct ldb_context *sam_ctx;
struct loadparm_context *lp_ctx = dce_call->conn->dce_ctx->lp_ctx;
sam_ctx = samdb_connect(mem_ctx,
dce_call->event_ctx,
lp_ctx,
- dce_call->conn->auth_state.session_info,
+ session_info,
dce_call->conn->remote_address,
0);
if (sam_ctx == NULL) {
static WERROR dcesrv_netr_DsRGetSiteName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct netr_DsRGetSiteName *r)
{
+ struct auth_session_info *session_info =
+ dcesrv_call_session_info(dce_call);
struct ldb_context *sam_ctx;
struct loadparm_context *lp_ctx = dce_call->conn->dce_ctx->lp_ctx;
sam_ctx = samdb_connect(mem_ctx,
dce_call->event_ctx,
lp_ctx,
- dce_call->conn->auth_state.session_info,
+ session_info,
dce_call->conn->remote_address,
0);
if (sam_ctx == NULL) {
static WERROR dcesrv_netr_DsRGetDCName_base_call(struct dcesrv_netr_DsRGetDCName_base_state *state)
{
struct dcesrv_call_state *dce_call = state->dce_call;
+ struct auth_session_info *session_info =
+ dcesrv_call_session_info(dce_call);
TALLOC_CTX *mem_ctx = state->mem_ctx;
struct netr_DsRGetDCNameEx2 *r = &state->r;
struct ldb_context *sam_ctx;
sam_ctx = samdb_connect(state,
dce_call->event_ctx,
lp_ctx,
- dce_call->conn->auth_state.session_info,
+ session_info,
dce_call->conn->remote_address,
0);
if (sam_ctx == NULL) {
static WERROR dcesrv_netr_DsRAddressToSitenamesExW(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct netr_DsRAddressToSitenamesExW *r)
{
+ struct auth_session_info *session_info =
+ dcesrv_call_session_info(dce_call);
struct ldb_context *sam_ctx;
struct netr_DsRAddressToSitenamesExWCtr *ctr;
struct loadparm_context *lp_ctx = dce_call->conn->dce_ctx->lp_ctx;
sam_ctx = samdb_connect(mem_ctx,
dce_call->event_ctx,
lp_ctx,
- dce_call->conn->auth_state.session_info,
+ session_info,
dce_call->conn->remote_address,
0);
if (sam_ctx == NULL) {
static WERROR dcesrv_netr_DsrGetDcSiteCoverageW(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct netr_DsrGetDcSiteCoverageW *r)
{
+ struct auth_session_info *session_info =
+ dcesrv_call_session_info(dce_call);
struct ldb_context *sam_ctx;
struct DcSitesCtr *ctr;
struct loadparm_context *lp_ctx = dce_call->conn->dce_ctx->lp_ctx;
sam_ctx = samdb_connect(mem_ctx,
dce_call->event_ctx,
lp_ctx,
- dce_call->conn->auth_state.session_info,
+ session_info,
dce_call->conn->remote_address,
0);
if (sam_ctx == NULL) {
TALLOC_CTX *mem_ctx,
struct netr_DsrEnumerateDomainTrusts *r)
{
+ struct auth_session_info *session_info =
+ dcesrv_call_session_info(dce_call);
struct netr_DomainTrustList *trusts;
struct ldb_context *sam_ctx;
int ret;
sam_ctx = samdb_connect(mem_ctx,
dce_call->event_ctx,
lp_ctx,
- dce_call->conn->auth_state.session_info,
+ session_info,
dce_call->conn->remote_address,
0);
if (sam_ctx == NULL) {
struct netr_DsRGetForestTrustInformation *r)
{
struct loadparm_context *lp_ctx = dce_call->conn->dce_ctx->lp_ctx;
- struct dcesrv_connection *conn = dce_call->conn;
- struct auth_session_info *session_info = conn->auth_state.session_info;
+ struct auth_session_info *session_info =
+ dcesrv_call_session_info(dce_call);
enum security_user_level security_level;
struct ldb_context *sam_ctx = NULL;
struct dcesrv_netr_DsRGetForestTrustInformation_state *state = NULL;
sam_ctx = samdb_connect(mem_ctx,
dce_call->event_ctx,
lp_ctx,
- dce_call->conn->auth_state.session_info,
+ session_info,
dce_call->conn->remote_address,
0);
if (sam_ctx == NULL) {
TALLOC_CTX *mem_ctx,
struct netr_GetForestTrustInformation *r)
{
+ struct auth_session_info *session_info =
+ dcesrv_call_session_info(dce_call);
struct loadparm_context *lp_ctx = dce_call->conn->dce_ctx->lp_ctx;
struct netlogon_creds_CredentialState *creds = NULL;
struct ldb_context *sam_ctx = NULL;
sam_ctx = samdb_connect(mem_ctx,
dce_call->event_ctx,
lp_ctx,
- dce_call->conn->auth_state.session_info,
+ session_info,
dce_call->conn->remote_address,
0);
if (sam_ctx == NULL) {