Problem with ldm + pam_mount (with patch)
GARETTE Emmanuel <[email protected]>
| Newsgroups | gmane.linux.terminal-server.devel |
|---|---|
| Message-ID | <1216798632.6426.10.camel@emmanuel> |
Hi,
When I use ldm with pam_mount i've a problem.
When I log out my session on a thin client, pam_mount don't unmount
partitions. The problem is that master ssh is killed when x session
ended.
Here is the command:
"/usr/bin/ssh -X -t -S /var/run/ldm_socket_vt1_192.168.231.195 -l
leo.bontemps 192.168.231.195 LTSP_CLIENT=192.168.231.30
PULSE_SERVER=tcp:192.168.231.30:4713
ESPEAKER=192.168.231.30:16001 /etc/X11/Xsession ; /usr/sbin/ltspfsmounter all cleanup; kill -1 ${PPID}"
It should be greater to use"-O" option of ssh to exit the ssh master
rather than "kill" it.
If I do that, ssh session is ending perfectly et pam_mount unmount all
my partitions. I think so it's a better way to stop ssh connection
sharing.
I send you a patch in attachment.
Regards,
GARETTE Emmanuel
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_____________________________________________________________________
Ltsp-developer mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-developer
For additional LTSP help, try #ltsp channel on irc.freenode.net
friendly_close_master_ssh.patch
(text/x-patch, 894 B)
--- ../../ldm-orig/ldm-5.0.40~bzr20080212/src/ldm.c 2008-07-22 17:01:37.000000000 +0200
+++ src/ldm.c 2008-07-22 16:34:05.000000000 +0200
@@ -242,6 +242,17 @@
"-public",
"-tcp",
NULL };
+ char *exitcmd[] = {
+ "/usr/bin/ssh",
+ "-S",
+ ldminfo.control_socket,
+ "-l",
+ ldminfo.username,
+ ldminfo.server,
+ "-O",
+ "exit",
+ NULL};
+ GPid exitcmdpid;
GPid xsessionpid;
GPid esdpid = 0;
int i = 0;
@@ -318,10 +329,6 @@
cmd[i++] = "cleanup";
}
- cmd[i++] = ";";
- cmd[i++] = "kill";
- cmd[i++] = "-1";
- cmd[i++] = "${PPID}";
cmd[i++] = NULL;
xsessionpid = ldm_spawn(cmd);
@@ -330,6 +337,8 @@
kill(esdpid, SIGTERM);
ldm_wait(esdpid);
}
+ exitcmdpid = ldm_spawn(exitcmd);
+ ldm_wait(exitcmdpid);
}
/*