Set all appropriate data in database entry when changing password
authorPaul Park <pjpark@mit.edu>
Thu, 27 Apr 1995 21:08:20 +0000 (21:08 +0000)
committerPaul Park <pjpark@mit.edu>
Thu, 27 Apr 1995 21:08:20 +0000 (21:08 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5581 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/v5server/ChangeLog
src/kadmin/v5server/passwd.c

index 79cb2f5f3addf2b37b1eabd0c69a0695fd7045a2..35ec5195801f43fdf6331b3f109f3a5d55ddb687 100644 (file)
@@ -1,4 +1,9 @@
 
+Thu Apr 27 17:05:54 EDT 1995   Paul Park       (pjpark@mit.edu)
+
+       Update last_pwd_change, mod_name and kvno when changing password
+       successfully.
+
 Wed Apr 26 16:00:00 EDT 1995   Paul Park       (pjpark@mit.edu)
 
        Add new administrative protocol server which only responds to
index 0dea07da1e1c18468f3abf328fd076f89e18221f..9013c3d84b20693d552df419000b85a870023d81 100644 (file)
@@ -277,10 +277,17 @@ passwd_set_npass(kcontext, debug_level, princ, dbentp, pwdata)
                                &entry2write.alt_key))
        goto cleanup;
 
-    /* Set the time */
-    if (kret = krb5_timeofday(kcontext, &entry2write.mod_date))
+    /* Set the time for last successful password change */
+    if (kret = krb5_timeofday(kcontext, &entry2write.last_pwd_change))
        goto cleanup;
 
+    /* Set entry modifier and modification time. */
+    entry2write.mod_name = princ;
+    entry2write.mod_date = entry2write.last_pwd_change;
+
+    /* Update the kvno */
+    entry2write.kvno++;
+
     /* Salt? */
 
     /* Now write the entry */