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
352d7cad
Commit
352d7cad
authored
Sep 27, 2012
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
8c2bb705
807f537f
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
150 additions
and
60 deletions
+150
-60
config/ac-macros/misc.m4
config/ac-macros/misc.m4
+5
-6
extra/yassl/taocrypt/include/misc.hpp
extra/yassl/taocrypt/include/misc.hpp
+6
-2
mysql-test/suite/plugins/r/pam.result
mysql-test/suite/plugins/r/pam.result
+1
-1
mysql-test/suite/plugins/t/pam.test
mysql-test/suite/plugins/t/pam.test
+1
-1
plugin/auth_pam/mapper/pam_user_map.c
plugin/auth_pam/mapper/pam_user_map.c
+93
-0
plugin/auth_pam/testing/pam_mariadb_mtr.c
plugin/auth_pam/testing/pam_mariadb_mtr.c
+5
-15
scripts/mysql_install_db.sh
scripts/mysql_install_db.sh
+3
-1
sql/create_options.cc
sql/create_options.cc
+2
-2
sql/mysqld.cc
sql/mysqld.cc
+25
-25
storage/maria/ha_maria.cc
storage/maria/ha_maria.cc
+1
-1
storage/maria/ma_ft_nlq_search.c
storage/maria/ma_ft_nlq_search.c
+1
-0
storage/myisam/ft_nlq_search.c
storage/myisam/ft_nlq_search.c
+1
-0
storage/xtradb/handler/ha_innodb.cc
storage/xtradb/handler/ha_innodb.cc
+6
-6
No files found.
config/ac-macros/misc.m4
View file @
352d7cad
...
...
@@ -456,10 +456,8 @@ fi
AC_DEFUN([MYSQL_STACK_DIRECTION],
[AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
[AC_TRY_RUN([#include <stdlib.h>
/* Prevent compiler optimization by HP's compiler, see bug#42213 */
#if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)
#pragma noinline
#endif
/* Prevent compiler inline optimization, see bug#42213 */
int (volatile *ptr_f)();
int find_stack_direction ()
{
static char *addr = 0;
...
...
@@ -467,14 +465,15 @@ AC_DEFUN([MYSQL_STACK_DIRECTION],
if (addr == 0)
{
addr = &dummy;
return
find_stack_direction
();
return
(*prt_f)
();
}
else
return (&dummy > addr) ? 1 : -1;
}
int main ()
{
exit (find_stack_direction() < 0);
ptr_f = find_stack_direction;
exit ((*ptr_f)() < 0);
}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
ac_cv_c_stack_direction=)])
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
...
...
extra/yassl/taocrypt/include/misc.hpp
View file @
352d7cad
...
...
@@ -136,9 +136,13 @@ void CleanUp();
// Turn on ia32 ASM for Big Integer
// CodeWarrior defines _MSC_VER
//
// Do not use assembler with GCC, as the implementation for it is broken;
// it does not use proper GCC asm contraints and makes assumptions about
// frame pointers and so on, which breaks depending on GCC version and
// optimization level.
#if !defined(TAOCRYPT_DISABLE_X86ASM) && ((defined(_MSC_VER) && \
!defined(__MWERKS__) && defined(_M_IX86)) || \
(defined(__GNUC__) && defined(__i386__)))
!defined(__MWERKS__) && defined(_M_IX86)))
#define TAOCRYPT_X86ASM_AVAILABLE
#endif
...
...
mysql-test/suite/plugins/r/pam.result
View file @
352d7cad
...
...
@@ -2,7 +2,7 @@ install plugin pam soname 'auth_pam.so';
create user test_pam identified via pam using 'mariadb_mtr';
#
# athentication is successful, challenge/pin are ok
# note that current_user() differ
t
s from user()
# note that current_user() differs from user()
#
Challenge input first.
Enter: not very secret challenge
...
...
mysql-test/suite/plugins/t/pam.test
View file @
352d7cad
...
...
@@ -29,7 +29,7 @@ EOF
--
echo
#
--
echo
# athentication is successful, challenge/pin are ok
--
echo
# note that current_user() differ
t
s from user()
--
echo
# note that current_user() differs from user()
--
echo
#
--
exec
$MYSQL_TEST
-
u
test_pam
--
plugin
-
dir
=
$plugindir
<
$MYSQLTEST_VARDIR
/
tmp
/
pam_good
.
txt
...
...
plugin/auth_pam/mapper/pam_user_map.c
0 → 100644
View file @
352d7cad
/*
Pam module to change user names arbitrarily in the pam stack.
Compile as
gcc pam_user_map.c -shared -lpam -fPIC -o pam_user_map.so
Install as appropriate (for example, in /lib/security/).
Add to your /etc/pam.d/mysql (preferrably, at the end) this line:
=========================================================
auth required pam_user_map.so
=========================================================
And create /etc/security/user_map.conf with the desired mapping
in the format: orig_user_name: mapped_user_name
=========================================================
#comments and emty lines are ignored
john: jack
bob: admin
top: accounting
=========================================================
*/
#include <stdio.h>
#include <syslog.h>
#include <security/pam_modules.h>
#define FILENAME "/etc/security/user_map.conf"
#define skip(what) while (*s && (what)) s++
int
pam_sm_authenticate
(
pam_handle_t
*
pamh
,
int
flags
,
int
argc
,
const
char
*
argv
[])
{
int
pam_err
,
line
=
0
;
const
char
*
username
;
char
buf
[
256
];
FILE
*
f
;
f
=
fopen
(
FILENAME
,
"r"
);
if
(
f
==
NULL
)
{
pam_syslog
(
pamh
,
LOG_ERR
,
"Cannot open '%s'
\n
"
,
FILENAME
);
return
PAM_SYSTEM_ERR
;
}
pam_err
=
pam_get_item
(
pamh
,
PAM_USER
,
(
const
void
**
)
&
username
);
if
(
pam_err
!=
PAM_SUCCESS
)
goto
ret
;
while
(
fgets
(
buf
,
sizeof
(
buf
),
f
)
!=
NULL
)
{
char
*
s
=
buf
,
*
from
,
*
to
,
*
end_from
,
*
end_to
;
line
++
;
skip
(
isspace
(
*
s
));
if
(
*
s
==
'#'
||
*
s
==
0
)
continue
;
from
=
s
;
skip
(
isalnum
(
*
s
)
||
(
*
s
==
'_'
));
end_from
=
s
;
skip
(
isspace
(
*
s
));
if
(
end_from
==
from
||
*
s
++
!=
':'
)
goto
syntax_error
;
skip
(
isspace
(
*
s
));
to
=
s
;
skip
(
isalnum
(
*
s
)
||
(
*
s
==
'_'
));
end_to
=
s
;
if
(
end_to
==
to
)
goto
syntax_error
;
*
end_from
=
*
end_to
=
0
;
if
(
strcmp
(
username
,
from
)
==
0
)
{
pam_err
=
pam_set_item
(
pamh
,
PAM_USER
,
to
);
goto
ret
;
}
}
pam_err
=
PAM_SUCCESS
;
goto
ret
;
syntax_error:
pam_syslog
(
pamh
,
LOG_ERR
,
"Syntax error at %s:%d"
,
FILENAME
,
line
);
pam_err
=
PAM_SYSTEM_ERR
;
ret:
fclose
(
f
);
return
pam_err
;
}
int
pam_sm_setcred
(
pam_handle_t
*
pamh
,
int
flags
,
int
argc
,
const
char
*
argv
[])
{
return
PAM_SUCCESS
;
}
plugin/auth_pam/testing/pam_mariadb_mtr.c
View file @
352d7cad
...
...
@@ -10,7 +10,7 @@
Create /etc/pam.d/mariadb_mtr with
=========================================================
auth required pam_mariadb_mtr.so pam_test
account required pam_
mariadb_mtr
.so
account required pam_
permit
.so
=========================================================
*/
...
...
@@ -21,9 +21,8 @@ account required pam_mariadb_mtr.so
#define N 3
PAM_EXTERN
int
pam_sm_authenticate
(
pam_handle_t
*
pamh
,
int
flags
,
int
argc
,
const
char
*
argv
[])
int
pam_sm_authenticate
(
pam_handle_t
*
pamh
,
int
flags
,
int
argc
,
const
char
*
argv
[])
{
struct
pam_conv
*
conv
;
struct
pam_response
*
resp
=
0
;
...
...
@@ -69,17 +68,8 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
return
retval
;
}
PAM_EXTERN
int
pam_sm_setcred
(
pam_handle_t
*
pamh
,
int
flags
,
int
argc
,
const
char
*
argv
[])
{
return
PAM_SUCCESS
;
}
PAM_EXTERN
int
pam_sm_acct_mgmt
(
pam_handle_t
*
pamh
,
int
flags
,
int
argc
,
const
char
*
argv
[])
int
pam_sm_setcred
(
pam_handle_t
*
pamh
,
int
flags
,
int
argc
,
const
char
*
argv
[])
{
return
PAM_SUCCESS
;
...
...
scripts/mysql_install_db.sh
View file @
352d7cad
...
...
@@ -329,8 +329,10 @@ then
cannot_find_file
"
$langdir
/errmsg.sys"
exit
1
fi
mysqld_opt
=
"--language=
$langdir
"
else
langdir
=
english
fi
mysqld_opt
=
"--language=
$langdir
"
# Try to determine the hostname
hostname
=
`
@HOSTNAME@
`
...
...
sql/create_options.cc
View file @
352d7cad
...
...
@@ -138,8 +138,8 @@ static bool set_one_value(ha_create_table_option *opt,
my_option
optp
=
{
opt
->
name
,
1
,
0
,
(
uchar
**
)
val
,
0
,
0
,
GET_ULL
,
REQUIRED_ARG
,
opt
->
def_value
,
opt
->
min_value
,
opt
->
max
_value
,
0
,
(
long
)
opt
->
block_size
,
0
};
REQUIRED_ARG
,
(
longlong
)
opt
->
def_value
,
(
longlong
)
opt
->
min
_value
,
opt
->
max_value
,
0
,
(
long
)
opt
->
block_size
,
0
};
ulonglong
orig_val
=
strtoull
(
value
->
str
,
NULL
,
10
);
my_bool
unused
;
...
...
sql/mysqld.cc
View file @
352d7cad
This diff is collapsed.
Click to expand it.
storage/maria/ha_maria.cc
View file @
352d7cad
...
...
@@ -229,7 +229,7 @@ static MYSQL_SYSVAR_ULONG(pagecache_age_threshold,
"until it is considered aged enough to be downgraded to a warm block. "
"This specifies the percentage ratio of that number of hits to the "
"total number of blocks in the page cache."
,
0
,
0
,
300
,
100
,
~
0L
,
100
);
300
,
100
,
~
(
unsigned
long
)
0
,
100
);
static
MYSQL_SYSVAR_ULONGLONG
(
pagecache_buffer_size
,
pagecache_buffer_size
,
PLUGIN_VAR_RQCMDARG
|
PLUGIN_VAR_READONLY
,
...
...
storage/maria/ma_ft_nlq_search.c
View file @
352d7cad
...
...
@@ -82,6 +82,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
#error
#endif
DBUG_ENTER
(
"walk_and_match"
);
LINT_INIT
(
subkeys
.
i
);
word
->
weight
=
LWS_FOR_QUERY
;
...
...
storage/myisam/ft_nlq_search.c
View file @
352d7cad
...
...
@@ -83,6 +83,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
#error
#endif
DBUG_ENTER
(
"walk_and_match"
);
LINT_INIT
(
subkeys
.
i
);
word
->
weight
=
LWS_FOR_QUERY
;
...
...
storage/xtradb/handler/ha_innodb.cc
View file @
352d7cad
...
...
@@ -11884,7 +11884,7 @@ static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
static
MYSQL_SYSVAR_ULONG
(
io_capacity
,
srv_io_capacity
,
PLUGIN_VAR_RQCMDARG
,
"Number of IOPs the server can do. Tunes the background IO rate"
,
NULL
,
NULL
,
200
,
100
,
~
0L
,
0
);
NULL
,
NULL
,
200
,
100
,
~
0
U
L
,
0
);
static
MYSQL_SYSVAR_ULONG
(
fast_shutdown
,
innobase_fast_shutdown
,
PLUGIN_VAR_OPCMDARG
,
...
...
@@ -11972,7 +11972,7 @@ static MYSQL_SYSVAR_BOOL(adaptive_flushing, srv_adaptive_flushing,
static
MYSQL_SYSVAR_ULONG
(
max_purge_lag
,
srv_max_purge_lag
,
PLUGIN_VAR_RQCMDARG
,
"Desired maximum length of the purge queue (0 = no limit)"
,
NULL
,
NULL
,
0
,
0
,
~
0L
,
0
);
NULL
,
NULL
,
0
,
0
,
~
0
U
L
,
0
);
static
MYSQL_SYSVAR_BOOL
(
rollback_on_timeout
,
innobase_rollback_on_timeout
,
PLUGIN_VAR_OPCMDARG
|
PLUGIN_VAR_READONLY
,
...
...
@@ -12059,7 +12059,7 @@ static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency,
static
MYSQL_SYSVAR_ULONG
(
concurrency_tickets
,
srv_n_free_tickets_to_enter
,
PLUGIN_VAR_RQCMDARG
,
"Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket"
,
NULL
,
NULL
,
500L
,
1L
,
~
0L
,
0
);
NULL
,
NULL
,
500L
,
1L
,
~
0
U
L
,
0
);
#ifdef EXTENDED_FOR_KILLIDLE
#define kill_idle_help_text "If non-zero value, the idle session with transaction which is idle over the value in seconds is killed by InnoDB."
...
...
@@ -12129,12 +12129,12 @@ static MYSQL_SYSVAR_LONG(open_files, innobase_open_files,
static
MYSQL_SYSVAR_ULONG
(
sync_spin_loops
,
srv_n_spin_wait_rounds
,
PLUGIN_VAR_RQCMDARG
,
"Count of spin-loop rounds in InnoDB mutexes (30 by default)"
,
NULL
,
NULL
,
30L
,
0L
,
~
0L
,
0
);
NULL
,
NULL
,
30L
,
0L
,
~
0
U
L
,
0
);
static
MYSQL_SYSVAR_ULONG
(
spin_wait_delay
,
srv_spin_wait_delay
,
PLUGIN_VAR_OPCMDARG
,
"Maximum delay between polling for a spin lock (6 by default)"
,
NULL
,
NULL
,
6L
,
0L
,
~
0L
,
0
);
NULL
,
NULL
,
6L
,
0L
,
~
0
U
L
,
0
);
static
MYSQL_SYSVAR_BOOL
(
thread_concurrency_timer_based
,
innobase_thread_concurrency_timer_based
,
...
...
@@ -12150,7 +12150,7 @@ static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency,
static
MYSQL_SYSVAR_ULONG
(
thread_sleep_delay
,
srv_thread_sleep_delay
,
PLUGIN_VAR_RQCMDARG
,
"Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep"
,
NULL
,
NULL
,
10000L
,
0L
,
~
0L
,
0
);
NULL
,
NULL
,
10000L
,
0L
,
~
0
U
L
,
0
);
static
MYSQL_SYSVAR_STR
(
data_file_path
,
innobase_data_file_path
,
PLUGIN_VAR_RQCMDARG
|
PLUGIN_VAR_READONLY
,
...
...
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