Skip to content

Commit

Permalink
Bug#23061746 EXPORT MY_MAKE_SCRAMBLED_PASSWORD() IN LIBMYSQLCLIENT
Browse files Browse the repository at this point in the history
Problem: The list of symbols exported by libmysqlclient.so was
restricted by the fix for bug #20476596. The list of symbols was
restricted to two classes of functions:

1. The public documented API
2. Undocumented symbols that we know are used

Pure-FTPd depends on a symbol that was not included:
my_make_scrambled_password. If that symbols is not found, Pure-FTPd
will fall back to make_scrambled_password, which is also hidden in
libmysqlclient.

Fix: Export my_make_scrambled_password in libmysqlclient.so.

The symbol will be removed again in a future version.

Since we're adding a symbol, bump the minor ABI version number from 2
to 3.
  • Loading branch information
nryeng committed Apr 12, 2016
1 parent e8f2380 commit f147b25
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cmake/mysql_version.cmake
Expand Up @@ -18,7 +18,7 @@
#

SET(SHARED_LIB_MAJOR_VERSION "20")
SET(SHARED_LIB_MINOR_VERSION "2")
SET(SHARED_LIB_MINOR_VERSION "3")
SET(PROTOCOL_VERSION "10")
SET(DOT_FRM_VERSION "6")

Expand Down Expand Up @@ -83,7 +83,7 @@ SET(SHARED_LIB_PATCH_VERSION ${PATCH_VERSION})

# Beware : This is a hack to reset SHARED_LIB_PATCH_VERSION in accordance
# with the change in value of SHARED_LIB_MINOR_VERSION.
MATH(EXPR SHARED_LIB_PATCH_VERSION "${SHARED_LIB_PATCH_VERSION}-11")
MATH(EXPR SHARED_LIB_PATCH_VERSION "${SHARED_LIB_PATCH_VERSION}-13")

SET(MYSQL_TCP_PORT_DEFAULT "3306")

Expand Down
24 changes: 20 additions & 4 deletions libmysql/CMakeLists.txt
@@ -1,4 +1,4 @@
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
#
# 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
Expand Down Expand Up @@ -146,20 +146,36 @@ CACHE INTERNAL "Functions exported by client API"

)

# Below list will have all the undocumented C API symbols but still exported.
# Below lists will have all the undocumented C API symbols but still exported.
# Once the decision is taken to have documentation we need to move them to
# CLIENT_API_FUNCTIONS list.
SET(CLIENT_API_FUNCTIONS_UNDOCUMENTED
SET(CLIENT_API_FUNCTIONS_UNDOCUMENTED_20_0
get_tty_password
# my_load_defaults is a wrapper for load_defaults and it is not documented. We
# will have a FR to replace this for decent name/functionality and document it.
my_load_defaults
handle_options

CACHE INTERNAL "Undocumented Functions exported by client API"
CACHE INTERNAL "Undocumented functions exported by client API in version 20.0"

)

SET(CLIENT_API_FUNCTIONS_UNDOCUMENTED_20_3
# pure-ftpd 1.0.42 needs either my_make_scrambled_password (preferred)
# or make_scrambled_password.
my_make_scrambled_password

CACHE INTERNAL "Undocumented functions exported by client API in version 20.3"

)

SET(CLIENT_API_FUNCTIONS_UNDOCUMENTED
${CLIENT_API_FUNCTIONS_UNDOCUMENTED_20_0}
${CLIENT_API_FUNCTIONS_UNDOCUMENTED_20_3}

CACHE INTERNAL "Undocumented functions exported by client API"

)

SET(CLIENT_SOURCES
get_password.c
Expand Down
7 changes: 5 additions & 2 deletions libmysql/libmysql.ver.in
@@ -1,4 +1,4 @@
/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.

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
Expand All @@ -15,4 +15,7 @@


libmysqlclient_@SHARED_LIB_MAJOR_VERSION@.0
{ global: ${CLIENT_API_FUNCTIONS};${CLIENT_API_FUNCTIONS_UNDOCUMENTED}; local: *; };
{ global: ${CLIENT_API_FUNCTIONS};${CLIENT_API_FUNCTIONS_UNDOCUMENTED_20_0}; local: *; };

libmysqlclient_@SHARED_LIB_MAJOR_VERSION@.3
{ ${CLIENT_API_FUNCTIONS_UNDOCUMENTED_20_3}; } libmysqlclient_@SHARED_LIB_MAJOR_VERSION@.0;

0 comments on commit f147b25

Please sign in to comment.