Commit graph

23 commits

Author SHA1 Message Date
Lennart Poettering 49f16281c9 tree-wide: use READ_FULL_FILE_CONNECT_SOCKET at various places
Let's use the new flag wherever we read key material/passphrases/hashes
off disk, so that people can plug in their own IPC service as backend if
they like, easily.

(My main goal was actually to support this for crypttab key files — i.e.
that you can specify AF_UNIX sockets as third column in crypttab — but
that's harder to implement, since the keys are read via libcryptsetup's
API, not ours.)
2020-07-21 10:32:01 +02:00
Lennart Poettering f294470262 fileio: add explicit flag for generating world executable warning when reading file 2020-07-21 09:56:44 +02:00
Yu Watanabe d96edb2c6e network: downgrade log level in conf parsers 2020-07-17 00:40:09 +09:00
Yu Watanabe 0e77fc66bc network: fix double free in macsec_receive_channel_free()
Fixes #15941.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22547
2020-06-01 09:39:46 +02:00
Benjamin Robin b9c54c4665 tree-wide: Initialize _cleanup_ variables if needed 2020-05-13 22:56:42 +02:00
Yu Watanabe 3267cb45e9
Merge pull request #14208 from poettering/json-homed-prepare
json bits from homed PR
2019-12-17 23:10:08 +09:00
Lennart Poettering 8241f785f4 fileio: add 'dir_fd' parameter to read_full_file_full()
Let's introduce an "at" version of read_full_file().
2019-12-02 09:47:00 +01:00
Zbigniew Jędrzejewski-Szmek 130b812f9d network: warn about unknown sections when parsing .netdev files
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1774242.
Now we'll emit the warning about unknown section [Netdev], making the issue
much easier to diagnose.
2019-11-25 16:45:29 +01:00
Yu Watanabe f5947a5e92 tree-wide: drop missing.h 2019-10-31 17:57:03 +09:00
Yu Watanabe 737f140546 network: cleanup header inclusion 2019-10-30 22:23:43 +09:00
Yu Watanabe 0bae857564 network: also check the permission of key file 2019-09-11 21:11:01 +09:00
Zbigniew Jędrzejewski-Szmek e693a93235 Use _cleanup(free_and_erasep) where appropriate
Replaces #12959.
2019-07-10 11:39:03 +02:00
Zbigniew Jędrzejewski-Szmek 5043ec6476 networkd: shorter two error statements a bit
Also let's not use a cast if we don't have to.
2019-05-30 22:56:03 +02:00
Yu Watanabe daf0f8ca87 network: add NetDevVTable::generate_mac flag 2019-05-28 22:45:35 +09:00
Yu Watanabe 9aa5d8ba84 network: include glibc headers before including kernel headers 2019-05-09 03:21:31 +02:00
Zbigniew Jędrzejewski-Szmek e61614099f network: avoid warning about unaligned pointers
With gcc-9.0.1-0.10.fc30.x86_64:
../src/network/netdev/macsec.c: In function ‘config_parse_macsec_port’:
../src/network/netdev/macsec.c:584:24: warning: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  584 |                 dest = &c->sci.port;
      |                        ^~~~~~~~~~~~
../src/network/netdev/macsec.c:592:24: warning: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  592 |                 dest = &b->sci.port;
      |                        ^~~~~~~~~~~~

(The alignment was probably OK, but it's nicer to avoid the warning anyway.)
2019-04-13 11:55:04 +02:00
Yu Watanabe 70c5754761 network: warn when private key is stored in world readable files 2019-04-12 10:12:42 +09:00
Yu Watanabe b0e13c3122 network: add MACsecTransmitAssociation.UseForEncoding= setting 2019-04-12 10:12:42 +09:00
Yu Watanabe a7b9c52f1f network: add MACsec*Association.Activate= setting 2019-04-12 10:12:42 +09:00
Yu Watanabe eb4705fb36 network: add MACsec*Association.KeyFile= setting 2019-04-12 10:12:42 +09:00
Yu Watanabe e482018672 network: explicitly clear security key for macsec 2019-04-12 10:12:42 +09:00
Yu Watanabe e0fde24c97 network: support multiple security associations for macsec channels 2019-04-12 10:12:42 +09:00
Susant Sahani 81962db798 network: Introduce MACsec
Media Access Control Security (MACsec) is an 802.1AE IEEE
industry-standard security technology that provides secure
communication for all traffic on Ethernet links.
MACsec provides point-to-point security on Ethernet links between
directly connected nodes and is capable of identifying and preventing
most security threats, including denial of service, intrusion,
man-in-the-middle, masquerading, passive wiretapping, and playback attacks.

Closes #5754
2019-04-12 10:12:41 +09:00