| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The included cocci was used to generate the changes.
Thanks to @flo-wer for pointing this case out.
|
|\
| |
| | |
Rename "gateway" to "_gateway" and other resolved changes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changes the symbolic name for the default gateway from "gateway" to
"_gateway". A new configuration option -Dcompat-gateway-hostname=true|false
is added. If it is set, the old name is also supported, but the new name
is used as the canonical name in either case. This is intended as a temporary
measure to make the transition easier, and the option should be removed
after a few releases, at which point only the new name will be used.
The old "gateway" name mostly works OK, but hasn't gained widespread acceptance
because of the following (potential) conflicts:
- it is completely legal to have a host called "gateway"
- there is no guarantee that "gateway" will not be registered as a TLD, even
though this currently seems unlikely. (Even then, there would be no
conflict except for the case when the top-level domain itself was being resolved.
The "gateway" or "_gateway" labels have only special meaning when the
whole name consists of a single label, so resolution of any subdomain
of the hypothetical gateway. TLD would still work OK. )
Moving to "_gateway" avoids those issues because underscores are not allowed
in host names (RFC 1123, §2.1) and avoids potential conflicts with local or
global names.
v2:
- simplify the logic to hardcode "_gateway" and allow
-Dcompat-gateway-hostname=true as a temporary measure.
|
|/
|
|
|
| |
strlen_ptr() is to strlen() what streq_ptr() is to streq(): i.e. it
handles NULL strings in a smart way.
|
|
|
|
|
| |
v2:
- also mention m4
|
|
|
|
|
|
|
| |
This is a follow-up for #5359, fixing the error codes in a similar way
for the other NSS modules.
(user/group lookup calls don't have h_errnop, hence we don't update that
in those cases)
|
|
|
|
| |
Inspired by #4465, we shouldn't do this for nss-myhostname either.
|
| |
|
|
|
| |
Super-important change, yeah!
|
| |
|
| |
|
|
|
|
|
| |
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file.
|
|
|
|
|
|
|
| |
Let's make sure our poll() calls don't get interrupted where they shouldn't (SIGALRM, ...), but allow them to be
interrupted where they should (SIGINT, ...).
Fixes #1965
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files.
|
|
|
|
|
|
|
|
|
| |
This moves is_gateway() from nss-myhostname into the basic APIs, and
makes it more like is_localhost(). Also, we rename it to
is_gateway_hostname() to make it more expressive.
Sharing this function in src/basic/ allows us to reuse the function for
routing name requests in resolved (in a later commit).
|
|
|
|
|
|
| |
Given that we already hardocde the loopback ifindex, following the
kernel's own logic, we can replace the invocation of
if_nametoindex("lo") with LOOPBACK_IFINDEX.
|
|
|
|
|
|
|
|
|
| |
Pretty trivial helper which wraps free() but returns NULL, so we can
simplify this:
free(foobar);
foobar = NULL;
to this:
foobar = mfree(foobar);
|
| |
|
|
|
|
|
|
| |
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use.
|
|
|
|
|
|
| |
addresses to hostnames
https://bugs.freedesktop.org/show_bug.cgi?id=87634
|
| |
|
|
|
|
|
| |
"gateway." skips adding the domain search path and saves some queries to
the nameserver.
|
|
|
|
| |
account
|
|
|
|
|
|
|
|
| |
gateway
This is useful inside of containers or local networks to intrdouce a
stable name of the default gateway host (in case of containers usually
the host, in case of LANs usually local router).
|
|
|
|
|
|
|
| |
In the long run this should become a full fledged client to networkd
(but not before networkd learns bus support). For now, just pull
interesting data out of networkd, udev, and rtnl and present it to the
user, in a simple but useful output.
|
|
|
|
|
|
|
| |
glibc appears to be broken if we don't explicitly reset all error
variables, let's work around that.
https://bugzilla.redhat.com/show_bug.cgi?id=1125975
|
| |
|
|
|
|
|
| |
We mostly use "family" to refer to AF_INET, AF_INET6, etc, let's use
this terminology here, too
|
| |
|
| |
|
| |
|
|
|
|
| |
make use of it from machined
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This extends 62678ded 'efi: never call qsort on potentially
NULL arrays' to all other places where qsort is used and it
is not obvious that the count is non-zero.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes sure nss-myhostname not only resolves the local host name to
127.0.0.2/::1 but also the host name 'localhost: to 127.0.0.1/::1. This
makes installation of /etc/passwd optional, as it usually only includes
a mapping for 'localhost'.
This change also resolves ::1 to the local hostname (as before), but
also lists 'localhost' as an alias. This means look-ups are now fully
reversible, even though they are 1:n mappings.
Finally, the module will no longer erroneously claim that local IP
addresses which aren't on the loopback device were.
|
| |
|
|
|
|
| |
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
|
| |
|
|
|
|
|
|
|
|
|
|
| |
mss-myhostname wasn't working because of underlinking. Instead of
fixing the underlinking, just remove the use of _cleanup_ macros.
It is impolite to use our utility functions in modules designed to be
loaded by others. So cleanup macros which (at some point) call assert
which calls log_assert_failed, should not be used. Revert this part of
commit d73c3269c.
|
|
|
|
|
|
|
| |
The triply nested loop is just too much. Let's split out the
middle loop's body, so the whole thing is easier to read. Also
modernize the style a bit, using structure initialization to
avoid memset and such.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes a segfault in nscd when using nss-myhostname.
Nscd expects that an NSS module's gethostbyname4_r function returns
its first result in the pre-allocated gaih_addrtuple denoted by **pat.
(See nscd/aicache.c in the Glibc sources.) However, nss-myhostname
doesn't fill in **pat but allocates the first result in ‘buffer’, then
sets *pat. So nscd crashes (e.g. when running ‘getent ahosts
my-machine’).
Hard to tell if this is a bug in nscd, since there doesn't seem to be
a proper API spec for gethostbyname4_r. But in any case, this patch
fixes the crash by copying the first result to **pat.
|
| |
|
|
|
|
|
| |
Converted from html to xml and changed the style to fit into the other
manpages.
|