/mandos/trunk

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

« back to all changes in this revision

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

  • Committer: Teddy Hogeborn
  • Date: 2014-03-23 19:24:40 UTC
  • Revision ID: teddy@recompile.se-20140323192440-d71iiqxebsxf9u2v
Update GCC warning flags and function attributes to GCC 4.7.

* Makefile (WARN): Update to include almost all warning flags.
* plugin-runner.c (getplugin, add_to_char_array, add_argument,
                   add_environment, set_cloexec_flag,
                   print_out_password): Add attribute
                                        "warn_unused_result".
  (main/parse_opt): Bug fix: Add error checking to --global-env,
                    --env-for, --plugin-dir, and --config-file, and
                    make sure errno does not "leak" from unrelated
                    functions.
* plugins.d/mandos-client.c
  (fprintf_plus, debuggnutls, resolve_callback): Add "nonnull"
                                                 attribute.
  (incbuffer, add_server, init_gpgme): Add "nonnull" and
                                       "warn_unused_result"
                                       attributes.
  (pgp_packet_decrypt, init_gnutls_global): - '' -
  (init_gnutls_session start_mandos_communication, get_flags): - '' -
  (good_flags, good_interface, interface_is_up): - '' -
  (interface_is_running, runnable_hook): - '' -
  (avahi_loop_with_timeout, bring_up_interface): : - '' -
  (safer_gnutls_strerror): Add "warn_unused_result" attribute.
  (notdotentries): Set "nonnull", "pure", and "warn_unused_result"
                   attributes.
  (raise_privileges, raise_privileges_permanently, lower_privileges,
  lower_privileges_permanently): Set "warn_unused_result" attribute.
  (run_network_hooks): Exit child process if it fails to do anything
                       it needs to do.  Make explicit cast to double
                       when passing float value to asprintf().  Change
                       return type to void - all callers changed.
  (bring_up_interface): Move variables "sd", "ret_errno", and
                        "ret_setflags" to innermost scope.  Bug fix:
                        Fail if could not get interface flags also in
                        non-debug mode, and restore old errno
                        correctly.  Print message if could not raise
                        (or later lower) privileges.
  (take_down_interface): Bug fix: When failing because it could not
                         get interface flags, restore old errno
                         correctly.  Print message if it could not
                         raise (or later lower) privileges.
  (main): Complain if failed to raise or lower privileges.  Only run
          network hooks or lower privileges if raising privileges was
          successful.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3
3
        "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4
4
<!ENTITY COMMANDNAME "mandos-client">
5
 
<!ENTITY TIMESTAMP "2017-02-23">
 
5
<!ENTITY TIMESTAMP "2014-03-05">
6
6
<!ENTITY % common SYSTEM "../common.ent">
7
7
%common;
8
8
]>
33
33
    <copyright>
34
34
      <year>2008</year>
35
35
      <year>2009</year>
36
 
      <year>2010</year>
37
 
      <year>2011</year>
38
36
      <year>2012</year>
39
37
      <year>2013</year>
40
38
      <year>2014</year>
41
 
      <year>2015</year>
42
 
      <year>2016</year>
43
 
      <year>2017</year>
44
39
      <holder>Teddy Hogeborn</holder>
45
40
      <holder>Björn Påhlsson</holder>
46
41
    </copyright>
103
98
      </arg>
104
99
      <sbr/>
105
100
      <arg>
106
 
        <option>--dh-params <replaceable>FILE</replaceable></option>
107
 
      </arg>
108
 
      <sbr/>
109
 
      <arg>
110
101
        <option>--delay <replaceable>SECONDS</replaceable></option>
111
102
      </arg>
112
103
      <sbr/>
320
311
        <listitem>
321
312
          <para>
322
313
            Sets the number of bits to use for the prime number in the
323
 
            TLS Diffie-Hellman key exchange.  The default value is
324
 
            selected automatically based on the OpenPGP key.  Note
325
 
            that if the <option>--dh-params</option> option is used,
326
 
            the values from that file will be used instead.
327
 
          </para>
328
 
        </listitem>
329
 
      </varlistentry>
330
 
      
331
 
      <varlistentry>
332
 
        <term><option>--dh-params=<replaceable
333
 
        >FILE</replaceable></option></term>
334
 
        <listitem>
335
 
          <para>
336
 
            Specifies a PEM-encoded PKCS#3 file to read the parameters
