Couple patches
Floris Bos / Maxnet <bos-2Bwqp0C+fZnAjeZApIleJ/[email protected]> Sat, 02 Jun 2012 02:37:13 +0200
| Newsgroups | gmane.linux.terminal-server.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------020003020203050005000307
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
I build a minimal Linux distro for the raspberry pi to connect to a LTSP
server, and came across a couple issues, for which I attached patches.
I based my own stuff on the Ubuntu LDM 2.2.9 source package, but presume
the problems are present in upstream as well, so posting it here.
ldm-segfault.patch: the pointer timeoutbox is used before there is
anything assigned to it.
ldm-plugin.patch: the routines that searches for plugins calls readdir()
and looks at the entries' d_type expecting it to be DT_REG, but on some
(file) systems it returns DT_UNKNOWN instead.
ldm-close-greeter-on-login-failure.patch: greeter should be closed on
login failure, or you will have two greeters running after ldm restarts.
Yours sincerely,
Floris Bos
--------------020003020203050005000307
Content-Type: text/x-patch;
name="ldm-close-greeter-on-login-failure.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="ldm-close-greeter-on-login-failure.patch"
--- ldm-2.2.9/src/plugins/ssh/ssh.c 2012-04-13 18:20:16.000000000 +0200
+++ ldm-2.2.9.new/src/plugins/ssh/ssh.c 2012-06-02 02:27:41.553062092 +0200
@@ -385,6 +385,7 @@
} else if (seen < 0) {
set_message(_("No response from server, restarting..."));
sleep(5);
+ close_greeter();
die("ssh","no response, restarting");
}
}
--------------020003020203050005000307
Content-Type: text/x-patch;
name="ldm-plugin.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="ldm-plugin.patch"
diff -ur ldm-2.2.9/src/ldmplugin.c ldm-2.2.9.new/src/ldmplugin.c
--- ldm-2.2.9/src/ldmplugin.c 2012-04-13 18:20:16.000000000 +0200
+++ ldm-2.2.9.new/src/ldmplugin.c 2012-05-17 16:10:02.780013819 +0200
@@ -151,7 +151,7 @@
}
struct dirent* entry;
while (entry = readdir(plugin_dir)) {
- if (entry->d_type == DT_REG && (strstr(entry->d_name, ".so") != NULL)) {
+ if ((entry->d_type == DT_REG || entry->d_type == DT_UNKNOWN) && (strstr(entry->d_name, ".so") != NULL)) {
int name_len = strlen(entry->d_name)+strlen(LDM_PLUG_DIR)+2;
char* plug_name = (char *) malloc(name_len);
snprintf(plug_name, name_len, "%s/%s", LDM_PLUG_DIR, entry->d_name);
Only in ldm-2.2.9.new/src: ldmplugin.c~
--------------020003020203050005000307
Content-Type: text/x-patch;
name="ldm-segfault.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="ldm-segfault.patch"
diff -ur ldm-2.2.9/gtkgreet/greeter.c ldm-2.2.9.new/gtkgreet/greeter.c
--- ldm-2.2.9/gtkgreet/greeter.c 2012-04-13 18:20:16.000000000 +0200
+++ ldm-2.2.9.new/gtkgreet/greeter.c 2012-05-16 15:35:36.964708520 +0200
@@ -789,8 +789,8 @@
timeoutspacer1 = gtk_label_new("");
timeoutspacer2 = gtk_label_new("");
timeoutlabel = gtk_label_new("");
- gtk_box_pack_start(GTK_BOX(vbox), timeoutbox, FALSE, FALSE, 0);
timeoutbox = gtk_hbox_new(FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(vbox), timeoutbox, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(timeoutbox), timeoutspacer1, TRUE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(timeoutbox), timeoutlabel, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(timeoutbox), timeoutspacer2, TRUE, FALSE, 0);
--------------020003020203050005000307
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
--------------020003020203050005000307
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_____________________________________________________________________
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
--------------020003020203050005000307--