services/svc_rcinit.c

ソースコードを見る。

関数

static WERROR rcinit_stop (const char *service, SERVICE_STATUS *status)
static WERROR rcinit_start (const char *service)
static WERROR rcinit_status (const char *service, SERVICE_STATUS *status)

変数

SERVICE_CONTROL_OPS rcinit_svc_ops


関数

static WERROR rcinit_stop ( const char *  service,
SERVICE_STATUS status 
) [static]

svc_rcinit.c26 行で定義されています。

参照先 become_root()dyn_LIBDIRfdpstr_sprintf()smbrun()statusunbecome_root().

00027 {
00028         pstring command;
00029         int ret, fd;
00030         
00031         pstr_sprintf( command, "%s/%s/%s stop", dyn_LIBDIR, SVCCTL_SCRIPT_DIR, service );
00032         
00033         /* we've already performed the access check when the service was opened */
00034         
00035         become_root();
00036         ret = smbrun( command , &fd );
00037         unbecome_root();
00038         
00039         DEBUGADD(5, ("rcinit_start: [%s] returned [%d]\n", command, ret));
00040         close(fd);
00041         
00042         ZERO_STRUCTP( status );
00043         status->type = 0x0020;
00044         status->state = (ret == 0 ) ? 0x0001 : 0x0004;
00045         status->controls_accepted = 0x0005;
00046 
00047         return ( ret == 0 ) ? WERR_OK : WERR_ACCESS_DENIED;
00048 }

static WERROR rcinit_start ( const char *  service  )  [static]

svc_rcinit.c53 行で定義されています。

参照先 become_root()dyn_LIBDIRfdpstr_sprintf()smbrun()unbecome_root().

00054 {
00055         pstring command;
00056         int ret, fd;
00057         
00058         pstr_sprintf( command, "%s/%s/%s start", dyn_LIBDIR, SVCCTL_SCRIPT_DIR, service );
00059         
00060         /* we've already performed the access check when the service was opened */
00061         
00062         become_root();
00063         ret = smbrun( command , &fd );
00064         unbecome_root();
00065         
00066         DEBUGADD(5, ("rcinit_start: [%s] returned [%d]\n", command, ret));
00067         close(fd);      
00068 
00069         return ( ret == 0 ) ? WERR_OK : WERR_ACCESS_DENIED;
00070 }

static WERROR rcinit_status ( const char *  service,
SERVICE_STATUS status 
) [static]

svc_rcinit.c75 行で定義されています。

参照先 become_root()dyn_LIBDIRfdpstr_sprintf()smbrun()statusunbecome_root().

00076 {
00077         pstring command;
00078         int ret, fd;
00079         
00080         pstr_sprintf( command, "%s/%s/%s status", dyn_LIBDIR, SVCCTL_SCRIPT_DIR, service );
00081         
00082         /* we've already performed the access check when the service was opened */
00083         /* assume as return code of 0 means that the service is ok.  Anything else
00084            is STOPPED */
00085         
00086         become_root();
00087         ret = smbrun( command , &fd );
00088         unbecome_root();
00089         
00090         DEBUGADD(5, ("rcinit_start: [%s] returned [%d]\n", command, ret));
00091         close(fd);
00092         
00093         ZERO_STRUCTP( status );
00094         status->type = 0x0020;
00095         status->state = (ret == 0 ) ? 0x0004 : 0x0001;
00096         status->controls_accepted = 0x0005;
00097 
00098         return WERR_OK;
00099 }


変数

SERVICE_CONTROL_OPS rcinit_svc_ops

初期値:

svc_rcinit.c106 行で定義されています。

参照元 init_service_op_table().


Sambaに対してSat Aug 29 21:24:24 2009に生成されました。  doxygen 1.4.7