Changeset 396 for trunk/src/yulectl.c


Ignore:
Timestamp:
Mar 27, 2012, 9:03:01 PM (10 years ago)
Author:
katerina
Message:

Fix for ticket #294 (minor issues with stealth mode).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/yulectl.c

    r200 r396  
    268268          {
    269269            if (verbose && (num == 0))
    270               fprintf (stdout, _("# There are no pending commands.\n"));
     270              fprintf (stdout, "%s", _("# There are no pending commands.\n"));
    271271            return 0;
    272272          }
     
    300300  if (0 != good)
    301301    {
    302       fprintf (stderr, _("ERROR: Bounced message != original message (possible reason: superfluous password).\n"));
     302      fprintf (stderr, "%s", _("ERROR: Bounced message != original message (possible reason: superfluous password).\n"));
    303303      return -1;
    304304    }
     
    306306    {
    307307      if (verbose)
    308         fprintf (stdout, _("# Message received by server.\n"));
     308        fprintf (stdout, "%s", _("# Message received by server.\n"));
    309309    }
    310310
     
    317317         name);
    318318
    319   printf(_("Purpose : send commands to the server via a socket,\n"));
    320   printf(_("          in particular commands that the server would\n"));
    321   printf(_("          transfer to the client <client_hostname> when\n"));
    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 
    327   printf(_("Commands: RELOAD    <reload configuration>\n"));
    328   printf(_("          STOP      <terminate>\n"));
    329   printf(_("          SCAN      <initiate file system check\n"));
    330   printf(_("          CANCEL    <cancel previous command>\n"));
    331   printf(_("          LIST      <list queued commands>\n"));
    332   printf(_("          LISTALL   <list queued and last sent commands>\n"));
    333   printf(_("          PROBE     <probe all clients for necessity of reload>\n"));
     319  printf("%s", _("Purpose : send commands to the server via a socket,\n"));
     320  printf("%s", _("          in particular commands that the server would\n"));
     321  printf("%s", _("          transfer to the client <client_hostname> when\n"));
     322  printf("%s", _("          this client connects to deliver a message.\n\n"));
     323  printf("%s", _("          If password is required, it is read from\n"));
     324  printf("%s", _("          $HOME/.yulectl_cred or taken from the environment\n"));
     325  printf("%s", _("          variable YULECTL_PASSWORD (not recommended).\n\n"));
     326
     327  printf("%s", _("Commands: RELOAD    <reload configuration>\n"));
     328  printf("%s", _("          STOP      <terminate>\n"));
     329  printf("%s", _("          SCAN      <initiate file system check\n"));
     330  printf("%s", _("          CANCEL    <cancel previous command>\n"));
     331  printf("%s", _("          LIST      <list queued commands>\n"));
     332  printf("%s", _("          LISTALL   <list queued and last sent commands>\n"));
     333  printf("%s", _("          PROBE     <probe all clients for necessity of reload>\n"));
    334334  return;
    335335}
     
    396396  if ( (strlen(home) + strlen(_("/.yulectl_cred")) + 1) > 4096)
    397397    {
    398       fprintf (stderr, _("ERROR: path for $HOME is too long.\n"));
     398      fprintf (stderr, "%s", _("ERROR: path for $HOME is too long.\n"));
    399399      exit(EXIT_FAILURE);
    400400    }
     
    424424  if (NULL == fgets(message2, sizeof(message2), fp))
    425425    {
    426       fprintf (stderr, 
     426      fprintf (stderr,
    427427               _("ERROR: empty or unreadable password file (%s).\n"),
    428428               home);
     
    434434  if (strlen(message2) > 14)
    435435    {
    436       fprintf (stderr,
     436      fprintf (stderr, "%s",
    437437               _("ERROR: Password too long (max. 14 characters).\n"));
    438438      exit(EXIT_FAILURE);
     
    501501            if (argv[num] == NULL || argv[num][0] == '\0') {
    502502              usage(argv[0]);
    503               fprintf(stderr, _("ERROR: -s: argument missing\n"));
     503              fprintf(stderr, "%s", _("ERROR: -s: argument missing\n"));
    504504              return (EXIT_FAILURE);
    505505            } else {
     
    518518            if (argv[num] == NULL || argv[num][0] == '\0') {
    519519              usage(argv[0]);
    520               fprintf(stderr, _("ERROR: -c: argument missing\n"));
     520              fprintf(stderr, "%s", _("ERROR: -c: argument missing\n"));
    521521              return (EXIT_FAILURE);
    522522            } else {
     
    575575      else
    576576        {
    577           fprintf(stderr, _("ERROR: this command requires a hostname\n"));
     577          fprintf(stderr, "%s", _("ERROR: this command requires a hostname\n"));
    578578          usage(argv[0]);
    579579          return (EXIT_FAILURE);
     
    623623  if (status < 0)
    624624    {
    625       fprintf(stderr, _("ERROR: sending command to server failed\n"));
     625      fprintf(stderr, "%s", _("ERROR: sending command to server failed\n"));
    626626      (void) termination_handler(0);
    627627      return (EXIT_FAILURE);
     
    634634    {
    635635      if (verbose)
    636         fprintf(stdout, _("# Waiting for listing.\n"));
     636        fprintf(stdout, "%s", _("# Waiting for listing.\n"));
    637637    }
    638638  else
    639639    {
    640640      if (verbose)
    641         fprintf(stdout, _("# Waiting for confirmation.\n"));
     641        fprintf(stdout, "%s", _("# Waiting for confirmation.\n"));
    642642    }
    643643  status = recv_from_server (message);
     
    645645  if (status < 0)
    646646    {
    647       fprintf(stderr, _("ERROR: receiving data from server failed.\n"));
     647      fprintf(stderr, "%s", _("ERROR: receiving data from server failed.\n"));
    648648      (void) termination_handler(0);
    649649      return (EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.