diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-09-11 20:55:11 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-09-12 16:42:05 +0200 |
commit | 347eeefbfc658c8531878218487d729f4e020805 (patch) | |
tree | 0502ac4bdf1c09e8ee70aad97431474003bde51f /mysys | |
parent | 611dc0dcf4b39c670daf229f10e43b8b33f6e8c3 (diff) | |
download | mariadb-git-347eeefbfc658c8531878218487d729f4e020805.tar.gz |
don't use my_copystat in the server
it was supposed to be used in command-line tools only.
Different fix for 4e5473862e:
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_redel.c | 7 | ||||
-rw-r--r-- | mysys/my_static.c | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/mysys/my_redel.c b/mysys/my_redel.c index b285bb25e2e..e5e4f48d9d5 100644 --- a/mysys/my_redel.c +++ b/mysys/my_redel.c @@ -1,5 +1,5 @@ -/* - Copyright (c) 2000, 2010, Oracle and/or its affiliates +/* Copyright (c) 2000, 2010, Oracle and/or its affiliates + Copyright (c) 2009, 2016, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -49,7 +49,8 @@ int my_redel(const char *org_name, const char *tmp_name, DBUG_PRINT("my",("org_name: '%s' tmp_name: '%s' MyFlags: %d", org_name,tmp_name,MyFlags)); - if (my_copystat(org_name,tmp_name,MyFlags) < 0) + if (!my_disable_copystat_in_redel && + my_copystat(org_name,tmp_name,MyFlags) < 0) goto end; if (MyFlags & MY_REDEL_MAKE_BACKUP) { diff --git a/mysys/my_static.c b/mysys/my_static.c index fdc01b1248b..48b1e5b8dd9 100644 --- a/mysys/my_static.c +++ b/mysys/my_static.c @@ -99,6 +99,7 @@ my_bool my_disable_sync=0; my_bool my_disable_async_io=0; my_bool my_disable_flush_key_blocks=0; my_bool my_disable_symlinks=0; +my_bool my_disable_copystat_in_redel=0; /* Note that PSI_hook and PSI_server are unconditionally |