summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/dynconfig.c216
-rw-r--r--source3/include/dynconfig.h16
2 files changed, 0 insertions, 232 deletions
diff --git a/source3/dynconfig.c b/source3/dynconfig.c
index 57008ece44..241a659a51 100644
--- a/source3/dynconfig.c
+++ b/source3/dynconfig.c
@@ -40,12 +40,6 @@
* table? There's kind of a chicken-and-egg situation there...
**/
-#if 0
-static char const *dyn_SBINDIR = SBINDIR;
-static char const *dyn_BINDIR = BINDIR;
-static char const *dyn_SWATDIR = SWATDIR;
-#endif
-
#define DEFINE_DYN_CONFIG_PARAM(name) \
static char *dyn_##name; \
\
@@ -85,216 +79,6 @@ DEFINE_DYN_CONFIG_PARAM(PIDDIR)
DEFINE_DYN_CONFIG_PARAM(SMB_PASSWD_FILE)
DEFINE_DYN_CONFIG_PARAM(PRIVATE_DIR)
-#if 0
-static char *dyn_CONFIGFILE; /**< Location of smb.conf file. **/
-
-const char *get_dyn_CONFIGFILE(void)
-{
- if (dyn_CONFIGFILE == NULL) {
- return CONFIGFILE;
- }
- return dyn_CONFIGFILE;
-}
-
-const char *set_dyn_CONFIGFILE(const char *newpath)
-{
- if (dyn_CONFIGFILE) {
- SAFE_FREE(dyn_CONFIGFILE);
- }
- dyn_CONFIGFILE = SMB_STRDUP(newpath);
- return dyn_CONFIGFILE;
-}
-
-/** Log file directory. **/
-static char *dyn_LOGFILEBASE;
-
-const char *get_dyn_LOGFILEBASE(void)
-{
- if (dyn_LOGFILEBASE == NULL) {
- return LOGFILEBASE;
- }
- return dyn_LOGFILEBASE;
-}
-
-const char *set_dyn_LOGFILEBASE(const char *newpath)
-{
- if (dyn_LOGFILEBASE) {
- SAFE_FREE(dyn_LOGFILEBASE);
- }
- dyn_LOGFILEBASE = SMB_STRDUP(newpath);
- return dyn_LOGFILEBASE;
-}
-
-/** Statically configured LanMan hosts. **/
-static char *dyn_LMHOSTSFILE;
-
-const char *get_dyn_LMHOSTSFILE(void)
-{
- if (dyn_LMHOSTSFILE == NULL) {
- return LMHOSTSFILE;
- }
- return dyn_LMHOSTSFILE;
-}
-
-const char *set_dyn_LMHOSTSFILE(const char *newpath)
-{
- if (dyn_LMHOSTSFILE) {
- SAFE_FREE(dyn_LMHOSTSFILE);
- }
- dyn_LMHOSTSFILE = SMB_STRDUP(newpath);
- return dyn_LMHOSTSFILE;
-}
-
-/**
- * @brief Samba data directory.
- *
- * @sa data_path() to get the path to a file inside the CODEPAGEDIR.
- **/
-static char *dyn_CODEPAGEDIR;
-
-const char *get_dyn_CODEPAGEDIR(void)
-{
- if (dyn_CODEPAGEDIR == NULL) {
- return CODEPAGEDIR;
- }
- return dyn_CODEPAGEDIR;
-}
-
-const char *set_dyn_CODEPAGEDIR(const char *newpath)
-{
- if (dyn_CODEPAGEDIR) {
- SAFE_FREE(dyn_CODEPAGEDIR);
- }
- dyn_CODEPAGEDIR = SMB_STRDUP(newpath);
- return dyn_CODEPAGEDIR;
-}
-
-/**
- * @brief Samba library directory.
- *
- * @sa lib_path() to get the path to a file inside the LIBDIR.
- **/
-static char *dyn_LIBDIR;
-
-const char *get_dyn_LIBDIR(void)
-{
- if (dyn_LIBDIR == NULL) {
- return LIBDIR;
- }
- return dyn_CODEPAGEDIR;
-}
-
-const char *set_dyn_LIBDIR(const char *newpath)
-{
- if (dyn_LIBDIR) {
- SAFE_FREE(dyn_LIBDIR);
- }
- dyn_LIBDIR = SMB_STRDUP(newpath);
- return dyn_LIBDIR;
-}
-
-static char *dyn_SHLIBEXT;
-
-const char *get_dyn_SHLIBEXT(void)
-{
- if (dyn_SHLIBEXT == NULL) {
- return SHLIBEXT;
- }
- return dyn_SHLIBEXT;
-}
-
-const char *set_dyn_SHLIBEXT(const char *newpath)
-{
- if (dyn_SHLIBEXT) {
- SAFE_FREE(dyn_SHLIBEXT);
- }
- dyn_SHLIBEXT = SMB_STRDUP(newpath);
- return dyn_SHLIBEXT;
-}
-
-/**
- * @brief Directory holding lock files.
- *
- * Not writable, but used to set a default in the parameter table.
- **/
-
-static char *dyn_LOCKDIR;
-
-const char *get_dyn_LOCKDIR(void)
-{
- if (dyn_LOCKDIR == NULL) {
- return LOCKDIR;
- }
- return dyn_LOCKDIR;
-}
-
-const char *set_dyn_LOCKDIR(const char *newpath)
-{
- if (dyn_LOCKDIR) {
- SAFE_FREE(dyn_LOCKDIR);
- }
- dyn_LOCKDIR = SMB_STRDUP(newpath);
- return dyn_LOCKDIR;
-}
-
-static char *dyn_PIDDIR;
-
-const char *get_dyn_PIDDIR(void)
-{
- if (dyn_PIDDIR == NULL) {
- return PIDDIR;
- }
- return dyn_PIDDIR;
-}
-
-const char *set_dyn_PIDDIR(const char *newpath)
-{
- if (dyn_PIDDIR) {
- SAFE_FREE(dyn_PIDDIR);
- }
- dyn_PIDDIR = SMB_STRDUP(newpath);
- return dyn_PIDDIR;
-}
-
-static char *dyn_SMB_PASSWD_FILE;
-
-const char *get_dyn_SMB_PASSWD_FILE(void)
-{
- if (dyn_SMB_PASSWD_FILE == NULL) {
- return SMB_PASSWD_FILE;
- }
- return dyn_SMB_PASSWD_FILE;
-}
-
-const char *set_dyn_SMB_PASSWD_FILE(const char *newpath)
-{
- if (dyn_SMB_PASSWD_FILE) {
- SAFE_FREE(dyn_SMB_PASSWD_FILE);
- }
- dyn_SMB_PASSWD_FILE = SMB_STRDUP(newpath);
- return dyn_SMB_PASSWD_FILE;
-}
-
-static char *dyn_PRIVATE_DIR;
-
-const char *get_dyn_PRIVATE_DIR(void)
-{
- if (dyn_PRIVATE_DIR == NULL) {
- return PRIVATE_DIR;
- }
- return dyn_PRIVATE_DIR;
-}
-
-const char *set_dyn_PRIVATE_DIR(const char *newpath)
-{
- if (dyn_PRIVATE_DIR) {
- SAFE_FREE(dyn_PRIVATE_DIR);
- }
- dyn_PRIVATE_DIR = SMB_STRDUP(newpath);
- return dyn_PRIVATE_DIR;
-}
-#endif
-
/* In non-FHS mode, these should be configurable using 'lock dir =';
but in FHS mode, they are their own directory. Implement as wrapper
functions so that everything can still be kept in dynconfig.c.
diff --git a/source3/include/dynconfig.h b/source3/include/dynconfig.h
index a86cca262e..8a9bb5ef97 100644
--- a/source3/include/dynconfig.h
+++ b/source3/include/dynconfig.h
@@ -23,22 +23,6 @@
* @brief Exported global configurations.
**/
-#if 0
-const char *get_dyn_SBINDIR(void);
-const char *get_dyn_BINDIR(void);
-const char *get_dyn_SWATDIR(void);
-
-extern char dyn_CONFIGFILE[1024];
-extern char dyn_LOGFILEBASE[1024], dyn_LMHOSTSFILE[1024];
-extern char dyn_LIBDIR[1024];
-extern char dyn_CODEPAGEDIR[1024];
-extern fstring dyn_SHLIBEXT;
-extern char dyn_LOCKDIR[1024];
-extern char dyn_PIDDIR[1024];
-extern char dyn_SMB_PASSWD_FILE[1024];
-extern char dyn_PRIVATE_DIR[1024];
-#endif
-
const char *get_dyn_SBINDIR(void);
const char *set_dyn_SBINDIR(const char *newpath);
bool is_default_dyn_SBINDIR(void);