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

Diff for /src/usr.bin/sudo/Attic/check.c between version 1.6 and 1.7

version 1.6, 2002/01/03 03:49:16 version 1.7, 2002/04/25 15:49:03
Line 67 
Line 67 
 #include "sudo.h"  #include "sudo.h"
   
 #ifndef lint  #ifndef lint
 static const char rcsid[] = "$Sudo: check.c,v 1.202 2001/12/14 19:52:47 millert Exp $";  static const char rcsid[] = "$Sudo: check.c,v 1.203 2002/04/25 15:30:12 millert Exp $";
 #endif /* lint */  #endif /* lint */
   
 /* Status codes for timestamp_status() */  /* Status codes for timestamp_status() */
Line 196 
Line 196 
   
     if (subst) {      if (subst) {
         new_prompt = (char *) emalloc(len + 1);          new_prompt = (char *) emalloc(len + 1);
         for (p = old_prompt, np = new_prompt; *p; p++) {          for (p = old_prompt, np = new_prompt, lastchar = '\0'; *p; p++) {
             if (lastchar == '%' && (*p == 'h' || *p == 'u' || *p == '%')) {              if (lastchar == '%' && (*p == 'h' || *p == 'u' || *p == '%')) {
                 /* substiture user/host name */                  /* substitute user/host name */
                 if (*p == 'h') {                  if (*p == 'h') {
                     np--;                      np--;
                     strcpy(np, user_shost);                      strcpy(np, user_shost);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7