summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* util: split out sorting related calls to new sort-util.[ch]Lennart Poettering2019-03-1339-108/+136
|
* util: split out memcmp()/memset() related calls into memory-util.[ch]Lennart Poettering2019-03-1382-145/+181
| | | | Just some source rearranging.
* util: split out some stuff into a new file limits-util.[ch]Lennart Poettering2019-03-1312-154/+175
|
* util: split out namespace related stuff into a new namespace-util.[ch] pairLennart Poettering2019-03-1317-166/+193
| | | | Just some minor reorganiztion.
* test: don't overwrite TESTDIR if already setFrantisek Sumsal2019-03-131-2/+7
|
* Merge pull request #11861 from yuwata/network-verify-2Lennart Poettering2019-03-1332-380/+659
|\ | | | | network: config parser updates and wireguard refactoring
| * test-network: add test for WireGuard.PrivateKeyFile=Yu Watanabe2019-03-134-2/+17
| |
| * wireguard: add PrivateKeyFile= optionYu Watanabe2019-03-135-2/+100
| | | | | | | | Closes #11878.
| * wireguard: check whether PrivateKey= and PublicKey= are setYu Watanabe2019-03-131-1/+21
| |
| * wireguard: drop unused arguments and rename parse_wireguard_key()Yu Watanabe2019-03-131-19/+19
| |
| * wireguard: do not log wireguard keyYu Watanabe2019-03-131-3/+4
| | | | | | | | It may be PrivateKey=.
| * wireguard: reuse sd_event_source objectYu Watanabe2019-03-132-17/+9
| |
| * wireguard: use NetworkConfigSection to manage [WireGuardPeer] sectionsYu Watanabe2019-03-132-164/+225
| | | | | | | | This also contains huge refactoring of wireguard support.
| * test-network: add tests for invalid Address sectionsYu Watanabe2019-03-132-0/+20
| |
| * test: make network_verify() public and use it in test-networkd-confYu Watanabe2019-03-133-4/+9
| |
| * network: drop sections contain invalid settings in network_verify()Yu Watanabe2019-03-1318-73/+149
| | | | | | | | | | | | | | | | | | | | | | If e.g., an [Address] section has an invalid setting, then previously assigned settings in the section is freed, and only later settings are stored. That may cause partially broken section stored in Network object. This makes if an invalid setting is found, then set 'invalid' flag instead of freeing it. And invalid sections are dropped later by network_verify().
| * network: make all xxx_new_static() staticYu Watanabe2019-03-1310-11/+6
| | | | | | | | | | These functions are called from only config parsers, and the parsers are in the same files. So, let's make them static.
| * network: add IPv4LL route right after .network file is parsedYu Watanabe2019-03-133-22/+34
| | | | | | | | | | | | Previously, the route is added when the .network config is assigned to a Link. So, if multiple links match the .network file, the route entry becomes duplicated in the corresponding Network object.
| * network: move NetworkConfigSection and related functions to networkd-util.[ch]Yu Watanabe2019-03-134-46/+47
| |
| * network: use ltype to determine netdev kind in config_parse_stacked_netdev()Yu Watanabe2019-03-132-27/+10
| |
* | Merge pull request #11893 from yuwata/wait-online-take-operstateLennart Poettering2019-03-1322-150/+424
|\ \ | | | | | | wait-online: optionally take required minimum operational state
| * | wait-online: use log_link_debug() or friendsYu Watanabe2019-03-133-32/+24
| | |
| * | network: move log_link_debug() or friends to log-link.hYu Watanabe2019-03-133-24/+39
| | |
| * | man: update wait-online and RequiredForOnline= settingYu Watanabe2019-03-132-12/+50
| | |
| * | wait-online: support $REQUIRED_OPER_STATE_FOR_ONLINE= in state fileYu Watanabe2019-03-135-70/+216
| | | | | | | | | | | | | | | | | | | | | This also make wait-online optionally take operstate in -i option, and adds '--operstate' option to wait-online which also takes operstate. Also, this contains huge refactoring for wait-online.
| * | sd-network: add sd_network_link_get_required_operstate_for_online()Yu Watanabe2019-03-132-0/+22
| | | | | | | | | | | | It reads $REQUIRED_OPER_STATE_FOR_ONLINE in serialized link data.
| * | network: make RequiredForOnline= also take operational stateYu Watanabe2019-03-134-1/+50
| | | | | | | | | | | | This will be used by systemd-networkd-wait-online.
| * | hashmap: add hashmap_free_free_keyp and friendYu Watanabe2019-03-131-0/+2
| | |
| * | network: introduce 'degraded-carrier' operstate to order all statesYu Watanabe2019-03-136-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, 'degraded' state is ambiguous for bonding or bridge master: 1. one or more slave interfaces does not have carrier, 2. no link local address is assigned to the master, 3. combination of the above two. This makes the above case 1 and 3 are in the new 'degraded-carrier' state, and makes 'degraded' state as all slaves are active but no link local address on master.
| * | network: move LinkOperationalState and relevant functions to network-util.[ch]Yu Watanabe2019-03-134-27/+31
| | |
| * | test-network: wait more and fix wrong operational stateYu Watanabe2019-03-131-2/+2
| |/ | | | | | | Closes #11977.
* | Merge pull request #11283 from yuwata/fix-11276Lennart Poettering2019-03-134-32/+70
|\ \ | | | | | | core/namespace: introduce new mount mode READWRITE_IMPLICIT
| * | test: add a testcase for ProtectHome=tmpfs vs ProtectSystem=strictYu Watanabe2019-03-133-0/+15
| | |
| * | core/namespace: logs mount mode when the entry is droppedYu Watanabe2019-03-131-2/+23
| | |
| * | core/namespace: introduce new mount mode READWRITE_IMPLICITYu Watanabe2019-03-131-30/+32
| |/ | | | | | | | | | | | | | | | | | | ProtectSystem=strict or ProtectKernelTunable=yes create implicit read-write mounts, but they are not overridable by TemporaryFileSystem=. This makes such implicit read-write mounts use the new mount mode. So, they can be override by TemproraryFileSystem= now. A typical usecase is that ProtectSystem=strict and ProtectHome=tmpfs. Fixes #11276.
* | cryptsetup: add same-cpu-crypt and submit-from-crypt-cpus optionsYu Watanabe2019-03-133-0/+40
| | | | | | | | Closes #11946.
* | Merge pull request #11933 from keszybz/coverityLennart Poettering2019-03-133-24/+53
|\ \ | |/ |/| Minor tweaks to boot/efi code inspired by coverity
| * shared/bootspec: avoid going through -1 when calculating array indexZbigniew Jędrzejewski-Szmek2019-03-121-6/+8
| | | | | | | | | | | | | | | | Coverity was complaining in CID#1399407 that config->entries might be used while NULL. Let's add an assert to make sure it's not. Also, let's quit early if we have no entries to loop through. The code was not incorrect, but it's cleaner to avoid any negative indices.
| * boot: avoid 32-bit calculation for a 64-bit lvalueZbigniew Jędrzejewski-Szmek2019-03-122-1/+8
| | | | | | | | | | | | | | | | | | | | | | Coverity CID#1399116: > Potentially overflowing expression > gpt_header_buffer.gpt_header.SizeOfPartitionEntry * gpt_header_buffer.gpt_header.NumberOfPartitionEntries > with type unsigned int (32 bits, unsigned) is evaluated using 32-bit > arithmetic, and then used in a context that expects an expression of type > UINTN (64 bits, unsigned). Let's import the ALIGN_TO macro to sd-boot and use it to avoid the issue.
| * efi: wrap some long linesZbigniew Jędrzejewski-Szmek2019-03-081-18/+38
| |
* | Merge pull request #11919 from poettering/login-simplifyLennart Poettering2019-03-126-49/+58
|\ \ | | | | | | various fixes to $HOME and $SHELL validation
| * | update TODOLennart Poettering2019-03-121-0/+3
| | |
| * | login: drop redundant newlineLennart Poettering2019-03-121-1/+0
| | |
| * | user-util: extra paranoia, make sure $SHELL can't be fucked with in suid ↵Lennart Poettering2019-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | programs It's better to be safe than sorry, let's not allow overriding of the user shell in suid binaries. Similar for $USER.
| * | execute: no need to synthesize $HOME for uid==0 again, get_home_dir() ↵Lennart Poettering2019-03-121-6/+0
| | | | | | | | | | | | already does that
| * | execute: simplify paths we set as HOME/SHELL for invoked programsLennart Poettering2019-03-121-0/+4
| | |
| * | user-util: simplify paths retrieved from $HOME and $SHELLLennart Poettering2019-03-121-4/+4
| | | | | | | | | | | | Let's add some extra paranoia, after #11910
| * | user-util: be more strict when reading $HOME and $SHELLLennart Poettering2019-03-121-4/+6
| | |
| * | user-util: paranoia — add overflow check on ERANGE loopLennart Poettering2019-03-121-0/+6
| | |
| * | user-util: use SYNTHETIC_ERRNO() where we canLennart Poettering2019-03-121-28/+18
| | |