Commit graph

11 commits

Author SHA1 Message Date
Daniel Black
4b3f930639 MDEV-31336: pam_user_map : not supporting username or groupname containing @ character
Add @ to the allowed characters in a username.
2023-07-15 08:12:49 +10:00
Dmitry Shulga
6dc14453c5 MDEV-23926: Fix warnings generated during compilation of plugin/auth_pam/mapper/pam_user_map.c on MacOS
Compiler warnings like one listed below are generated during server build on MacOS:

[88%] Building C object plugin/auth_pam/CMakeFiles/pam_user_map.dir/mapper/pam_user_map.c.o
mariadb/server-10.2/plugin/auth_pam/mapper/pam_user_map.c:87:41: error: passing
'gid_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types
with different sign [-Werror,-Wpointer-sign]
  if (getgrouplist(user, user_group_id, loc_groups, &ng) < 0)
     ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/unistd.h:650:43: note:
  passing argument to parameter here
  int getgrouplist(const char *, int, int *, int *);
      ^

In case MariaDB server is build with -DCMAKE_BUILD_TYPE=Debug it results in
build error.

The reason of compiler warnings is that declaration of the Posix C API function
getgrouplist() on MacOS differs from declaration of getgrouplist() proposed
by Posix.

To suppress this compiler warning cmake configure was adapted to detect what
kind of getgrouplist() function is declared on the build platform and
set the macros HAVE_POSIX_GETGROUPLIST in case the building platform supports
Posix compatible interface for the getgrouplist() function. Depending on
whether this macros is set the compatible type of arguments is used to pass
parameter values to the function.
2020-10-23 17:18:39 +07:00
Alexey Bychko
42b29d4133 MENT-645 Undefined symbols for architecture x86_64: _pam_syslog
added cmake checks for pam_ext.h and pam_appl.h headers
added check for pam_syslog()
added pam_syslog() if doesn't exist
all cmake checks performed from inside the plugin
2020-02-25 18:52:27 +01:00
Sergei Golubchik
8870f18e1d MDEV-17292 Package the pam_user_map module 2020-01-21 10:56:47 +01:00
Alexey Botchkov
2ad51a0bd8 MDEV-17095 pam_user_map module throws syntax error if group name contains backslash.
Let '\\' and '/' symbols to be part of a group name.
2018-08-30 14:51:15 +04:00
Alexey Botchkov
f5b2761c70 MDEV-10871 Add logging capability to pam_user_map.c.
The 'debug' option implemented for the pam_user_map.so.
2018-03-23 00:18:21 +04:00
klemens
7be541f281 spelling fixes 2017-03-07 13:38:06 +04:00
Mario Weigel
626a62e5cc MDEV-10214: Fix segfault when using groups in PAM user mapping plugin 2016-06-12 23:13:26 +12:00
Sergei Golubchik
5a5f18f3f7 MDEV-9205 PAM user map plugin does not work with LDAP groups
allow more characters in a valid user/group name:
* POSIX allows dashes '-' and dots '.'
* also the name may end with a dollar sign '$'

for our purposes it's enough to allow [-.$] anywhere in the name
2016-01-25 17:04:14 +01:00
Alexey Botchkov
b0935fc5da MDEV-8842 add group support to pam_user_map module.
Added to the pam_user_map module.
2015-10-09 03:25:08 +05:00
Sergei Golubchik
22c5ffde30 a simple pam user mapper module 2012-09-25 20:23:01 +02:00