Changes in trunk/src/yulectl.c [22:1]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/yulectl.c
r22 r1 300 300 if (0 != good) 301 301 { 302 fprintf (stderr, _("ERROR: Bounced message != original message (possible reason: superfluous password).\n"));302 fprintf (stderr, _("ERROR: Bounced message != original message.\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"));326 323 327 324 printf(_("Commands: RELOAD <reload configuration>\n")); … … 340 337 FILE * fp; 341 338 struct passwd * pwent; 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 } 339 351 340 352 341 pwent = getpwuid(geteuid()); … … 399 388 exit(EXIT_FAILURE); 400 389 } 401 if (strlen(message2) > 1 4)390 if (strlen(message2) > 15) 402 391 { 403 392 fprintf (stderr, … … 411 400 } 412 401 strcpy(password, message2); 402 strcat(message2, "@"); 413 403 fclose(fp); 414 do_msg:415 strcat(message2, "@");416 404 417 405 strncat(message2, message, SH_MAXMSG - strlen(message2) -1);
Note:
See TracChangeset
for help on using the changeset viewer.