/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2012-06-22 23:33:56 UTC
  • mto: (237.7.272 trunk)
  • mto: This revision was merged to the branch mainline in revision 303.
  • Revision ID: teddy@recompile.se-20120622233356-odoqqt2ki2gssn37
* Makefile (check): Also check mandos-ctl.
* mandos-ctl: All options taking a time interval argument can now take
              an RFC 3339 duration.
  (rfc3339_duration_to_delta): New function.
  (string_to_delta): Try rfc3339_duration_to_delta first.
  (main): New "--check" option.
* mandos-ctl.xml (SYNOPSIS, OPTIONS): Document new "--check" option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 * "browse_callback", and parts of "main".
10
10
 * 
11
11
 * Everything else is
12
 
 * Copyright © 2008-2013 Teddy Hogeborn
13
 
 * Copyright © 2008-2013 Björn Påhlsson
 
12
 * Copyright © 2008-2012 Teddy Hogeborn
 
13
 * Copyright © 2008-2012 Björn Påhlsson
14
14
 * 
15
15
 * This program is free software: you can redistribute it and/or
16
16
 * modify it under the terms of the GNU General Public License as
187
187
  
188
188
  TEMP_FAILURE_RETRY(fprintf(stream, "Mandos plugin %s: ",
189
189
                             program_invocation_short_name));
190
 
  return (int)TEMP_FAILURE_RETRY(vfprintf(stream, format, ap));
 
190
  return TEMP_FAILURE_RETRY(vfprintf(stream, format, ap));
191
191
}
192
192
 
193
193
/*
736
736
  }
737
737
  if(af == AF_INET6){
738
738
    to.in6.sin6_port = htons(port);    
739
 
#ifdef __GNUC__
740
 
#pragma GCC diagnostic push
741
 
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
742
 
#endif
743
739
    if(IN6_IS_ADDR_LINKLOCAL /* Spurious warnings from */
744
 
       (&to.in6.sin6_addr)){ /* -Wstrict-aliasing=2 or lower */
745
 
#ifdef __GNUC__
746
 
#pragma GCC diagnostic pop
747
 
#endif
 
740
       (&to.in6.sin6_addr)){ /* -Wstrict-aliasing=2 or lower and
 
741
                                -Wunreachable-code*/
748
742
      if(if_index == AVAHI_IF_UNSPEC){
749
743
        fprintf_plus(stderr, "An IPv6 link-local address is"
750
744
                     " incomplete without a network interface\n");
755
749
      to.in6.sin6_scope_id = (uint32_t)if_index;
756
750
    }
757
751
  } else {
758
 
    to.in.sin_port = htons(port);
 
752
    to.in.sin_port = htons(port); /* Spurious warnings from
 
753
                                     -Wconversion and
 
754
                                     -Wunreachable-code */
759
755
  }
760
756
  
761
757
  if(quit_now){
2335
2331
        fprintf_plus(stderr, "Retrying in %d seconds\n",
2336
2332
                     (int)retry_interval);
2337
2333
      }
2338
 
      sleep((unsigned int)retry_interval);
 
2334
      sleep((int)retry_interval);
2339
2335
    }
2340
2336
    
2341
2337
    if (not quit_now){