Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
82860235
Commit
82860235
authored
Aug 11, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't include my_global.h in "pure" plugins
this partially reverts 6e56ebbb498
parent
a6e215f2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
35 additions
and
36 deletions
+35
-36
plugin/auth_gssapi/client_plugin.cc
plugin/auth_gssapi/client_plugin.cc
+3
-2
plugin/auth_gssapi/gssapi_client.cc
plugin/auth_gssapi/gssapi_client.cc
+2
-1
plugin/auth_gssapi/gssapi_errmsg.cc
plugin/auth_gssapi/gssapi_errmsg.cc
+0
-1
plugin/auth_gssapi/gssapi_server.cc
plugin/auth_gssapi/gssapi_server.cc
+7
-7
plugin/auth_gssapi/server_plugin.cc
plugin/auth_gssapi/server_plugin.cc
+11
-3
plugin/auth_gssapi/sspi_client.cc
plugin/auth_gssapi/sspi_client.cc
+2
-1
plugin/auth_gssapi/sspi_errmsg.cc
plugin/auth_gssapi/sspi_errmsg.cc
+1
-2
plugin/auth_gssapi/sspi_server.cc
plugin/auth_gssapi/sspi_server.cc
+3
-6
plugin/cracklib_password_check/cracklib_password_check.c
plugin/cracklib_password_check/cracklib_password_check.c
+3
-5
plugin/simple_password_check/simple_password_check.c
plugin/simple_password_check/simple_password_check.c
+3
-8
No files found.
plugin/auth_gssapi/client_plugin.cc
View file @
82860235
...
...
@@ -31,12 +31,13 @@ POSSIBILITY OF SUCH DAMAGE.
GSSAPI authentication plugin, client side
*/
#include <my_global.h>
#include <string.h>
#include <stdarg.h>
#include <mysqld_error.h>
#include <mysql/client_plugin.h>
#include <mysql.h>
#include <stdio.h>
#include "common.h"
#include <string.h>
extern
int
auth_client
(
char
*
principal_name
,
char
*
mech
,
...
...
plugin/auth_gssapi/gssapi_client.cc
View file @
82860235
...
...
@@ -26,8 +26,9 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#include <my_global.h>
#include <gssapi/gssapi.h>
#include <string.h>
#include <stdio.h>
#include <mysql/plugin_auth.h>
#include <mysqld_error.h>
#include <mysql.h>
...
...
plugin/auth_gssapi/gssapi_errmsg.cc
View file @
82860235
...
...
@@ -26,7 +26,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#include <my_global.h>
#include <gssapi.h>
#include <string.h>
...
...
plugin/auth_gssapi/gssapi_server.cc
View file @
82860235
#include <my_
global
.h>
#include <my_
config
.h>
#include <gssapi/gssapi.h>
#include <stdio.h>
#include <mysql/plugin_auth.h>
#include <my_sys.h>
#include <mysqld_error.h>
#include <
lo
g.h>
#include <
strin
g.h>
#include "server_plugin.h"
#include "gssapi_errmsg.h"
...
...
@@ -17,11 +17,11 @@ static void log_error( OM_uint32 major, OM_uint32 minor, const char *msg)
char
sysmsg
[
1024
];
gssapi_errmsg
(
major
,
minor
,
sysmsg
,
sizeof
(
sysmsg
));
my_printf_error
(
ER_UNKNOWN_ERROR
,
"Server GSSAPI error (major %u, minor %u) : %s -%s"
,
MYF
(
0
)
,
major
,
minor
,
msg
,
sysmsg
);
0
,
major
,
minor
,
msg
,
sysmsg
);
}
else
{
my_printf_error
(
ER_UNKNOWN_ERROR
,
"Server GSSAPI error : %s"
,
MYF
(
0
)
,
msg
);
my_printf_error
(
ER_UNKNOWN_ERROR
,
"Server GSSAPI error : %s"
,
0
,
msg
);
}
}
...
...
@@ -196,7 +196,7 @@ int auth_server(MYSQL_PLUGIN_VIO *vio,const char *user, size_t userlen, int use_
/* send token to peer */
if
(
output
.
length
)
{
if
(
vio
->
write_packet
(
vio
,
(
const
uchar
*
)
output
.
value
,
output
.
length
))
if
(
vio
->
write_packet
(
vio
,
(
const
u
nsigned
char
*
)
output
.
value
,
output
.
length
))
{
gss_release_buffer
(
&
minor
,
&
output
);
log_error
(
major
,
minor
,
"communication error(write)"
);
...
...
@@ -236,7 +236,7 @@ int auth_server(MYSQL_PLUGIN_VIO *vio,const char *user, size_t userlen, int use_
{
my_printf_error
(
ER_ACCESS_DENIED_ERROR
,
"GSSAPI name mismatch, requested '%s', actual name '%.*s'"
,
MYF
(
0
)
,
user
,
(
int
)
client_name_buf
.
length
,
client_name_str
);
0
,
user
,
(
int
)
client_name_buf
.
length
,
client_name_str
);
}
gss_release_buffer
(
&
minor
,
&
client_name_buf
);
...
...
plugin/auth_gssapi/server_plugin.cc
View file @
82860235
...
...
@@ -31,10 +31,18 @@
GSSAPI authentication plugin, server side
*/
#include <my_global.h>
#include <my_sys.h>
#ifdef _WIN32
typedef
unsigned
__int64
my_ulonglong
;
#else
typedef
unsigned
long
long
my_ulonglong
;
#endif
#include <stdlib.h>
#include <mysqld_error.h>
#include <typelib.h>
#include <mysql/plugin_auth.h>
#include "string.h"
#include "server_plugin.h"
#include "common.h"
...
...
@@ -133,7 +141,7 @@ static const char* mech_names[] = {
NULL
};
static
TYPELIB
mech_name_typelib
=
{
array_elements
(
mech_names
)
-
1
,
3
,
"mech_name_typelib"
,
mech_names
,
NULL
...
...
plugin/auth_gssapi/sspi_client.cc
View file @
82860235
...
...
@@ -27,10 +27,11 @@ POSSIBILITY OF SUCH DAMAGE.
*/
#define SECURITY_WIN32
#include <my_global.h>
#include <windows.h>
#include <sspi.h>
#include <SecExt.h>
#include <stdarg.h>
#include <stdio.h>
#include <mysql/plugin_auth.h>
#include <mysql.h>
...
...
plugin/auth_gssapi/sspi_errmsg.cc
View file @
82860235
...
...
@@ -26,9 +26,8 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#include <my_global.h>
#include <windows.h>
#include <st
ring
.h>
#include <st
dio
.h>
#define ERRSYM(x) {x, #x}
static
struct
{
...
...
plugin/auth_gssapi/sspi_server.cc
View file @
82860235
...
...
@@ -26,14 +26,11 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#include <my_global.h>
#include "sspi.h"
#include "common.h"
#include "server_plugin.h"
#include <mysql/plugin_auth.h>
#include <my_sys.h>
#include <mysqld_error.h>
#include <log.h>
/* This sends the error to the client */
...
...
@@ -43,11 +40,11 @@ static void log_error(SECURITY_STATUS err, const char *msg)
{
char
buf
[
1024
];
sspi_errmsg
(
err
,
buf
,
sizeof
(
buf
));
my_printf_error
(
ER_UNKNOWN_ERROR
,
"SSPI server error 0x%x - %s - %s"
,
MYF
(
0
)
,
msg
,
buf
);
my_printf_error
(
ER_UNKNOWN_ERROR
,
"SSPI server error 0x%x - %s - %s"
,
0
,
msg
,
buf
);
}
else
{
my_printf_error
(
ER_UNKNOWN_ERROR
,
"SSPI server error %s"
,
MYF
(
0
)
,
msg
);
my_printf_error
(
ER_UNKNOWN_ERROR
,
"SSPI server error %s"
,
0
,
msg
);
}
}
...
...
@@ -250,7 +247,7 @@ int auth_server(MYSQL_PLUGIN_VIO *vio, const char *user, size_t user_len, int co
{
my_printf_error
(
ER_ACCESS_DENIED_ERROR
,
"GSSAPI name mismatch, requested '%s', actual name '%s'"
,
MYF
(
0
)
,
user
,
client_name
);
0
,
user
,
client_name
);
}
cleanup:
...
...
plugin/cracklib_password_check/cracklib_password_check.c
View file @
82860235
...
...
@@ -13,12 +13,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#include <my_global.h>
#include <mysql/plugin_password_validation.h>
#include <crack.h>
#include <string.h>
#include <alloca.h>
#include <my_sys.h>
#include <mysqld_error.h>
static
char
*
dictionary
;
...
...
@@ -37,11 +35,11 @@ static int crackme(MYSQL_CONST_LEX_STRING *username, MYSQL_CONST_LEX_STRING *pas
if
((
res
=
FascistCheckUser
(
password
->
str
,
dictionary
,
user
,
host
)))
{
my_printf_error
(
ER_NOT_VALID_PASSWORD
,
"cracklib: %s"
,
M
YF
(
ME_JUST_WARNING
)
,
res
);
return
TRUE
;
M
E_WARNING
,
res
);
return
1
;
}
return
FALSE
;
return
0
;
}
static
MYSQL_SYSVAR_STR
(
dictionary
,
dictionary
,
PLUGIN_VAR_RQCMDARG
|
PLUGIN_VAR_READONLY
,
...
...
plugin/simple_password_check/simple_password_check.c
View file @
82860235
...
...
@@ -14,13 +14,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#include <my_global.h>
#include <my_sys.h>
#include <mysqld_error.h>
#include <mysql/plugin_password_validation.h>
#include <ctype.h>
#include <string.h>
#include <my_attribute.h>
static
unsigned
min_length
,
min_digits
,
min_letters
,
min_others
;
...
...
@@ -53,19 +50,17 @@ static int validate(MYSQL_CONST_LEX_STRING *username,
others
<
min_others
;
}
static
void
fix_min_length
(
MYSQL_THD
thd
__attribute__
((
unused
)),
struct
st_mysql_sys_var
*
var
__attribute__
((
unused
)),
static
void
fix_min_length
(
MYSQL_THD
thd
,
struct
st_mysql_sys_var
*
var
,
void
*
var_ptr
,
const
void
*
save
)
{
uint
new_min_length
;
u
nsigned
int
new_min_length
;
*
((
unsigned
int
*
)
var_ptr
)
=
*
((
unsigned
int
*
)
save
);
new_min_length
=
min_digits
+
2
*
min_letters
+
min_others
;
if
(
min_length
<
new_min_length
)
{
my_printf_error
(
ER_TRUNCATED_WRONG_VALUE
,
"Adjusted the value of simple_password_check_minimal_length "
"from %u to %u"
,
ME_JUST_WARNING
,
min_length
,
new_min_length
);
"from %u to %u"
,
ME_WARNING
,
min_length
,
new_min_length
);
min_length
=
new_min_length
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment