248 |
static void check_hostname (char *); |
static void check_hostname (char *); |
249 |
static void check_exec(char *); |
static void check_exec(char *); |
250 |
static void createinfo(); |
static void createinfo(); |
|
static char *append_hostname(char *); |
|
251 |
static void cleanup_md5_string(char *); |
static void cleanup_md5_string(char *); |
252 |
static void check_depend(); |
static void check_depend(); |
253 |
static void order_depend(Service_T); |
static void order_depend(Service_T); |
685 |
; |
; |
686 |
|
|
687 |
alertmail : ALERT MAILADDR { $<string>$= $2; } |
alertmail : ALERT MAILADDR { $<string>$= $2; } |
|
| ALERT STRING { $<string>$= append_hostname($2); } |
|
688 |
; |
; |
689 |
|
|
690 |
eventoptionlist : eventoption |
eventoptionlist : eventoption |
2151 |
|
|
2152 |
|
|
2153 |
/* |
/* |
|
* Create a real email address from a username |
|
|
*/ |
|
|
static char *append_hostname(char *addr) { |
|
|
|
|
|
char buf[STRLEN]; |
|
|
char * fulladdr; |
|
|
|
|
|
ASSERT(addr); |
|
|
|
|
|
if (gethostname(buf, STRLEN) != 0) { |
|
|
yyerror("Cannot find hostname for mailaddress"); |
|
|
} |
|
|
|
|
|
fulladdr = xresize(addr, strlen(buf)+1); |
|
|
strcat(fulladdr, "@"); |
|
|
strcat(fulladdr, buf); |
|
|
|
|
|
return fulladdr; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
2154 |
* Cleans up an md5 string, tolower and remove byte sperators |
* Cleans up an md5 string, tolower and remove byte sperators |
2155 |
*/ |
*/ |
2156 |
static void cleanup_md5_string(char *md5string) { |
static void cleanup_md5_string(char *md5string) { |