[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-2183-gec49475

Günther Deschner gd at samba.org
Wed Feb 13 11:23:04 GMT 2008


The branch, v3-2-test has been updated
       via  ec4947525e0881bfcde661f906ccd1f66fe54f5a (commit)
      from  d54456f3c42f123af5516c6f75c87b279fdc775f (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit ec4947525e0881bfcde661f906ccd1f66fe54f5a
Author: Günther Deschner <gd at samba.org>
Date:   Wed Feb 13 11:56:24 2008 +0100

    Use pidl for _netr_LogonControl.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/rpc_server/srv_netlog.c    |   23 +-------------------
 source/rpc_server/srv_netlog_nt.c |   41 +++++++++++++++++++-----------------
 2 files changed, 23 insertions(+), 41 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_netlog.c b/source/rpc_server/srv_netlog.c
index 4f0a014..7faf632 100644
--- a/source/rpc_server/srv_netlog.c
+++ b/source/rpc_server/srv_netlog.c
@@ -279,28 +279,7 @@ static bool api_net_logon_ctrl2(pipes_struct *p)
 
 static bool api_net_logon_ctrl(pipes_struct *p)
 {
-	NET_Q_LOGON_CTRL q_u;
-	NET_R_LOGON_CTRL r_u;
-	prs_struct *data = &p->in_data.data;
-	prs_struct *rdata = &p->out_data.rdata;
-
-	ZERO_STRUCT(q_u);
-	ZERO_STRUCT(r_u);
-
-	/* grab the lsa netlogon ctrl query... */
-	if(!net_io_q_logon_ctrl("", &q_u, data, 0)) {
-		DEBUG(0,("api_net_logon_ctrl: Failed to unmarshall NET_Q_LOGON_CTRL.\n"));
-		return False;
-	}
-
-	r_u.status = _net_logon_ctrl(p, &q_u, &r_u);
-
-	if(!net_io_r_logon_ctrl("", &r_u, rdata, 0)) {
-		DEBUG(0,("net_reply_logon_ctrl2: Failed to marshall NET_R_LOGON_CTRL.\n"));
-		return False;
-	}
-
-	return True;
+	return proxy_netr_call(p, NDR_NETR_LOGONCONTROL);
 }
 
 /*************************************************************************
diff --git a/source/rpc_server/srv_netlog_nt.c b/source/rpc_server/srv_netlog_nt.c
index 528a339..b59ad62 100644
--- a/source/rpc_server/srv_netlog_nt.c
+++ b/source/rpc_server/srv_netlog_nt.c
@@ -43,21 +43,34 @@ static void init_net_r_req_chal(NET_R_REQ_CHAL *r_c,
 }
 
 /*************************************************************************
- net_reply_logon_ctrl:
+ _netr_LogonControl
  *************************************************************************/
 
-NTSTATUS _net_logon_ctrl(pipes_struct *p, NET_Q_LOGON_CTRL *q_u, 
-		       NET_R_LOGON_CTRL *r_u)
+WERROR _netr_LogonControl(pipes_struct *p,
+			  struct netr_LogonControl *r)
 {
-	uint32 flags = 0x0;
-	uint32 pdc_connection_status = 0x00; /* Maybe a win32 error code? */
-	
+	struct netr_NETLOGON_INFO_1 *info1;
+	uint32_t flags = 0x0;
+	uint32_t pdc_connection_status = W_ERROR_V(WERR_OK);
+
 	/* Setup the Logon Control response */
 
-	init_net_r_logon_ctrl(r_u, q_u->query_level, flags, 
-			      pdc_connection_status);
+	switch (r->in.level) {
+		case 1:
+			info1 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_1);
+			if (!info1) {
+				return WERR_NOMEM;
+			}
+			info1->flags = flags;
+			info1->pdc_connection_status = pdc_connection_status;
 
-	return r_u->status;
+			r->out.info->info1 = info1;
+			break;
+		default:
+			return WERR_UNKNOWN_LEVEL;
+	}
+
+	return WERR_OK;
 }
 
 /****************************************************************************
@@ -1257,16 +1270,6 @@ NTSTATUS _netr_AccountSync(pipes_struct *p,
 /****************************************************************
 ****************************************************************/
 
-WERROR _netr_LogonControl(pipes_struct *p,
-			  struct netr_LogonControl *r)
-{
-	p->rng_fault_state = true;
-	return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
-****************************************************************/
-
 WERROR _netr_GetDcName(pipes_struct *p,
 		       struct netr_GetDcName *r)
 {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list