Changeset 245
- Timestamp:
- May 31, 2009, 6:01:46 PM (17 years ago)
- Location:
- branches/samba-3.2.x/source/web
- Files:
-
- 2 edited
-
cgi.c (modified) (2 diffs)
-
startstop.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/web/cgi.c
r137 r245 315 315 } 316 316 317 317 318 pwd = getpwnam_alloc(NULL, user); 318 319 if (!pwd) { … … 329 330 } 330 331 TALLOC_FREE(pwd); 332 331 333 } 332 334 -
branches/samba-3.2.x/source/web/startstop.c
r133 r245 19 19 20 20 #include "includes.h" 21 22 23 24 25 26 27 28 29 30 31 21 32 #include "web/swat_proto.h" 22 33 #include "dynconfig.h" … … 31 42 return; 32 43 } 33 44 #ifdef __OS2__ 45 /* fork() in klibc on OS/2 ends all children when parent 46 is closed, therefore we use spawn() */ 47 SWAT_HELPER(start, smbd) 48 #else 34 49 if (fork()) { 35 50 return; … … 41 56 } 42 57 exit(0); 58 43 59 } 44 60 … … 51 67 return; 52 68 } 53 69 #ifdef __OS2__ 70 /* fork() in klibc on OS/2 ends all children when parent 71 is closed, therefore we use spawn() */ 72 SWAT_HELPER(start, nmbd) 73 #else 54 74 if (fork()) { 55 75 return; … … 61 81 } 62 82 exit(0); 83 63 84 } 64 85 … … 71 92 return; 72 93 } 73 94 #ifdef __OS2__ 95 /* fork() in klibc on OS/2 ends all children when parent 96 is closed, therefore we use spawn() */ 97 SWAT_HELPER(start, winbindd) 98 #else 74 99 if (fork()) { 75 100 return; … … 81 106 } 82 107 exit(0); 108 83 109 } 84 110 … … 88 114 { 89 115 pid_t pid = pidfile_pid("smbd"); 90 91 116 if (geteuid() != 0) return; 92 117 118 119 120 121 122 123 93 124 if (pid <= 0) return; 94 125 95 126 kill(pid, SIGTERM); 127 96 128 } 97 98 129 /* stop nmbd */ 99 130 void stop_nmbd(void) 100 131 { 101 132 pid_t pid = pidfile_pid("nmbd"); 102 103 133 if (geteuid() != 0) return; 104 134 135 136 137 138 139 140 105 141 if (pid <= 0) return; 106 142 107 143 kill(pid, SIGTERM); 144 108 145 } 146 109 147 #ifdef WITH_WINBIND 110 148 /* stop winbindd */ … … 115 153 if (geteuid() != 0) return; 116 154 155 156 157 158 159 160 117 161 if (pid <= 0) return; 118 162 119 163 kill(pid, SIGTERM); 164 120 165 } 121 166 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
