Changeset 367 for branches/samba-3.0/source/dynconfig.c
- Timestamp:
- Jan 13, 2010, 7:52:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/dynconfig.c
r366 r367 41 41 **/ 42 42 43 char const *dyn_SBINDIR = SBINDIR,44 *dyn_BINDIR = BINDIR,45 *dyn_SWATDIR = SWATDIR;46 43 47 44 #ifdef __OS2__ 45 46 /* Directory the binary was called from, same as getbindir() */ 47 const char * getsbindir() 48 { 49 static pstring buffer = ""; 50 if (!*buffer) 51 { 52 pstring exedir = ""; 53 if (os2_GetExePath(exedir) != 0) 54 { 55 snprintf(buffer, 260, "%s", SBINDIR); 56 } else { 57 snprintf(buffer, 260, "%s", exedir); 58 } 59 } 60 return buffer; 61 } 62 63 /* Directory the binary was called from, same as getsbindir() */ 64 const char * getbindir() 65 { 66 static pstring buffer = ""; 67 if (!*buffer) 68 { 69 pstring exedir = ""; 70 if (os2_GetExePath(exedir) != 0) 71 { 72 snprintf(buffer, 260, "%s", BINDIR); 73 } else { 74 snprintf(buffer, 260, "%s", exedir); 75 } 76 } 77 return buffer; 78 } 79 80 /* Directory holding the SWAT files */ 81 const char * getswatdir() 82 { 83 static pstring buffer = ""; 84 if (!*buffer) 85 { 86 pstring exedir = ""; 87 if (os2_GetExePath(exedir) != 0) 88 { 89 snprintf(buffer, 260, "%s", SWATDIR); 90 } else { 91 snprintf(buffer, 260, "%s/%s", exedir,"swat"); 92 } 93 } 94 return buffer; 95 } 96 97 /* Location of smb.conf file. */ 48 98 const char * getconfigfile() 49 99 { … … 74 124 } 75 125 126 /* Log file directory */ 76 127 const char * getlogbase() 77 128 { … … 84 135 } 85 136 137 /* Directory holding lock files */ 86 138 const char * getlockdir() 87 139 { … … 94 146 } 95 147 148 /* Directory holding the pid files */ 96 149 const char * getpiddir() 97 150 { … … 104 157 } 105 158 159 /* Directory holding the private files */ 106 160 const char * getprivatedir() 107 161 { … … 114 168 } 115 169 170 /* Location of smbpasswd */ 116 171 const char * getsmbpasswd() 117 172 { … … 124 179 } 125 180 181 /* Statically configured LanMan hosts */ 126 182 const char * getlmhosts() 127 183 { … … 139 195 * @sa lib_path() to get the path to a file inside the LIBDIR. 140 196 **/ 141 // we try to set the libdir based on the current running process197 // SCS we try to set the libdir based on the current running process 142 198 const char * getlibdir() 143 199 { … … 158 214 fstring dyn_SHLIBEXT = SHLIBEXT; 159 215 160 161 216 #else 162 217 163 pstring dyn_CONFIGFILE = CONFIGFILE; /**< Location of smb.conf file. **/ 218 char const *dyn_SBINDIR = SBINDIR, 219 *dyn_BINDIR = BINDIR, 220 *dyn_SWATDIR = SWATDIR; 221 222 /**< Location of smb.conf file. **/ 223 pstring dyn_CONFIGFILE = CONFIGFILE; 164 224 165 225 /** Log file directory. **/
Note:
See TracChangeset
for help on using the changeset viewer.