Changeset 22 for trunk/src/yulectl.c
- Timestamp:
- Feb 23, 2006, 12:03:58 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/yulectl.c
r1 r22 300 300 if (0 != good) 301 301 { 302 fprintf (stderr, _("ERROR: Bounced message != original message .\n"));302 fprintf (stderr, _("ERROR: Bounced message != original message (possible reason: superfluous password).\n")); 303 303 return -1; 304 304 } … … 321 321 printf(_(" transfer to the client <client_hostname> when\n")); 322 322 printf(_(" this client connects to deliver a message.\n\n")); 323 printf(_(" If password is required, it is read from\n")); 324 printf(_(" $HOME/.yulectl_cred or taken from the environment\n")); 325 printf(_(" variable YULECTL_PASSWORD (not recommended).\n\n")); 323 326 324 327 printf(_("Commands: RELOAD <reload configuration>\n")); … … 337 340 FILE * fp; 338 341 struct passwd * pwent; 339 342 char * pw; 343 344 pw = getenv(_("YULECTL_PASSWORD")); 345 if (pw && strlen(pw) < 15) 346 { 347 strcpy(password, pw); 348 strcpy(message2, password); 349 goto do_msg; 350 } 340 351 341 352 pwent = getpwuid(geteuid()); … … 388 399 exit(EXIT_FAILURE); 389 400 } 390 if (strlen(message2) > 1 5)401 if (strlen(message2) > 14) 391 402 { 392 403 fprintf (stderr, … … 400 411 } 401 412 strcpy(password, message2); 413 fclose(fp); 414 do_msg: 402 415 strcat(message2, "@"); 403 fclose(fp);404 416 405 417 strncat(message2, message, SH_MAXMSG - strlen(message2) -1);
Note:
See TracChangeset
for help on using the changeset viewer.