Ignore:
Timestamp:
Jan 25, 2012, 9:46:18 AM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba Client 2.1: Fix for Ticket #181, remove several bogus files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/dynconfig.c

    r644 r680  
    44   Copyright (C) 2003 by Jim McDonough <jmcd@us.ibm.com>
    55   Copyright (C) 2007 by Jeremy Allison <jra@samba.org>
    6 
    76   This program is free software; you can redistribute it and/or modify
    87   it under the terms of the GNU General Public License as published by
    98   the Free Software Foundation; either version 3 of the License, or
    109   (at your option) any later version.
    11 
    1210   This program is distributed in the hope that it will be useful,
    1311   but WITHOUT ANY WARRANTY; without even the implied warranty of
    1412   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1513   GNU General Public License for more details.
    16 
    1714   You should have received a copy of the GNU General Public License
    1815   along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1916*/
    20 
    2117#include "includes.h"
    2218
     
    4036 * table?  There's kind of a chicken-and-egg situation there...
    4137 **/
    42 
    4338#ifndef __OS2__
    4439#define DEFINE_DYN_CONFIG_PARAM(name) \
     
    8479}
    8580#endif
    86 
    8781DEFINE_DYN_CONFIG_PARAM(SBINDIR)
    8882DEFINE_DYN_CONFIG_PARAM(BINDIR)
     
    10094DEFINE_DYN_CONFIG_PARAM(PRIVATE_DIR)
    10195
    102 
    10396#ifdef __OS2__
    104 
    10597/* Directory the binary was called from, same as getbindir() */
    10698const char *get_dyn_SBINDIR(void)
     
    117109                }
    118110        }
    119 
    120111        if (dyn_SBINDIR == NULL) {
    121112                return buffer;
     
    123114        return dyn_SBINDIR;
    124115}
    125 
    126116/* Directory the binary was called from, same as getsbindir() */
    127117const char *get_dyn_BINDIR(void)
     
    138128                }
    139129        }
    140 
    141130        if (dyn_BINDIR == NULL) {
    142131                return buffer;
     
    144133        return dyn_BINDIR;
    145134}
    146 
    147135/* Directory holding the SWAT files */
    148136const char *get_dyn_SWATDIR(void)
     
    159147                }
    160148        }
    161 
    162149        if (dyn_SWATDIR == NULL) {
    163150                return buffer;
     
    165152        return dyn_SWATDIR;
    166153}
    167 
    168154/* Location of smb.conf file. */
    169155const char *get_dyn_CONFIGFILE(void)
     
    191177                setenv("TMPDIR",tmpdir,0);
    192178        }
    193 
    194179        if (dyn_CONFIGFILE == NULL) {
    195180                return buffer;
     
    197182        return dyn_CONFIGFILE;
    198183}
    199 
    200184/** Log file directory. **/
    201185const char *get_dyn_LOGFILEBASE(void)
     
    211195        return dyn_LOGFILEBASE;
    212196}
    213 
    214197/** Statically configured LanMan hosts. **/
    215198const char *get_dyn_LMHOSTSFILE(void)
     
    225208        return dyn_LMHOSTSFILE;
    226209}
    227 
    228210/* Directory holding the codepages */
    229211const char *get_dyn_CODEPAGEDIR(void)
     
    237219                        snprintf(buffer, 260, "%s", CODEPAGEDIR);
    238220                } 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        }
    243228        if (dyn_CODEPAGEDIR == NULL) {
    244229                return buffer;
     
    246231        return dyn_CODEPAGEDIR;
    247232}
    248 
    249233/* Directory holding the libs */
    250234const char *get_dyn_LIBDIR(void)
     
    261245                }
    262246        }
    263 
    264247        if (dyn_LIBDIR == NULL) {
    265248                return buffer;
     
    267250        return dyn_LIBDIR;
    268251}
    269 
    270252/* Directory holding the modules */
    271253const char *get_dyn_MODULESDIR(void)
     
    282264                }
    283265        }
    284 
    285266        if (dyn_MODULESDIR == NULL) {
    286267                return buffer;
     
    288269        return dyn_MODULESDIR;
    289270}
    290 
    291271/* Directory holding lock files */
    292272const char *get_dyn_LOCKDIR(void)
     
    307287        return dyn_LOCKDIR;
    308288}
    309 
    310289/* Directory holding the pid files */
    311290const char *get_dyn_PIDDIR(void)
     
    321300        return dyn_PIDDIR;
    322301}
    323 
    324302/* Location of smbpasswd */
    325303const char *get_dyn_SMB_PASSWD_FILE(void)
     
    335313        return dyn_SMB_PASSWD_FILE;
    336314}
    337 
    338315/* Directory holding the private files */
    339316const char *get_dyn_PRIVATE_DIR(void)
     
    349326        return dyn_PRIVATE_DIR;
    350327}
    351 
    352328/* Directory holding the shared libs (same as libdir) */
    353329const char *get_dyn_SHLIBEXT(void)
     
    364340                }
    365341        }
    366 
    367342        if (dyn_SHLIBEXT == NULL) {
    368343                return buffer;
     
    370345        return dyn_SHLIBEXT;
    371346}
    372 
    373347#endif /* __OS2__ */
    374 
    375348/* In non-FHS mode, these should be configurable using 'lock dir =';
    376349   but in FHS mode, they are their own directory.  Implement as wrapper
    377350   functions so that everything can still be kept in dynconfig.c.
    378351 */
    379 
    380352const char *get_dyn_STATEDIR(void)
    381353{
     
    386358#endif
    387359}
    388 
    389360const char *get_dyn_CACHEDIR(void)
    390361{
Note: See TracChangeset for help on using the changeset viewer.