version 1.10, 2000/12/07 19:36:37 |
version 1.12, 2001/07/09 07:04:48 |
|
|
if (spev[i].uname != NULL) |
if (spev[i].uname != NULL) |
free(spev[i].uname); |
free(spev[i].uname); |
if ((spev[i].uname = strdup(p)) == NULL) |
if ((spev[i].uname = strdup(p)) == NULL) |
errx(1, "cannot allocate memory"); |
err(1, NULL); |
spev[i].ulen = strlen(p); |
spev[i].ulen = strlen(p); |
i = NUMEV + 1; |
i = NUMEV + 1; |
} |
} |
|
|
while (m) { |
while (m) { |
cur_evt = (struct event *) malloc(sizeof(struct event)); |
cur_evt = (struct event *) malloc(sizeof(struct event)); |
if (cur_evt == NULL) |
if (cur_evt == NULL) |
errx(1, "cannot allocate memory"); |
err(1, NULL); |
|
|
cur_evt->when = m->when; |
cur_evt->when = m->when; |
snprintf(cur_evt->print_date, |
snprintf(cur_evt->print_date, |
|
|
cur_evt->ldesc = NULL; |
cur_evt->ldesc = NULL; |
} else { |
} else { |
if ((cur_evt->ldesc = strdup(p)) == NULL) |
if ((cur_evt->ldesc = strdup(p)) == NULL) |
errx(1, "cannot allocate memory"); |
err(1, NULL); |
cur_evt->desc = &(cur_evt->ldesc); |
cur_evt->desc = &(cur_evt->ldesc); |
ev1 = cur_evt; |
ev1 = cur_evt; |
} |
} |
|
|
else if (printing) { |
else if (printing) { |
if ((ev1->ldesc = realloc(ev1->ldesc, |
if ((ev1->ldesc = realloc(ev1->ldesc, |
(2 + strlen(ev1->ldesc) + strlen(buf)))) == NULL) |
(2 + strlen(ev1->ldesc) + strlen(buf)))) == NULL) |
errx(1, "cannot allocate memory"); |
err(1, NULL); |
strcat(ev1->ldesc, "\n"); |
strcat(ev1->ldesc, "\n"); |
strcat(ev1->ldesc, buf); |
strcat(ev1->ldesc, buf); |
} |
} |
|
|
(void)close(pdes[0]); |
(void)close(pdes[0]); |
(void)setuid(geteuid()); |
(void)setuid(geteuid()); |
(void)setgid(getegid()); |
(void)setgid(getegid()); |
execl(_PATH_CPP, "cpp", "-P", "-I.", _PATH_INCLUDE, NULL); |
execl(_PATH_CPP, "cpp", "-P", "-I.", _PATH_INCLUDE, (char *)NULL); |
warn(_PATH_CPP); |
warn(_PATH_CPP); |
_exit(1); |
_exit(1); |
} |
} |
|
|
(void)setuid(geteuid()); |
(void)setuid(geteuid()); |
(void)setgid(getegid()); |
(void)setgid(getegid()); |
execl(_PATH_SENDMAIL, "sendmail", "-i", "-t", "-F", |
execl(_PATH_SENDMAIL, "sendmail", "-i", "-t", "-F", |
"\"Reminder Service\"", NULL); |
"\"Reminder Service\"", (char *)NULL); |
warn(_PATH_SENDMAIL); |
warn(_PATH_SENDMAIL); |
_exit(1); |
_exit(1); |
} |
} |