Ninjatrappeur's systemd working tree
Go to file
Zbigniew Jędrzejewski-Szmek 7470cc4c73 resolve: reject host names with leading or trailing dashes in /etc/hosts
https://tools.ietf.org/html/rfc1035#section-2.3.1 says (approximately)
that only letters, numbers, and non-leading non-trailing dashes are allowed
(for entries with A/AAAA records). We set no restrictions.

hosts(5) says:
> Host names may contain only alphanumeric characters, minus signs ("-"), and
> periods (".").  They must begin with an alphabetic character and end with an
> alphanumeric character.

nss-files follows those rules, and will ignore names in /etc/hosts that do not
follow this rule.

Let's follow the documented rules for /etc/hosts. In particular, this makes us
consitent with nss-files, reducing surprises for the user.

I'm pretty sure we should apply stricter filtering to names received over DNS
and LLMNR and MDNS, but it's a bigger project, because the rules differ
depepending on which level the label appears (rules for top-level names are
stricter), and this patch takes the minimalistic approach and only changes
behaviour for /etc/hosts.

Escape syntax is also disallowed in /etc/hosts, even if the resulting character
would be allowed. Other tools that parse /etc/hosts do not support this, and
there is no need to use it because no allowed characters benefit from escaping.
2018-12-10 09:56:56 +01:00
.github/ISSUE_TEMPLATE docs: move markdown docs from .github/ to docs/ 2018-09-08 13:39:03 -07:00
.lgtm/cpp-queries lgtm: drop redundant newlines 2018-10-26 14:52:17 +02:00
.mkosi mkosi: drop my copyright 2018-11-26 00:30:28 +01:00
catalog catalog: update Polish translation 2018-11-19 09:23:04 +01:00
coccinelle tree-wide: more IOVEC_MAKE() conversions 2018-11-28 13:08:19 +09:00
docs locale-util: add logic to output smiley emojis at various happiness levels 2018-11-30 16:19:29 +01:00
factory/etc man,factory: update factory config for nsswitch.conf to match the man pages 2018-11-27 22:35:02 +01:00
hwdb hwdb: Put Lenovo mouse under the correct category in 70-mouse.hwdb (#10995) 2018-11-30 09:14:30 +01:00
man man/daemon.xml: use AM_DISTCHECK_CONFIGURE_FLAGS 2018-12-04 22:45:14 +01:00
modprobe.d Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
network Drop my copyright headers 2018-06-14 13:03:20 +02:00
po l10n: update Czech Translation 2018-12-04 09:25:39 +01:00
presets Drop my copyright headers 2018-06-14 13:03:20 +02:00
rules rules: watch metadata changes on DASD devices 2018-12-04 20:57:47 +01:00
shell-completion zsh-completion: Add support for set-property (#10322) 2018-11-20 13:17:11 +09:00
src resolve: reject host names with leading or trailing dashes in /etc/hosts 2018-12-10 09:56:56 +01:00
sysctl.d sysctl.d: switch net.ipv4.conf.all.rp_filter from 1 to 2 2018-11-28 16:29:01 +01:00
sysusers.d sysusers,tmpfiles: re-create systemd-network, systemd-resolve and systemd-timesync 2018-07-16 17:11:50 +02:00
test cgroup: Add DisableControllers= directive to disable controller in subtree 2018-12-03 15:40:31 +00:00
tmpfiles.d sysusers,tmpfiles: re-create systemd-network, systemd-resolve and systemd-timesync 2018-07-16 17:11:50 +02:00
tools docs: work around GitHub pages weirdness 2018-11-29 19:09:09 +01:00
travis-ci travis: install llvm to get llvm-symbolizer 2018-12-04 04:56:02 +01:00
units Merge pull request #10357 from poettering/import-fs 2018-11-29 16:38:46 +01:00
xorg login: avoid external process call 2018-01-12 18:02:57 +01:00
.dir-locals.el make dir-locals work again with emacs 26.1 2018-07-23 20:00:48 +02:00
.editorconfig editorconfig: add rule for meson.build files (#6671) 2017-08-28 16:37:23 +02:00
.gitattributes git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore gitignore: add nspawn image lock and mkosi temporary files 2018-09-07 20:00:22 +02:00
.lgtm.yml LGTM: make LGTM.com use meson from pip 2018-07-24 01:37:47 +09:00
.mailmap update NEWS contributors list again 2018-06-20 13:32:57 +02:00
.travis.yml travis: also run the tests built with clang under ASan+UBsan 2018-12-04 01:10:13 +01:00
.vimrc vimrc: fix indentation logic for our docbook xml files 2016-04-29 12:23:34 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile build-sys: Fix Makefile wrapper for install target (#6548) 2017-08-07 11:29:20 +02:00
NEWS NEWS: extend docs on RLIMIT_NOFILE 2018-11-29 14:55:31 +09:00
README Drop support for lz4 < 1.3.0 2018-10-29 21:54:42 +01:00
README.md docs: Update links to updated docs 2018-10-30 23:01:20 +05:30
TODO update TODO 2018-11-30 16:48:09 +01:00
configure build-sys: add basic support for ./configure && make && make install 2017-07-18 10:05:06 -04:00
meson.build missing: move btrfs related entries to missing_btrfs.h and missing_btrfs_tree.h 2018-12-04 07:46:59 +01:00
meson_options.txt meson: also add option for debugging siphash 2018-11-23 00:36:35 +09:00
mkosi.build mkosi: update the boot loader from our freshly built one 2018-10-16 16:44:34 +02:00
mkosi.default mkosi: create .mkosi directory 2016-10-06 11:53:58 -04:00
zanata.xml po: add basic fedora.zanata.org configuration 2018-02-19 13:56:57 +01:00

README.md

systemd - System and Service Manager

Count of open issues over time Count of open pull requests over time Build Status
Coverity Scan Status
CII Best Practices
Build Status
Language Grade: C/C++

Details

General information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Hacking guide for information on how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.