On Sat, 26 Jan 2008, Andy Sargent wrote:
Please do. I am a Windows developer, but have been playing with Linux
for a couple years. I haven't jumped into programming any Linux apps
or doing anything beyond cookbook yet, but I would like to give it a
try.
I also need to figure out how to make the client touch screens work.
I have the host touch screen working well, but somehow the clients
aren't. Hopefully, I can start adding back to the project!
So, here it is:
This patch that may help
* with the more than 2 min delay when using ssh-key auth login
(sshutils.c)
* with hangup or infinite loop when trying automated login by giving
LDM_USERNAME in lts.conf (ldm.c, greeter_iface.c)
Maybe, the latter one is not a clean solution: instead patching the main()
in ldm.c someone should debug the get_host(), get_language(),
get_session() and close_greeter() functions in greeter_iface.c.
However, the actually proposed patch seems to work for me.
Regards,
Zsolt
--- ldm-0.1~bzr20071217/src/sshutils.c 2007-12-18 01:36:18.000000000 +0100
+++ ldm-0.1~bzr20071217.new/src/sshutils.c 2008-01-24 15:25:43.000000000 +0100
@@ -167,6 +167,7 @@
fprintf(ldmlog, "ssh_chat: looking for ssword: from ssh\n");
seen = expect(fd, 30.0, "ssword:",
"continue connecting",
+ SENTINEL, /* for ssh-key auth: no passwd */
NULL);
if (seen == 1) {
fprintf(ldmlog, "ssh_chat: got it! Sending pw\n");
@@ -178,6 +179,9 @@
set_message(_("This workstation isn't authorized to connect to server"));
sleep(5);
die("Terminal not authorized, run ltsp-update-sshkeys\n");
+ } else if (seen == 3) {
+ fprintf(ldmlog, "Saw sentinel. Logged in successfully\n");
+ return 0;
} else {
die("Unexpected text from ssh session. Exiting\n");
}
--- ldm-0.1~bzr20071217/src/ldm.c 2007-12-18 01:36:17.000000000 +0100
+++ ldm-0.1~bzr20071217.new/src/ldm.c 2008-01-26 02:13:00.000000000 +0100
@@ -482,22 +482,25 @@
close(ldminfo.sshfd);
}
}
+ fprintf(ldmlog, "Established ssh session.\n");
/*
* Clear out the password so it's not sitting in memory anywhere
*/
bzero(ldminfo.password, sizeof ldminfo.password);
+ fprintf(ldmlog, "Password cleared.\n");
+ if (!ldminfo.autologin) {
if (get_language())
die("Couldn't get a valid language setting");
if (get_session())
die("Couldn't get a valid session setting");
- fprintf(ldmlog, "Established ssh session.\n");
if (ldminfo.greeterpid)
close_greeter();
+ }
fprintf(ldmlog, "Executing rc files.\n");
rc_files("start"); /* Execute any rc files */
--- ldm-0.1~bzr20071217/src/greeter_iface.c 2007-12-18 01:36:17.000000000 +0100
+++ ldm-0.1~bzr20071217.new/src/greeter_iface.c 2008-01-26 02:15:49.000000000 +0100
@@ -129,7 +129,13 @@
get_host()
{
char *cmd = "hostname\n";
+ char *p;
+ if (ldminfo.autologin) {
+ p = getenv("SERVER");
+ scopy(ldminfo.server, p);
+ return 0;
+ }
write(ldminfo.greeterwfd, cmd, strlen(cmd));
return get_greeter_string(ldminfo.server, sizeof ldminfo.server);
}
@@ -141,8 +147,10 @@
char lang[LDMSTRSZ];
int status;
+// if (!ldminfo.autologin) {
write(ldminfo.greeterwfd, cmd, strlen(cmd));
status = get_greeter_string(lang, sizeof lang);
+// }
if (*(ldminfo.lang) != '\0')
return 0; /* admin has set LDM_LANGUAGE */
if (strncmp(lang, "None", 4)) /* If "None", use default */
@@ -157,8 +165,10 @@
char session[LDMSTRSZ];
int status;
+// if (!ldminfo.autologin) {
write(ldminfo.greeterwfd, cmd, strlen(cmd));
status = get_greeter_string(session, sizeof session);
+// }
if (strncmp(session, "None", 4)) /* If "None", use default */
scopy(ldminfo.session, session);
return status;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_____________________________________________________________________
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.freenode.net