[MDEV-26380] auth_pam_tool has incorrect permissions on CentOS 7 Created: 2021-08-16 Updated: 2022-01-03 Resolved: 2021-08-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Packaging, Platform RedHat, Plugin - pam |
| Affects Version/s: | 10.5, 10.6 |
| Fix Version/s: | 10.4.22, 10.5.13, 10.6.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Sergei Golubchik | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
auth_pam_tool should be suid user, 4777. Since 9d18b624675 this is done by packaging auth_pam_tool already with correct permissions into the rpm. For example,
same for Fedoras. But on CentOS 7 it shows rwxr-xr-x. Supposedly rpmbuild strips the SUID bit before packaging the file. |
| Comments |
| Comment by Alexey Bychko (Inactive) [ 2021-08-18 ] | ||||||
|
cmake 2.8.12.2 (Centos-7 native) works OK. need to check if versioned conditions like RPM-DEFAULT is root cause or not | ||||||
| Comment by Alexey Bychko (Inactive) [ 2021-08-18 ] | ||||||
|
serg compiled server with cmake 3.14.0 and suid bit is there | ||||||
| Comment by Alexey Bychko (Inactive) [ 2021-08-19 ] | ||||||
|
fixed by splitting INSTALL(CODE "EXECUTE_PROCESS...") call to the 2 separate calls to set directory and auth_pam_tool permissions separately. | ||||||
| Comment by Sergei Golubchik [ 2021-08-20 ] | ||||||
|
Unfortunately, it didn't help. Download, for example, http://hasky.askmonty.org/archive/10.5/build-42089/kvm-rpm-centos74-amd64/rpms/MariaDB-server-10.5.13-1.el7.centos.x86_64.rpm and see yourself | ||||||
| Comment by Daniel Bartholomew [ 2021-08-20 ] | ||||||
|
abychko I've added an abychko user to the aidi.askmonty.org server. You can login using one of the same ssh keys you have configured on github | ||||||
| Comment by Alexey Bychko (Inactive) [ 2021-08-23 ] | ||||||
|
reproduced on BB build image | ||||||
| Comment by Daniel Bartholomew [ 2021-08-23 ] | ||||||
|
I've freed up some space on the host. | ||||||
| Comment by Alexey Bychko (Inactive) [ 2021-08-25 ] | ||||||
|
reproduced on centos74-amd64-build image.
it looks like suid bit disappears during debuginfo pkg creation. if CPACK_RPM_DEBUGINFO_PACKAGE is OFF - suid bit is preserved in RPM. looking for good solution | ||||||
| Comment by Alexey Bychko (Inactive) [ 2021-08-25 ] | ||||||
|
tested it on different Centos versions, from 7.4 to 7.9 (latest). the result is the same, suid bit is lost if debuginfo is enabled. | ||||||
| Comment by Sergei Golubchik [ 2021-08-25 ] | ||||||
|
Not really. That's what we did before, it was reworked in 9d18b62467 for security reasons. What's so special in CentOS7, why would it strip suid bit? | ||||||
| Comment by Alexey Bychko (Inactive) [ 2021-08-25 ] | ||||||
|
kernel drops suid bit on file modification.
|