summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Beaupré2010-12-01 18:25:54 (GMT)
committeranarcat2010-12-20 20:19:01 (GMT)
commitb6a53d66122a034395d73a3666b329e6c787da6a (patch)
tree685f0f43a1ac32197927b931fec2c990581e9893
parent29e2fea1a139500cd4f1d4af4b91a7a93f055bd5 (diff)
describe required work for safe_shell_exec()
-rw-r--r--db/mysql/mysql_service.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/db/mysql/mysql_service.inc b/db/mysql/mysql_service.inc
index 546bae4..27aacd2 100644
--- a/db/mysql/mysql_service.inc
+++ b/db/mysql/mysql_service.inc
@@ -126,6 +126,13 @@ class provisionService_db_mysql extends provisionService_db_pdo {
* We go through all this trouble to hide the password from the commandline,
* it's the most secure way (apart from writing a temporary file, which would
* create conflicts in parallel runs)
+ *
+ * XXX: this needs to be refactored so it:
+ * - works even if /dev/fd/3 doesn't exit
+ * - has a meaningful name (we're talking about reading and writing
+ * dumps here, really, or at least call mysql and mysqldump, not
+ * just any command)
+ * - can be pushed upstream to drush (http://drupal.org/node/671906)
*/
function safe_shell_exec($cmd, $db_host, $db_user, $db_passwd, $dump_file = null) {
$mycnf = sprintf('[client]