summaryrefslogtreecommitdiff
path: root/source3/param/loadparm.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r--source3/param/loadparm.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 8f92af90a9..845c2bd4e8 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -231,6 +231,13 @@ typedef struct
BOOL bNTPipeSupport;
BOOL bStatCache;
BOOL bKernelOplocks;
+#if defined(WITH_MYSQL) || defined(WITH_MYSQLSAM)
+ char *sMysqlDatabase;
+ char *sMysqlTable;
+ char *sMysqlUser;
+ char *sMysqlHost;
+ char *sMysqlPassFile;
+#endif
} global;
static global Globals;
@@ -747,6 +754,14 @@ static struct parm_struct parm_table[] =
{"ldap passwd file", P_STRING, P_GLOBAL, &Globals.szLdapPasswdFile, NULL, NULL, 0},
#endif /* WITH_LDAP */
+#if defined(WITH_MYSQL) || defined(WITH_MYSQLSAM)
+ {"MySQL Options", P_SEP, P_SEPARATOR},
+ {"mysql host", P_STRING, P_GLOBAL, &Globals.sMysqlHost, NULL, NULL, 0},
+ {"mysql user", P_STRING, P_GLOBAL, &Globals.sMysqlUser, NULL, NULL, 0},
+ {"mysql pass file", P_STRING, P_GLOBAL, &Globals.sMysqlPassFile, NULL, NULL, 0},
+ {"mysql database", P_STRING, P_GLOBAL, &Globals.sMysqlDatabase, NULL, NULL, 0},
+ {"mysql table", P_STRING, P_GLOBAL, &Globals.sMysqlTable, NULL, NULL, 0},
+#endif /* WITH_MYSQL */
{"Miscellaneous Options", P_SEP, P_SEPARATOR},
@@ -971,6 +986,14 @@ static void init_globals(void)
*/
Globals.bKernelOplocks = True;
+#if defined(WITH_MYSQL) || defined(WITH_MYSQLSAM)
+ string_set(&Globals.sMysqlHost,"localhost");
+ string_set(&Globals.sMysqlUser,"root");
+ string_set(&Globals.sMysqlPassFile,NULL);
+ string_set(&Globals.sMysqlDatabase,"samba");
+ string_set(&Globals.sMysqlTable,"smbpasswd");
+#endif
+
/*
* This must be done last as it checks the value in
* client_code_page.
@@ -1329,6 +1352,13 @@ FN_LOCAL_INTEGER(lp_printing,iPrinting)
FN_LOCAL_CHAR(lp_magicchar,magic_char)
+#if defined(WITH_MYSQL) || defined(WITH_MYSQLSAM)
+FN_GLOBAL_STRING(lp_mysql_host,&Globals.sMysqlHost)
+FN_GLOBAL_STRING(lp_mysql_user,&Globals.sMysqlUser)
+FN_GLOBAL_STRING(lp_mysql_passfile,&Globals.sMysqlPassFile)
+FN_GLOBAL_STRING(lp_mysql_db,&Globals.sMysqlDatabase)
+FN_GLOBAL_STRING(lp_mysql_table,&Globals.sMysqlTable)
+#endif
/* local prototypes */