web/startstop.c

ソースコードを見る。

関数

void start_smbd (void)
 Startup smbd from web interface.
void start_nmbd (void)
void start_winbindd (void)
 Startup winbindd from web interface.
void stop_smbd (void)
void stop_nmbd (void)
void stop_winbindd (void)
void kill_pid (struct process_id pid)


関数

void start_smbd ( void   ) 

Startup smbd from web interface.

startstop.c27 行で定義されています。

参照先 become_daemon()dyn_SBINDIR.

参照元 status_page().

00028 {
00029         pstring binfile;
00030 
00031         if (geteuid() != 0) return;
00032 
00033         if (fork()) {
00034                 return;
00035         }
00036 
00037         slprintf(binfile, sizeof(pstring) - 1, "%s/smbd", dyn_SBINDIR);
00038 
00039         become_daemon(True, False);
00040 
00041         execl(binfile, binfile, "-D", NULL);
00042 
00043         exit(0);
00044 }

void start_nmbd ( void   ) 

startstop.c47 行で定義されています。

参照先 become_daemon()dyn_SBINDIR.

参照元 status_page().

00048 {
00049         pstring binfile;
00050 
00051         if (geteuid() != 0) return;
00052 
00053         if (fork()) {
00054                 return;
00055         }
00056 
00057         slprintf(binfile, sizeof(pstring) - 1, "%s/nmbd", dyn_SBINDIR);
00058         
00059         become_daemon(True, False);
00060 
00061         execl(binfile, binfile, "-D", NULL);
00062 
00063         exit(0);
00064 }

void start_winbindd ( void   ) 

Startup winbindd from web interface.

startstop.c67 行で定義されています。

参照先 become_daemon()dyn_SBINDIR.

参照元 status_page().

00068 {
00069         pstring binfile;
00070 
00071         if (geteuid() != 0) return;
00072 
00073         if (fork()) {
00074                 return;
00075         }
00076 
00077         slprintf(binfile, sizeof(pstring) - 1, "%s/winbindd", dyn_SBINDIR);
00078 
00079         become_daemon(True, False);
00080 
00081         execl(binfile, binfile, NULL);
00082 
00083         exit(0);
00084 }

void stop_smbd ( void   ) 

startstop.c88 行で定義されています。

参照先 pidfile_pid().

参照元 status_page().

00089 {
00090         pid_t pid = pidfile_pid("smbd");
00091 
00092         if (geteuid() != 0) return;
00093 
00094         if (pid <= 0) return;
00095 
00096         kill(pid, SIGTERM);
00097 }

void stop_nmbd ( void   ) 

startstop.c100 行で定義されています。

参照先 pidfile_pid().

参照元 status_page().

00101 {
00102         pid_t pid = pidfile_pid("nmbd");
00103 
00104         if (geteuid() != 0) return;
00105 
00106         if (pid <= 0) return;
00107 
00108         kill(pid, SIGTERM);
00109 }

void stop_winbindd ( void   ) 

startstop.c112 行で定義されています。

参照先 pidfile_pid().

参照元 status_page().

00113 {
00114         pid_t pid = pidfile_pid("winbindd");
00115 
00116         if (geteuid() != 0) return;
00117 
00118         if (pid <= 0) return;
00119 
00120         kill(pid, SIGTERM);
00121 }

void kill_pid ( struct process_id  pid  ) 

startstop.c124 行で定義されています。

参照先 procid_to_pid().

参照元 traverse_fn1().

00125 {
00126         if (geteuid() != 0) return;
00127 
00128         if (procid_to_pid(&pid) <= 0) return;
00129 
00130         kill(procid_to_pid(&pid), SIGTERM);
00131 }


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