[MDEV-23628] confusing error message "Got error 1 from setreuid()" Created: 2020-08-18  Updated: 2021-03-12

Status: Open
Project: MariaDB Server
Component/s: Plugin - pam
Affects Version/s: 10.4, 10.5
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Major
Reporter: Maria M Pflaum Assignee: Alexey Botchkov
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Linux



 Description   

Customer is getting the error in their log file, but it doesn't have additional information or typical error format.

The error:
Got error 1 from setreuid()

Could be clarified for example:
2020-07-07 10:32:14 0 [ERROR] Got error 1 from setreuid(). Is auth_pam_tool installed suid root?



 Comments   
Comment by Michal Schorm [ 2021-03-12 ]

That must be coming from this line:
https://github.com/MariaDB/server/blob/10.5/plugin/auth_pam/auth_pam_tool.c#L75

There are several possible errors generated by the setreuid() call:
https://man7.org/linux/man-pages/man2/setreuid.2.html#ERRORS

Telling which error it was might make it easier to debug.

Though most common will IMO be the permissions issue.

Generated at Thu Feb 08 09:23:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.