tags 431730 + patch
thanks
Here is a patch to solve it, by modifying the module to not create the
file in /var/run/console/ when logging in from remote. The initial
patch was written by Daniel Hess, and cleaned up by me.
--- libpam-foreground-0.2.orig/pam_foreground.c
+++ libpam-foreground-0.2/pam_foreground.c
@@ -76,6 +76,7 @@
struct vt_stat vtstat;
size_t len;
int retval;
+ void *rhost=NULL;
retval = pam_get_user(pamh, &user, NULL);
if (retval != PAM_SUCCESS) {
@@ -83,6 +84,17 @@
return retval;
}
+ retval = pam_get_item(pamh, PAM_RHOST, (const void **)&rhost);
+ if (retval != PAM_SUCCESS) {
+ D(("get remote host returned error: %s",
pam_strerror(pamh,retval)));
+ return retval;
+ }
+
+ /* Skip lockfile creation when non-local */
+ if (rhost != NULL && *(const char *)rhost == '\0') {
+ return PAM_SUCCESS;
+ }
+
if (stat (AUTH_DIR, &finfo)) {
if (errno != ENOENT) {
D(("Can't access %s - %s\n", AUTH_DIR,
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]