The following code writes this to /var/log/auth.log:
------
... PAM_SERVICE: lightdm.
... Have no PAM_TTY.
... Have now XDisplay: "(null)" and XAuth: "(null)".
------
This is the pam_sm_authenticate function of the PAM module:
<code>
PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc,
const char **argv) {
const char *service = NULL;
char* xdisp = getenv("DISPLAY");
char* xauth = getenv("XAUTHORITY");
// Requested service
pam_get_item(pamh, PAM_SERVICE, (const void **)(const void*)&service);
if (service != NULL && strlen(service) > 0) {
syslog(LOG_DEBUG, "PAM_SERVICE: %s.", (const char*)service);
}
if (xdisp == NULL) { // Trying to get the xdisplay
pam_get_item(pamh, PAM_XDISPLAY, (const void **)(const void*)&xdisp);
if (xdisp == NULL) {
pam_get_item(pamh, PAM_TTY, (const void **)(const void*)&xdisp);
if (xdisp == NULL || strlen(xdisp) == 0) {
syslog(LOG_DEBUG, "Have no PAM_TTY.");
xdisp = NULL;
}
else {
syslog(LOG_DEBUG, "Have PAM_TTY: %s.", xdisp);
if(xdisp[0] != ':'){// looks not like a X-Display
syslog(LOG_DEBUG, "Have no DISPLAY from PAM_TTY.");
xdisp = NULL;
}
else{
syslog(LOG_DEBUG, "Have DISPLAY %s from PAM_TTY.", xdisp);
setenv("DISPLAY", xdisp, -1);
}
}
}
else {
syslog(LOG_DEBUG, "Have DISPLAY %s from pam_get_item.", xdisp);
setenv("DISPLAY", xdisp, -1);
}
}
else
syslog(LOG_DEBUG, "Have DISPLAY %s from getenv.", xdisp);
syslog(LOG_DEBUG, "Have now XDisplay: \"%s\" and XAuth: \"%s\".", xdisp,
xauth);
}
</code>
This means none of the variables are set. The module cannot display it's widget.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/862559
Title:
Does not set PAM_XDISPLAY and or XDISPLAY, XAUTHORITY variables
To manage notifications about this bug go to:
https://bugs.launchpad.net/lightdm/+bug/862559/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs