diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-06-13 02:07:52 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-06-13 02:08:03 +0200 |
commit | 8f1d6cb579ec203ce86f8af30bea729dbb0a9f7f (patch) | |
tree | ded4d754f324f59688345b3fd19459b3bb8ad70e /overlays/php-packages | |
parent | 8b2f048bed8d081f18d9ba7bc1cce16c28670217 (diff) | |
download | Nix-8f1d6cb579ec203ce86f8af30bea729dbb0a9f7f.tar.gz Nix-8f1d6cb579ec203ce86f8af30bea729dbb0a9f7f.tar.zst Nix-8f1d6cb579ec203ce86f8af30bea729dbb0a9f7f.zip |
Fix Adminer mysql connection for PAM authentication
Diffstat (limited to 'overlays/php-packages')
-rw-r--r-- | overlays/php-packages/default.nix | 6 | ||||
-rw-r--r-- | overlays/php-packages/mysqli_patch.patch | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/overlays/php-packages/default.nix b/overlays/php-packages/default.nix new file mode 100644 index 0000000..90fb613 --- /dev/null +++ b/overlays/php-packages/default.nix | |||
@@ -0,0 +1,6 @@ | |||
1 | self: super: rec { | ||
2 | myPhpPackages.mysqli_pam = self.php74.extensions.mysqli.overrideAttrs(old: { | ||
3 | configureFlags = [ "--with-mysqli=${self.libmysqlclient_pam}/bin/mysql_config" "--with-mysql-sock=/run/mysqld/mysqld.sock" ]; | ||
4 | patches = old.patches or [] ++ [ ./mysqli_patch.patch ]; | ||
5 | }); | ||
6 | } | ||
diff --git a/overlays/php-packages/mysqli_patch.patch b/overlays/php-packages/mysqli_patch.patch new file mode 100644 index 0000000..0ec3a3b --- /dev/null +++ b/overlays/php-packages/mysqli_patch.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- a/mysqli_nonapi.c | ||
2 | +++ b/mysqli_nonapi.c | ||
3 | @@ -263,7 +263,7 @@ void mysqli_common_connect(INTERNAL_FUNC | ||
4 | php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql)); | ||
5 | |||
6 | #if !defined(MYSQLI_USE_MYSQLND) | ||
7 | - mysql->mysql->reconnect = MyG(reconnect); | ||
8 | + mysql_options(mysql->mysql, MYSQL_OPT_RECONNECT, (my_bool *)&MyG(reconnect)); | ||
9 | #endif | ||
10 | |||
11 | mysql_options(mysql->mysql, MYSQL_OPT_LOCAL_INFILE, (char *)&MyG(allow_local_infile)); | ||