Version 2 of the pam authentication plugin executes a tool called auth_pam_tool. This happens here:
memcpy(toolpath, opt_plugin_dir, plugin_dir_len);
|
if (plugin_dir_len && toolpath[plugin_dir_len-1] != FN_LIBCHAR)
|
toolpath[plugin_dir_len++]= FN_LIBCHAR;
|
memcpy(toolpath+plugin_dir_len, tool_name, tool_name_len+1);
|
|
PAM_DEBUG((stderr, "PAM: execute pam sandbox [%s].\n", toolpath));
|
(void) execl(toolpath, toolpath, NULL);
|
PAM_DEBUG((stderr, "PAM: exec() failed.\n"));
|
exit(-1);
|
https://github.com/MariaDB/server/blob/mariadb-10.4.12/plugin/auth_pam/auth_pam.c#L85
Currently, if the execution of this tool fails, then nothing is logged.
If you are using a debug build of the plugin and if pam_debug is enabled, then you do get an error message, but it is still not optimal.
I think we need to make the following changes:
- An error message should be printed in both release builds and debug builds.
- The error message should not depend on pam_debug.
- The error message should contain the errno and/or strerror(errno) for the specific error.
{"report":{"fcp":1007.1999998092651,"ttfb":179.80000019073486,"pageVisibility":"visible","entityId":86482,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"5ee2f7cc-eedf-4a1a-aa94-aefcd29bdb55","navigationType":0,"readyForUser":1081.8000001907349,"redirectCount":0,"resourceLoadedEnd":1012.5,"resourceLoadedStart":185.80000019073486,"resourceTiming":[{"duration":366.3999996185303,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":185.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":185.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":552.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":366.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":186.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":186.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":552.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":375.2000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":186.19999980926514,"connectEnd":186.19999980926514,"connectStart":186.19999980926514,"domainLookupEnd":186.19999980926514,"domainLookupStart":186.19999980926514,"fetchStart":186.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":186.19999980926514,"responseEnd":561.4000000953674,"responseStart":561.4000000953674,"secureConnectionStart":186.19999980926514},{"duration":463.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":186.40000009536743,"connectEnd":186.40000009536743,"connectStart":186.40000009536743,"domainLookupEnd":186.40000009536743,"domainLookupStart":186.40000009536743,"fetchStart":186.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":186.40000009536743,"responseEnd":650.3000001907349,"responseStart":650.3000001907349,"secureConnectionStart":186.40000009536743},{"duration":467.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":186.69999980926514,"connectEnd":186.69999980926514,"connectStart":186.69999980926514,"domainLookupEnd":186.69999980926514,"domainLookupStart":186.69999980926514,"fetchStart":186.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":186.69999980926514,"responseEnd":654.4000000953674,"responseStart":654.4000000953674,"secureConnectionStart":186.69999980926514},{"duration":468,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":186.90000009536743,"connectEnd":186.90000009536743,"connectStart":186.90000009536743,"domainLookupEnd":186.90000009536743,"domainLookupStart":186.90000009536743,"fetchStart":186.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":186.90000009536743,"responseEnd":654.9000000953674,"responseStart":654.9000000953674,"secureConnectionStart":186.90000009536743},{"duration":468.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":187,"connectEnd":187,"connectStart":187,"domainLookupEnd":187,"domainLookupStart":187,"fetchStart":187,"redirectEnd":0,"redirectStart":0,"requestStart":187,"responseEnd":655.8000001907349,"responseStart":655.8000001907349,"secureConnectionStart":187},{"duration":514,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":187.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":187.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":701.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":469.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":187.40000009536743,"connectEnd":187.40000009536743,"connectStart":187.40000009536743,"domainLookupEnd":187.40000009536743,"domainLookupStart":187.40000009536743,"fetchStart":187.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":187.40000009536743,"responseEnd":656.5999999046326,"responseStart":656.5999999046326,"secureConnectionStart":187.40000009536743},{"duration":513.7000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":187.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":187.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":701.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":469.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":187.69999980926514,"connectEnd":187.69999980926514,"connectStart":187.69999980926514,"domainLookupEnd":187.69999980926514,"domainLookupStart":187.69999980926514,"fetchStart":187.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":187.69999980926514,"responseEnd":657.5,"responseStart":657.5,"secureConnectionStart":187.69999980926514},{"duration":559.7999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":188.90000009536743,"connectEnd":188.90000009536743,"connectStart":188.90000009536743,"domainLookupEnd":188.90000009536743,"domainLookupStart":188.90000009536743,"fetchStart":188.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":188.90000009536743,"responseEnd":748.6999998092651,"responseStart":748.6999998092651,"secureConnectionStart":188.90000009536743},{"duration":819,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":188.90000009536743,"connectEnd":188.90000009536743,"connectStart":188.90000009536743,"domainLookupEnd":188.90000009536743,"domainLookupStart":188.90000009536743,"fetchStart":188.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":188.90000009536743,"responseEnd":1007.9000000953674,"responseStart":1007.9000000953674,"secureConnectionStart":188.90000009536743},{"duration":36.60000038146973,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":712.6999998092651,"connectEnd":712.6999998092651,"connectStart":712.6999998092651,"domainLookupEnd":712.6999998092651,"domainLookupStart":712.6999998092651,"fetchStart":712.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":712.6999998092651,"responseEnd":749.3000001907349,"responseStart":749.3000001907349,"secureConnectionStart":712.6999998092651},{"duration":245.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":767,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":767,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1012.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":23,"responseStart":180,"responseEnd":185,"domLoading":184,"domInteractive":1133,"domContentLoadedEventStart":1133,"domContentLoadedEventEnd":1171,"domComplete":2218,"loadEventStart":2218,"loadEventEnd":2220,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1121.8000001907349},{"name":"bigPipe.sidebar-id.end","time":1122.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1122.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1125.1999998092651},{"name":"activityTabFullyLoaded","time":1181.4000000953674}],"measures":[],"correlationId":"610f0f7bfe73fe","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":14,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}