summaryrefslogtreecommitdiffstats
path: root/source/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-03-05 10:34:45 +0100
committerKarolin Seeger <kseeger@bando.sernet.private>2008-03-31 14:20:56 +0200
commit1440f563e4c10640e1b01e0d424eb0600b8ae006 (patch)
tree8f693cda3f00dd4daadd7267a8a64796a7560e36 /source/rpc_server
parent01b8d8016bbdea801e42c512c1def26049acc3dd (diff)
downloadsamba-1440f563e4c10640e1b01e0d424eb0600b8ae006.tar.gz
samba-1440f563e4c10640e1b01e0d424eb0600b8ae006.tar.xz
samba-1440f563e4c10640e1b01e0d424eb0600b8ae006.zip
Use pidl for _srvsvc_NetRemoteTOD().
Guenther (cherry picked from commit 2b4e0f0593c6378cdac4811ded830ca694afac9e)
Diffstat (limited to 'source/rpc_server')
-rw-r--r--source/rpc_server/srv_srvsvc.c20
-rw-r--r--source/rpc_server/srv_srvsvc_nt.c55
2 files changed, 25 insertions, 50 deletions
diff --git a/source/rpc_server/srv_srvsvc.c b/source/rpc_server/srv_srvsvc.c
index 0d50bccef04..41fc39baf7d 100644
--- a/source/rpc_server/srv_srvsvc.c
+++ b/source/rpc_server/srv_srvsvc.c
@@ -369,25 +369,7 @@ static bool api_srv_net_share_del_sticky(pipes_struct *p)
static bool api_srv_net_remote_tod(pipes_struct *p)
{
- SRV_Q_NET_REMOTE_TOD q_u;
- SRV_R_NET_REMOTE_TOD 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 net server get enum */
- if(!srv_io_q_net_remote_tod("", &q_u, data, 0))
- return False;
-
- r_u.status = _srv_net_remote_tod(p, &q_u, &r_u);
-
- /* store the response in the SMB stream */
- if(!srv_io_r_net_remote_tod("", &r_u, rdata, 0))
- return False;
-
- return True;
+ return proxy_srvsvc_call(p, NDR_SRVSVC_NETREMOTETOD);
}
/*******************************************************************
diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c
index 50422bc3c07..68a84d0ce02 100644
--- a/source/rpc_server/srv_srvsvc_nt.c
+++ b/source/rpc_server/srv_srvsvc_nt.c
@@ -2057,12 +2057,13 @@ WERROR _srv_net_share_del_sticky(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_
}
/*******************************************************************
-time of day
+ _srvsvc_NetRemoteTOD
********************************************************************/
-WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u)
+WERROR _srvsvc_NetRemoteTOD(pipes_struct *p,
+ struct srvsvc_NetRemoteTOD *r)
{
- TIME_OF_DAY_INFO *tod;
+ struct srvsvc_NetRemoteTODInfo *tod;
struct tm *t;
time_t unixdate = time(NULL);
@@ -2071,37 +2072,35 @@ WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET
uint32 zone = get_time_zone(unixdate)/60;
- DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__));
+ DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__));
- if ( !(tod = TALLOC_ZERO_P(p->mem_ctx, TIME_OF_DAY_INFO)) )
+ if ( !(tod = TALLOC_ZERO_P(p->mem_ctx, struct srvsvc_NetRemoteTODInfo)) )
return WERR_NOMEM;
- r_u->tod = tod;
- r_u->ptr_srv_tod = 0x1;
- r_u->status = WERR_OK;
+ *r->out.info = tod;
- DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__));
+ DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__));
t = gmtime(&unixdate);
/* set up the */
- init_time_of_day_info(tod,
- unixdate,
- 0,
- t->tm_hour,
- t->tm_min,
- t->tm_sec,
- 0,
- zone,
- 10000,
- t->tm_mday,
- t->tm_mon + 1,
- 1900+t->tm_year,
- t->tm_wday);
-
- DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__));
+ init_srvsvc_NetRemoteTODInfo(tod,
+ unixdate,
+ 0,
+ t->tm_hour,
+ t->tm_min,
+ t->tm_sec,
+ 0,
+ zone,
+ 10000,
+ t->tm_mday,
+ t->tm_mon + 1,
+ 1900+t->tm_year,
+ t->tm_wday);
- return r_u->status;
+ DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__));
+
+ return WERR_OK;
}
/***********************************************************************************
@@ -2600,12 +2599,6 @@ WERROR _srvsvc_NetTransportDel(pipes_struct *p, struct srvsvc_NetTransportDel *r
return WERR_NOT_SUPPORTED;
}
-WERROR _srvsvc_NetRemoteTOD(pipes_struct *p, struct srvsvc_NetRemoteTOD *r)
-{
- p->rng_fault_state = True;
- return WERR_NOT_SUPPORTED;
-}
-
WERROR _srvsvc_NetSetServiceBits(pipes_struct *p, struct srvsvc_NetSetServiceBits *r)
{
p->rng_fault_state = True;