Chaged MaxScale default installation directory to /usr/local/mariadb/maxscale and MaxAdmin password to 'mariadb'.
This commit is contained in:
@ -91,7 +91,7 @@ char *pw;
|
||||
initialise();
|
||||
if (users == NULL)
|
||||
{
|
||||
if (strcmp(username, "admin") == 0 && strcmp(password, "skysql") == 0)
|
||||
if (strcmp(username, "admin") == 0 && strcmp(password, "mariadb") == 0)
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
@ -123,7 +123,7 @@ char uname[80], passwd[80];
|
||||
sprintf(fname, "%s/etc/passwd", home);
|
||||
}
|
||||
else{
|
||||
sprintf(fname, "/usr/local/skysql/MaxScale/etc/passwd");
|
||||
sprintf(fname, "/usr/local/mariadb/maxscale/etc/passwd");
|
||||
}
|
||||
if ((fp = fopen(fname, "r")) == NULL)
|
||||
return NULL;
|
||||
@ -159,7 +159,7 @@ char fname[1024], *home, *cpasswd;
|
||||
sprintf(fname, "%s/etc/passwd", home);
|
||||
}
|
||||
else{
|
||||
sprintf(fname, "/usr/local/skysql/MaxScale/etc/passwd");
|
||||
sprintf(fname, "/usr/local/mariadb/maxscale/etc/passwd");
|
||||
}
|
||||
|
||||
if (users == NULL)
|
||||
@ -259,8 +259,8 @@ char* admin_remove_user(
|
||||
sprintf(fname, "%s/etc/passwd", home);
|
||||
sprintf(fname_tmp, "%s/etc/passwd_tmp", home);
|
||||
} else {
|
||||
sprintf(fname, "/usr/local/skysql/MaxScale/etc/passwd");
|
||||
sprintf(fname_tmp, "/usr/local/skysql/MaxScale/etc/passwd_tmp");
|
||||
sprintf(fname, "/usr/local/mariadb/maxscale/etc/passwd");
|
||||
sprintf(fname_tmp, "/usr/local/mariadb/maxscale/etc/passwd_tmp");
|
||||
}
|
||||
/**
|
||||
* Rewrite passwd file from memory.
|
||||
|
||||
@ -997,10 +997,10 @@ static void usage(void)
|
||||
" (default: $MAXSCALE_HOME/etc/MaxScale.cnf)\n"
|
||||
" -l|--log=... log to file or shared memory\n"
|
||||
" -lfile or -lshm - defaults to shared memory\n"
|
||||
" -s|--syslog= log messages to syslog"
|
||||
" true or false - defaults to true"
|
||||
" -S|--maxscalelog= log messages to MaxScale log"
|
||||
" true or false - defaults to true"
|
||||
" -s|--syslog= log messages to syslog."
|
||||
" True or false - defaults to true\n"
|
||||
" -S|--maxscalelog= log messages to MaxScale log."
|
||||
" True or false - defaults to true\n"
|
||||
" -v|--version print version info and exit\n"
|
||||
" -?|--help show this help\n"
|
||||
, progname);
|
||||
|
||||
@ -109,7 +109,7 @@ char* get_maxscale_home(void)
|
||||
char* home = getenv("MAXSCALE_HOME");
|
||||
if (home == NULL)
|
||||
{
|
||||
home = "/usr/local/skysql/MaxScale";
|
||||
home = "/usr/local/mariadb/maxscale";
|
||||
}
|
||||
return home;
|
||||
}
|
||||
@ -118,7 +118,7 @@ char* get_maxscale_home(void)
|
||||
/**
|
||||
* Load the dynamic library related to a gateway module. The routine
|
||||
* will look for library files in the current directory,
|
||||
* $MAXSCALE_HOME/modules and /usr/local/skysql/MaxScale/modules.
|
||||
* $MAXSCALE_HOME/modules and /usr/local/mariadb/maxscale/modules.
|
||||
*
|
||||
* @param module Name of the module to load
|
||||
* @param type Type of module, used purely for registration
|
||||
|
||||
@ -73,7 +73,7 @@ static int reported = 0;
|
||||
home = getenv("MAXSCALE_HOME");
|
||||
|
||||
if (home == NULL) {
|
||||
home = "/usr/local/skysql/MaxScale";
|
||||
home = "/usr/local/mariadb/maxscale";
|
||||
}
|
||||
snprintf(secret_file, 255, "%s/etc/.secrets", home);
|
||||
|
||||
|
||||
@ -229,7 +229,7 @@ GWPROTOCOL *funcs;
|
||||
{
|
||||
/* Try loading authentication data from file cache */
|
||||
char *ptr, path[4097];
|
||||
strcpy(path, "/usr/local/skysql/MaxScale");
|
||||
strcpy(path, "/usr/local/mariadb/maxscale");
|
||||
if ((ptr = getenv("MAXSCALE_HOME")) != NULL)
|
||||
{
|
||||
strncpy(path, ptr, 4096);
|
||||
@ -259,7 +259,7 @@ GWPROTOCOL *funcs;
|
||||
/* Save authentication data to file cache */
|
||||
char *ptr, path[4097];
|
||||
int mkdir_rval = 0;
|
||||
strcpy(path, "/usr/local/skysql/MaxScale");
|
||||
strcpy(path, "/usr/local/mariadb/maxscale");
|
||||
if ((ptr = getenv("MAXSCALE_HOME")) != NULL)
|
||||
{
|
||||
strncpy(path, ptr, 4096);
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
/**
|
||||
* test1 default user
|
||||
*
|
||||
* Test that the username password admin/skysql is accepted if no users
|
||||
* Test that the username password admin/mariadb is accepted if no users
|
||||
* have been created and that no other users are accepted
|
||||
*
|
||||
* WARNING: $MAXSCALE_HOME/etc/passwd must be removed before this test is run
|
||||
@ -45,7 +45,7 @@
|
||||
static int
|
||||
test1()
|
||||
{
|
||||
if (admin_verify("admin", "skysql") == 0)
|
||||
if (admin_verify("admin", "mariadb") == 0)
|
||||
{
|
||||
fprintf(stderr, "admin_verify: test 1.1 (default user) failed.\n");
|
||||
return 1;
|
||||
@ -270,7 +270,7 @@ char *home, buf[1024];
|
||||
|
||||
/* Unlink any existing password file before running this test */
|
||||
if ((home = getenv("MAXSCALE_HOME")) == NULL || strlen(home) >= 1024)
|
||||
home = "/usr/local/skysql";
|
||||
home = "/usr/local/mariadb";
|
||||
sprintf(buf, "%s/etc/passwd", home);
|
||||
if(!is_valid_posix_path(buf))
|
||||
exit(1);
|
||||
@ -284,7 +284,7 @@ char *home, buf[1024];
|
||||
result += test5();
|
||||
|
||||
/* Add the default user back so other tests can use it */
|
||||
admin_add_user("admin", "skysql");
|
||||
admin_add_user("admin", "mariadb");
|
||||
|
||||
exit(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user