Changeset 200 for trunk/src/yulectl.c


Ignore:
Timestamp:
Nov 27, 2008, 10:26:50 PM (17 years ago)
Author:
katerina
Message:

Implement server->client SCAN command to run file check on demand.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/yulectl.c

    r117 r200  
    327327  printf(_("Commands: RELOAD    <reload configuration>\n"));
    328328  printf(_("          STOP      <terminate>\n"));
     329  printf(_("          SCAN      <initiate file system check\n"));
    329330  printf(_("          CANCEL    <cancel previous command>\n"));
    330331  printf(_("          LIST      <list queued commands>\n"));
     
    400401  strcat(home, _("/.yulectl_cred"));
    401402  fp = fopen(home, "r");
     403
     404#if !defined(HAVE_GETPEEREID) && !defined(SO_PEERCRED) && !defined(HAVE_STRUCT_CMSGCRED) && !defined(HAVE_STRUCT_FCRED) && !(defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS))
    402405  if (fp == NULL)
    403406    {
    404       if (verbose && (errno == ENOENT))
    405         fprintf (stdout,
    406                  _("# No password file (%s) exists\n"),
     407      if (errno == ENOENT) {
     408        fprintf (stderr,
     409                 _("ERROR No password file (%s) exists\n"),
    407410                 home);
    408       else if (verbose)
    409         fprintf (stdout,
    410                  _("# Password file (%s) not accessible for euid %ld uid %ld\n"),
     411      }
     412      else {
     413        fprintf (stderr,
     414                 _("ERROR: Password file (%s) not accessible for euid %ld uid %ld\n"),
    411415                 home, (long)geteuid(), (long)getuid());
    412       return;
    413     }
     416      }
     417      exit(EXIT_FAILURE);
     418    }
     419#else
     420  if (fp == NULL)
     421    return;
     422#endif
     423
    414424  if (NULL == fgets(message2, sizeof(message2), fp))
    415425    {
Note: See TracChangeset for help on using the changeset viewer.