[BACK]Return to new_pwd.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / passwd

Diff for /src/usr.bin/passwd/Attic/new_pwd.c between version 1.4 and 1.5

version 1.4, 2001/01/29 01:58:14 version 1.5, 2002/06/28 22:28:17
Line 5 
Line 5 
  * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan   * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
  * (Royal Institute of Technology, Stockholm, Sweden).   * (Royal Institute of Technology, Stockholm, Sweden).
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions   * modification, are permitted provided that the following conditions
  * are met:   * are met:
  *   *
  * 1. Redistributions of source code must retain the above copyright   * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.   *    notice, this list of conditions and the following disclaimer.
  *   *
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  *   *
  * 3. All advertising materials mentioning features or use of this software   * 3. All advertising materials mentioning features or use of this software
  *    must display the following acknowledgement:   *    must display the following acknowledgement:
  *      This product includes software developed by the Kungliga Tekniska   *      This product includes software developed by the Kungliga Tekniska
  *      Högskolan and its contributors.   *      Högskolan and its contributors.
  *   *
  * 4. Neither the name of the Institute nor the names of its contributors   * 4. Neither the name of the Institute nor the names of its contributors
  *    may be used to endorse or promote products derived from this software   *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.   *    without specific prior written permission.
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND   * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Line 65 
Line 65 
   
         if (strlen(pword) == 0)          if (strlen(pword) == 0)
                 return "Null passwords are not allowed - Please enter a longer password.";                  return "Null passwords are not allowed - Please enter a longer password.";
   
         if (strlen(pword) < MIN_KPW_LEN)          if (strlen(pword) < MIN_KPW_LEN)
                 return "Password is to short - Please enter a longer password.";                  return "Password is to short - Please enter a longer password.";
   
         if (strcmp(pword, "s/key") == 0)          if (strcmp(pword, "s/key") == 0)
                 return "That password collides with a system feature. Choose another.\n";                  return "That password collides with a system feature. Choose another.\n";
   
Line 92 
Line 92 
         int status;          int status;
         char *expl;          char *expl;
         char *q;          char *q;
   
         /*          /*
          * We don't care about failure; this is to determine whether or           * We don't care about failure; this is to determine whether or
          * not to print the realm in the prompt for a new password.           * not to print the realm in the prompt for a new password.
          */           */
         krb_get_lrealm(local_realm, 1);          krb_get_lrealm(local_realm, 1);
   
         if (strcmp(local_realm, pr->realm))          if (strcmp(local_realm, pr->realm))
                 print_realm++;                  print_realm++;
         krb_unparse_name_r(pr, p);          krb_unparse_name_r(pr, p);
Line 111 
Line 111 
                 return -1;                  return -1;
         }          }
   
         status = krb_get_pw_in_tkt(pr->name, pr->instance, pr->realm,          status = krb_get_pw_in_tkt(pr->name, pr->instance, pr->realm,
             PWSERV_NAME, KADM_SINST, 1, pword);              PWSERV_NAME, KADM_SINST, 1, pword);
         if (status != KSUCCESS) {          if (status != KSUCCESS) {
                 if (status == INTK_BADPW) {                  if (status == INTK_BADPW) {
Line 123 
Line 123 
                         return -1;                          return -1;
                 }                  }
         }          }
   
         memset(pword, 0, pwlen);          memset(pword, 0, pwlen);
   
         do {          do {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5