[Pkg-ltsp-devel] ldm password expiry
Vagrant Cascadian
vagrant at freegeek.org
Sat May 31 05:41:32 UTC 2008
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
More information about the Pkg-ltsp-devel
mailing list