337
 
            needed by the TLS Diffie-Hellman key exchange from.  If
338
 
            this option is not given, or if the file for some reason
339
 
            could not be used, the parameters will be generated on
340
 
            startup, which will take some time and processing power.
341
 
            Those using servers running under time, power or processor
342
 
            constraints may want to generate such a file in advance
343
 
            and use this option.
 
314
            TLS Diffie-Hellman key exchange.  Default is 1024.
344
315
          </para>
345
316
        </listitem>
346
317
      </varlistentry>
473
444
  
474
445
  <refsect1 id="environment">
475
446
    <title>ENVIRONMENT</title>
476
 
    <variablelist>
477
 
      <varlistentry>
478
 
        <term><envar>MANDOSPLUGINHELPERDIR</envar></term>
479
 
        <listitem>
480
 
          <para>
481
 
            This environment variable will be assumed to contain the
482
 
            directory containing any helper executables.  The use and
483
 
            nature of these helper executables, if any, is
484
 
            purposefully not documented.
485
 
        </para>
486
 
        </listitem>
487
 
      </varlistentry>
488
 
    </variablelist>
489
447
    <para>
490
 
      This program does not use any other environment variables, not
491
 
      even the ones provided by <citerefentry><refentrytitle
 
448
      This program does not use any environment variables, not even
 
449
      the ones provided by <citerefentry><refentrytitle
492
450
      >cryptsetup</refentrytitle><manvolnum>8</manvolnum>
493
451
    </citerefentry>.
494
452
    </para>
694
652
    </variablelist>
695
653
  </refsect1>
696
654
  
697
 
  <refsect1 id="bugs">
698
 
    <title>BUGS</title>
699
 
    <xi:include href="../bugs.xml"/>
700
 
  </refsect1>
 
655
<!--   <refsect1 id="bugs"> -->
 
656
<!--     <title>BUGS</title> -->
 
657
<!--     <para> -->
 
658
<!--     </para> -->
 
659
<!--   </refsect1> -->
701
660
  
702
661
  <refsect1 id="example">
703
662
    <title>EXAMPLE</title>
789
748
    <para>
790
749
      It will also help if the checker program on the server is
791
750
      configured to request something from the client which can not be
792
 
      spoofed by someone else on the network, like SSH server key
793
 
      fingerprints, and unlike unencrypted <acronym>ICMP</acronym>
794
 
      echo (<quote>ping</quote>) replies.
 
751
      spoofed by someone else on the network, unlike unencrypted
 
752
      <acronym>ICMP</acronym> echo (<quote>ping</quote>) replies.
795
753
    </para>
796
754
    <para>
797
755
      <emphasis>Note</emphasis>: This makes it completely insecure to
843
801
      </varlistentry>
844
802
      <varlistentry>
845
803
        <term>
846
 
          <ulink url="https://www.gnutls.org/">GnuTLS</ulink>
 
804
          <ulink url="http://www.gnu.org/software/gnutls/"
 
805
          >GnuTLS</ulink>
847
806
        </term>
848
807
      <listitem>
849
808
        <para>
855
814
      </varlistentry>
856
815
      <varlistentry>
857
816
        <term>
858
 
          <ulink url="https://www.gnupg.org/related_software/gpgme/"
 
817
          <ulink url="http://www.gnupg.org/related_software/gpgme/"
859
818
                 >GPGME</ulink>
860
819
        </term>
861
820
        <listitem>
899
858
      </varlistentry>
900
859
      <varlistentry>
901
860
        <term>
902
 
          RFC 5246: <citetitle>The Transport Layer Security (TLS)
903
 
          Protocol Version 1.2</citetitle>
 
861
          RFC 4346: <citetitle>The Transport Layer Security (TLS)
 
862
          Protocol Version 1.1</citetitle>
904
863
        </term>
905
864
      <listitem>
906
865
        <para>
907
 
          TLS 1.2 is the protocol implemented by GnuTLS.
 
866
          TLS 1.1 is the protocol implemented by GnuTLS.
908
867
        </para>
909
868
      </listitem>
910
869
      </varlistentry>
921
880
      </varlistentry>
922
881
      <varlistentry>
923
882
        <term>
924
 
          RFC 6091: <citetitle>Using OpenPGP Keys for Transport Layer
 
883
          RFC 5081: <citetitle>Using OpenPGP Keys for Transport Layer
925
884
          Security</citetitle>
926
885
        </term>
927
886
      <listitem>