version 1.6, 2002/01/03 03:49:16 |
version 1.7, 2002/04/25 15:49:03 |
|
|
#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() */ |
|
|
|
|
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); |