Changeset 680 for branches/samba-3.3.x/source/dynconfig.c
- Timestamp:
- Jan 25, 2012, 9:46:18 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/dynconfig.c
r644 r680 4 4 Copyright (C) 2003 by Jim McDonough <jmcd@us.ibm.com> 5 5 Copyright (C) 2007 by Jeremy Allison <jra@samba.org> 6 7 6 This program is free software; you can redistribute it and/or modify 8 7 it under the terms of the GNU General Public License as published by 9 8 the Free Software Foundation; either version 3 of the License, or 10 9 (at your option) any later version. 11 12 10 This program is distributed in the hope that it will be useful, 13 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 13 GNU General Public License for more details. 16 17 14 You should have received a copy of the GNU General Public License 18 15 along with this program. If not, see <http://www.gnu.org/licenses/>. 19 16 */ 20 21 17 #include "includes.h" 22 18 … … 40 36 * table? There's kind of a chicken-and-egg situation there... 41 37 **/ 42 43 38 #ifndef __OS2__ 44 39 #define DEFINE_DYN_CONFIG_PARAM(name) \ … … 84 79 } 85 80 #endif 86 87 81 DEFINE_DYN_CONFIG_PARAM(SBINDIR) 88 82 DEFINE_DYN_CONFIG_PARAM(BINDIR) … … 100 94 DEFINE_DYN_CONFIG_PARAM(PRIVATE_DIR) 101 95 102 103 96 #ifdef __OS2__ 104 105 97 /* Directory the binary was called from, same as getbindir() */ 106 98 const char *get_dyn_SBINDIR(void) … … 117 109 } 118 110 } 119 120 111 if (dyn_SBINDIR == NULL) { 121 112 return buffer; … … 123 114 return dyn_SBINDIR; 124 115 } 125 126 116 /* Directory the binary was called from, same as getsbindir() */ 127 117 const char *get_dyn_BINDIR(void) … … 138 128 } 139 129 } 140 141 130 if (dyn_BINDIR == NULL) { 142 131 return buffer; … … 144 133 return dyn_BINDIR; 145 134 } 146 147 135 /* Directory holding the SWAT files */ 148 136 const char *get_dyn_SWATDIR(void) … … 159 147 } 160 148 } 161 162 149 if (dyn_SWATDIR == NULL) { 163 150 return buffer; … … 165 152 return dyn_SWATDIR; 166 153 } 167 168 154 /* Location of smb.conf file. */ 169 155 const char *get_dyn_CONFIGFILE(void) … … 191 177 setenv("TMPDIR",tmpdir,0); 192 178 } 193 194 179 if (dyn_CONFIGFILE == NULL) { 195 180 return buffer; … … 197 182 return dyn_CONFIGFILE; 198 183 } 199 200 184 /** Log file directory. **/ 201 185 const char *get_dyn_LOGFILEBASE(void) … … 211 195 return dyn_LOGFILEBASE; 212 196 } 213 214 197 /** Statically configured LanMan hosts. **/ 215 198 const char *get_dyn_LMHOSTSFILE(void) … … 225 208 return dyn_LMHOSTSFILE; 226 209 } 227 228 210 /* Directory holding the codepages */ 229 211 const char *get_dyn_CODEPAGEDIR(void) … … 237 219 snprintf(buffer, 260, "%s", CODEPAGEDIR); 238 220 } else { 239 snprintf(buffer, 260, "%s/%s", exedir, "codepages"); 240 } 241 } 242 221 if (!lp_is_in_client()) { 222 snprintf(buffer, 260, "%s/%s", exedir, "codepages"); 223 } else { 224 snprintf(buffer, 260, "%s/%s", getenv("SMB_EXE"), "codepages"); 225 } 226 } 227 } 243 228 if (dyn_CODEPAGEDIR == NULL) { 244 229 return buffer; … … 246 231 return dyn_CODEPAGEDIR; 247 232 } 248 249 233 /* Directory holding the libs */ 250 234 const char *get_dyn_LIBDIR(void) … … 261 245 } 262 246 } 263 264 247 if (dyn_LIBDIR == NULL) { 265 248 return buffer; … … 267 250 return dyn_LIBDIR; 268 251 } 269 270 252 /* Directory holding the modules */ 271 253 const char *get_dyn_MODULESDIR(void) … … 282 264 } 283 265 } 284 285 266 if (dyn_MODULESDIR == NULL) { 286 267 return buffer; … … 288 269 return dyn_MODULESDIR; 289 270 } 290 291 271 /* Directory holding lock files */ 292 272 const char *get_dyn_LOCKDIR(void) … … 307 287 return dyn_LOCKDIR; 308 288 } 309 310 289 /* Directory holding the pid files */ 311 290 const char *get_dyn_PIDDIR(void) … … 321 300 return dyn_PIDDIR; 322 301 } 323 324 302 /* Location of smbpasswd */ 325 303 const char *get_dyn_SMB_PASSWD_FILE(void) … … 335 313 return dyn_SMB_PASSWD_FILE; 336 314 } 337 338 315 /* Directory holding the private files */ 339 316 const char *get_dyn_PRIVATE_DIR(void) … … 349 326 return dyn_PRIVATE_DIR; 350 327 } 351 352 328 /* Directory holding the shared libs (same as libdir) */ 353 329 const char *get_dyn_SHLIBEXT(void) … … 364 340 } 365 341 } 366 367 342 if (dyn_SHLIBEXT == NULL) { 368 343 return buffer; … … 370 345 return dyn_SHLIBEXT; 371 346 } 372 373 347 #endif /* __OS2__ */ 374 375 348 /* In non-FHS mode, these should be configurable using 'lock dir ='; 376 349 but in FHS mode, they are their own directory. Implement as wrapper 377 350 functions so that everything can still be kept in dynconfig.c. 378 351 */ 379 380 352 const char *get_dyn_STATEDIR(void) 381 353 { … … 386 358 #endif 387 359 } 388 389 360 const char *get_dyn_CACHEDIR(void) 390 361 {
Note:
See TracChangeset
for help on using the changeset viewer.