| 248 |
char n[MAX_FNAME]; |
char n[MAX_FNAME]; |
| 249 |
FILE *f; |
FILE *f; |
| 250 |
int ch; |
int ch; |
| 251 |
|
#ifdef DEBIAN |
| 252 |
|
int x; |
| 253 |
|
char *ctnh; |
| 254 |
|
#endif |
| 255 |
|
|
| 256 |
log_it(RealUser, Pid, "LIST", User); |
log_it(RealUser, Pid, "LIST", User); |
| 257 |
(void) sprintf(n, CRON_TAB(User)); |
(void) sprintf(n, CRON_TAB(User)); |
| 266 |
/* file is open. copy to stdout, close. |
/* file is open. copy to stdout, close. |
| 267 |
*/ |
*/ |
| 268 |
Set_LineNum(1) |
Set_LineNum(1) |
| 269 |
|
#ifdef DEBIAN |
| 270 |
|
/* DEBIAN: Don't list header lines if CRONTAB_NOHEADER is |
| 271 |
|
'Y'. Later we'll change this to the default */ |
| 272 |
|
/* ignore the top few comments since we probably put them there. |
| 273 |
|
*/ |
| 274 |
|
if ((ctnh = getenv("CRONTAB_NOHEADER")) && |
| 275 |
|
toupper(*ctnh) == 'Y') { |
| 276 |
|
for (x = 0; x < NHEADER_LINES; x++) { |
| 277 |
|
ch = get_char(f); |
| 278 |
|
if (EOF == ch) |
| 279 |
|
break; |
| 280 |
|
if ('#' != ch) { |
| 281 |
|
putc(ch, NewCrontab); |
| 282 |
|
break; |
| 283 |
|
} |
| 284 |
|
while (EOF != (ch = get_char(f))) |
| 285 |
|
if (ch == '\n') |
| 286 |
|
break; |
| 287 |
|
if (EOF == ch) |
| 288 |
|
break; |
| 289 |
|
} |
| 290 |
|
} |
| 291 |
|
#endif |
| 292 |
while (EOF != (ch = get_char(f))) |
while (EOF != (ch = get_char(f))) |
| 293 |
putchar(ch); |
putchar(ch); |
| 294 |
fclose(f); |
fclose(f); |