ldm password expiry

Vagrant Cascadian <[email protected]>
Newsgroups gmane.linux.terminal-server.devel
Message-ID <[email protected]>
i recieved a patch through the debian bug tracking system to fix
password expiry with ldm on debian:

  http://bugs.debian.org/482553

it seemed to address the issues, but since it's dealing with passwords
and my C is poor, i'd like some peer review if the patch looks ok.

--- src.orig/sshutils.c	2008-05-23 14:36:04.000000000 +0200
+++ src/sshutils.c	2008-05-23 14:37:00.000000000 +0200
@@ -227,6 +227,10 @@
 
     while (TRUE) {
         get_passwd();
+        if (!strcmp(oldpw, ldminfo.password)) {
+            set_message(_("You have to enter a new password."));
+            continue;
+        }
         newpw1 = strdup(ldminfo.password);
         set_message(_("Please enter your password again to verify."));
         get_passwd();
@@ -240,6 +244,7 @@
     }
 
     /* send old password first */
+    seen = expect(fd, 30.0, "ssword:", NULL);
     write(fd, oldpw, strlen(oldpw));
     write(fd, "\n", 1);
 
@@ -256,7 +261,6 @@
     
     seen = expect(fd, 30.0, "updated successfully", NULL);
     if (seen == 1) {
-        bzero(ldminfo.password, sizeof ldminfo.password);
         return 2;
     } 
         
being the fool that i am, i already uploaded it to debian unstable. :)

live well,
  vagrant

-------------------------------------------------------------------------
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-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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.