Changeset 245
- Timestamp:
- May 31, 2009, 6:01:46 PM (16 years ago)
- Location:
- branches/samba-3.2.x/source/web
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/samba-3.2.x/source/web/cgi.c ¶
r137 r245 315 315 } 316 316 317 #ifndef __OS2__ 317 318 pwd = getpwnam_alloc(NULL, user); 318 319 if (!pwd) { … … 329 330 } 330 331 TALLOC_FREE(pwd); 332 #endif 331 333 } 332 334 -
TabularUnified branches/samba-3.2.x/source/web/startstop.c ¶
r133 r245 19 19 20 20 #include "includes.h" 21 22 #ifdef __OS2__ 23 /* fork() in klibc on OS/2 ends all children when parent 24 is closed, therefore we use spawn() */ 25 #include "process.h" 26 #define SWAT_HELPER(WHAT, WHO) \ 27 asprintf(&binfile, "%s/swathelp.cmd", get_dyn_SWATDIR()); \ 28 int rc; \ 29 rc=spawnl(P_NOWAIT, binfile, binfile, #WHAT, #WHO, NULL); 30 #endif 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 #endif 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 #endif 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 #endif 83 109 } 84 110 … … 88 114 { 89 115 pid_t pid = pidfile_pid("smbd"); 90 91 116 if (geteuid() != 0) return; 92 117 118 #ifdef __OS2__ /* we do it a bit nicer */ 119 if (smbd_running()) { 120 char *binfile = NULL; 121 SWAT_HELPER(stop, smbd) 122 } 123 #else 93 124 if (pid <= 0) return; 94 125 95 126 kill(pid, SIGTERM); 127 #endif 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 #ifdef __OS2__ /* we do it a bit nicer */ 136 if (nmbd_running()) { 137 char *binfile = NULL; 138 SWAT_HELPER(stop, nmbd) 139 } 140 #else 105 141 if (pid <= 0) return; 106 142 107 143 kill(pid, SIGTERM); 144 #endif 108 145 } 146 109 147 #ifdef WITH_WINBIND 110 148 /* stop winbindd */ … … 115 153 if (geteuid() != 0) return; 116 154 155 #ifdef __OS2__ /* we do it a bit nicer */ 156 if (winbindd_running()) { 157 char *binfile = NULL; 158 SWAT_HELPER(stop, winbindd) 159 } 160 #else 117 161 if (pid <= 0) return; 118 162 119 163 kill(pid, SIGTERM); 164 #endif 120 165 } 121 166 #endif
Note:
See TracChangeset
for help on using the changeset viewer.