1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Addendum 3 for bug #BUG#11764517 : expand secure_file_priv to the real

patch so that it can later be compared with patchs with expanded symlinks
This commit is contained in:
Georgi Kodinov
2011-05-05 12:10:49 +03:00
parent 93f62d51a8
commit 858cf12f89
4 changed files with 27 additions and 17 deletions

View File

@ -7974,9 +7974,23 @@ static void fix_paths(void)
*/
if (opt_secure_file_priv)
{
convert_dirname(buff, opt_secure_file_priv, NullS);
my_free(opt_secure_file_priv, MYF(0));
opt_secure_file_priv= my_strdup(buff, MYF(MY_FAE));
if (*opt_secure_file_priv == 0)
{
opt_secure_file_priv= 0;
}
else
{
if (strlen(opt_secure_file_priv) >= FN_REFLEN)
opt_secure_file_priv[FN_REFLEN-1]= '\0';
if (my_realpath(buff, opt_secure_file_priv, 0))
{
sql_print_warning("Failed to normalize the argument for --secure-file-priv.");
exit(1);
}
char *secure_file_real_path= (char *)my_malloc(FN_REFLEN, MYF(MY_FAE));
convert_dirname(secure_file_real_path, buff, NullS); my_free(opt_secure_file_priv, MYF(0));
opt_secure_file_priv= secure_file_real_path;
}
}
}