From fa1ca9ab110d43e1c56c8d28d8143c79891ff8a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Thu, 9 Apr 2009 15:39:45 +0200 Subject: [PATCH] s3-svcctl: minor fix for _svcctl_EnumDependentServicesW(). Guenther (cherry picked from commit 76da89daaadc358c836817cf597a1ff1489a9029) --- source3/rpc_server/srv_svcctl_nt.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c index 350a5ca2365..0b0ef83bee9 100644 --- a/source3/rpc_server/srv_svcctl_nt.c +++ b/source3/rpc_server/srv_svcctl_nt.c @@ -546,6 +546,15 @@ WERROR _svcctl_EnumDependentServicesW(pipes_struct *p, if ( !(info->access_granted & SC_RIGHT_SVC_ENUMERATE_DEPENDENTS) ) return WERR_ACCESS_DENIED; + switch (r->in.state) { + case SERVICE_STATE_ACTIVE: + case SERVICE_STATE_INACTIVE: + case SERVICE_STATE_ALL: + break; + default: + return WERR_INVALID_PARAM; + } + /* we have to set the outgoing buffer size to the same as the incoming buffer size (even in the case of failure */ /* this is done in the autogenerated server already - gd */ -- 2.11.4.GIT