]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
5 years agoprivsep: copy configuration file into chroot
Roy Marples [Tue, 21 Jan 2020 20:08:56 +0000 (20:08 +0000)] 
privsep: copy configuration file into chroot

Only if it has changed.
Saves having to maintian it outside of dhcpcdm in a script or
something.

5 years agoinet6: fix forced RA expiration for a given interface
Roy Marples [Tue, 21 Jan 2020 16:26:41 +0000 (16:26 +0000)] 
inet6: fix forced RA expiration for a given interface

5 years agoprivsep: chroot the master process
Roy Marples [Tue, 21 Jan 2020 16:17:18 +0000 (16:17 +0000)] 
privsep: chroot the master process

This means that the privileged actioneer process needs to cleanup
sockets and pidfile.
It also has some reliance on how dhcpcd is started to create
a decent chroot area AND copy the configuration file to it.

5 years agoprivsep: Close stdout/stderr after forking processes
Roy Marples [Tue, 21 Jan 2020 16:11:37 +0000 (16:11 +0000)] 
privsep: Close stdout/stderr after forking processes

Well, redirect them to /dev/null anyway.
Also tidy a few things in common whilst here.

5 years agoBSD: Improve RTM_NEWADDR/RTM_DELADDR validaton some more
Roy Marples [Tue, 21 Jan 2020 12:01:02 +0000 (12:01 +0000)] 
BSD: Improve RTM_NEWADDR/RTM_DELADDR validaton some more

5 years agoOnly ignore address messages from ourself for deletion.
Roy Marples [Mon, 20 Jan 2020 11:59:06 +0000 (11:59 +0000)] 
Only ignore address messages from ourself for deletion.

We need to process addition for flag changes.

5 years agoBSD: Validate RTM_NEWADDR as well
Roy Marples [Fri, 17 Jan 2020 22:27:18 +0000 (22:27 +0000)] 
BSD: Validate RTM_NEWADDR as well

This is important because the address could be added and quickly
deleted and RTM_NEWADDR arrvives after deletion.

5 years agoinet6: Check if we can try a new address on DAD failure.
Roy Marples [Fri, 17 Jan 2020 21:09:04 +0000 (21:09 +0000)] 
inet6: Check if we can try a new address on DAD failure.

Not all prefixes are autoconfable.

5 years agoinet6: Log expiration of a prefix if autoconf is not set
Roy Marples [Fri, 17 Jan 2020 20:33:20 +0000 (20:33 +0000)] 
inet6: Log expiration of a prefix if autoconf is not set

Rather than the address. Otherwise it looks wierd.

5 years agoMinor fix to prior.
Roy Marples [Fri, 17 Jan 2020 17:23:50 +0000 (17:23 +0000)] 
Minor fix to prior.

5 years agoOpenBSD: Support privacy extensions
Roy Marples [Fri, 17 Jan 2020 17:18:45 +0000 (17:18 +0000)] 
OpenBSD: Support privacy extensions

If course, OpenBSD is really different from other BSD's.
IN6_IFF_PRIVACY is their IN6_IFF_TEMPORARY.
Temporary addresses are on by default, you need to turn them
off on OpenBSD via ifconfig.
Temporary addresss timings are not configurable and the address
itself is always preferred over non temporary addresses within the
same scope.

5 years agoinet6: Temporary addresses only work if prefix + ifidlen == 128
Roy Marples [Fri, 17 Jan 2020 16:21:37 +0000 (16:21 +0000)] 
inet6: Temporary addresses only work if prefix + ifidlen == 128

Cater for various prefix lengths when using temporay addresses.

5 years agoprivsep: chdir after chroot
Roy Marples [Fri, 17 Jan 2020 14:02:59 +0000 (14:02 +0000)] 
privsep: chdir after chroot

chroot itself does not actually change the directory....

5 years agoinet6: Support a /128 autoconf prefix from RA
Roy Marples [Fri, 17 Jan 2020 13:22:57 +0000 (13:22 +0000)] 
inet6: Support a /128 autoconf prefix from RA

This is apparently a thing. Unsure why, but heh ho.

5 years agoLinux: Silence a warning on 32-bit Linux
Roy Marples [Fri, 17 Jan 2020 12:58:28 +0000 (12:58 +0000)] 
Linux: Silence a warning on 32-bit Linux

5 years agoBSD: Disable checking rtm_pid and comment why.
Roy Marples [Thu, 16 Jan 2020 21:56:35 +0000 (21:56 +0000)] 
BSD: Disable checking rtm_pid and comment why.

It's because we turn off SO_USELOOPBACK.
Also note that this trick does NOT work for addresses.

5 years agoBSD: Ignore messages from ourself in privsep.
Roy Marples [Thu, 16 Jan 2020 21:47:27 +0000 (21:47 +0000)] 
BSD: Ignore messages from ourself in privsep.

5 years agoLinux: Use the persistent route socket for writing netlink msgs
Roy Marples [Thu, 16 Jan 2020 17:33:24 +0000 (17:33 +0000)] 
Linux: Use the persistent route socket for writing netlink msgs

This reverts 2c8dc9ee7.
This *should* be fine because we can detect ourself and privsep
sending messages so we can ignore them.

5 years agoTypo
Roy Marples [Thu, 16 Jan 2020 14:48:25 +0000 (14:48 +0000)] 
Typo

5 years agodhcpcd: Ignore SIGPIPE, prefer EPIPE.
Roy Marples [Thu, 16 Jan 2020 03:20:53 +0000 (03:20 +0000)] 
dhcpcd: Ignore SIGPIPE, prefer EPIPE.

This is mainly to get dhcpcd running in privsep on my ERLITE
router running some NetBSD pre-9 branch.

So far, seems harmless....

5 years agoanonymous: Allow Domain Name option through.
Roy Marples [Wed, 15 Jan 2020 19:16:58 +0000 (19:16 +0000)] 
anonymous: Allow Domain Name option through.

To be clear, we don't send our domain name, we just request one
for old servers that don't support Domain Search.

5 years agoDHCP6: Fix writing mudurl
Roy Marples [Wed, 15 Jan 2020 17:22:12 +0000 (17:22 +0000)] 
DHCP6: Fix writing mudurl

5 years agodhcpcd: Don't report DUID or IAID in anonymous.
Roy Marples [Wed, 15 Jan 2020 16:24:37 +0000 (16:24 +0000)] 
dhcpcd: Don't report DUID or IAID in anonymous.

It just confuses things.

5 years agoSolaris: Add a shim for hardware address randomisation
Roy Marples [Wed, 15 Jan 2020 16:18:54 +0000 (19:18 +0300)] 
Solaris: Add a shim for hardware address randomisation

Doesn't work yet.

5 years agoDHCP6: Fix a bogus compile warning
Roy Marples [Wed, 15 Jan 2020 16:18:35 +0000 (19:18 +0300)] 
DHCP6: Fix a bogus compile warning

5 years agoLinux: Support hardware address randomisation
Roy Marples [Wed, 15 Jan 2020 16:07:27 +0000 (16:07 +0000)] 
Linux: Support hardware address randomisation

5 years agoFreeBSD: Support hardware address randomisation
Roy Marples [Wed, 15 Jan 2020 15:49:23 +0000 (15:49 +0000)] 
FreeBSD: Support hardware address randomisation

5 years agoif: Fix hardware address randomisation
Roy Marples [Wed, 15 Jan 2020 15:48:27 +0000 (15:48 +0000)] 
if: Fix hardware address randomisation

And copy back the actual length of it, not the whole buffer.

5 years agodhcpcd: carrier up does not mean interface is up
Roy Marples [Wed, 15 Jan 2020 15:47:45 +0000 (15:47 +0000)] 
dhcpcd: carrier up does not mean interface is up

And we really want it up here.

5 years agoImplement Anonymity Profiles for DHCP Clients, RFC 7844
Roy Marples [Wed, 15 Jan 2020 14:28:24 +0000 (14:28 +0000)] 
Implement Anonymity Profiles for DHCP Clients, RFC 7844

This works by randomising the hardware address when carrier is down
and using this to construct a DUID LL which is used over any saved
DUID. IAID is defaulted to zero and hostname + FQDN are disabled.
Then every possible option is masked out except for essential ones.

It's possible to request options *after* anonymous option which
will enable it. This is RFC compliant and allows 100% flexability
in letting the user decide what, if any, details leek out.

This is disabled by default.
Only works on NetBSD, other OS coming shortly.

5 years agoLinux: close the netlink privsep socket once done.
Roy Marples [Tue, 14 Jan 2020 11:53:29 +0000 (11:53 +0000)] 
Linux: close the netlink privsep socket once done.

5 years agoprivsep: Remove fd's from event loop and ensure all closed.
Roy Marples [Tue, 14 Jan 2020 11:53:05 +0000 (11:53 +0000)] 
privsep: Remove fd's from event loop and ensure all closed.

5 years agocontrol: avoid unlinking the socket when sending commands
Roy Marples [Thu, 9 Jan 2020 15:59:15 +0000 (15:59 +0000)] 
control: avoid unlinking the socket when sending commands

5 years agoprivsep: Fix prior so we init
Roy Marples [Thu, 9 Jan 2020 15:52:41 +0000 (15:52 +0000)] 
privsep: Fix prior so we init

5 years agoprivsep: Delay control startup after starting privsep
Roy Marples [Thu, 9 Jan 2020 15:39:18 +0000 (15:39 +0000)] 
privsep: Delay control startup after starting privsep

This means we don't need to close it for other processes.
Add ps_init so that we can change directory permissions before
starting privsep itself.

5 years agoDHCP: Spawn a listener in non master mode for a new lease
Roy Marples [Thu, 9 Jan 2020 14:48:56 +0000 (14:48 +0000)] 
DHCP: Spawn a listener in non master mode for a new lease

Fixes a privsep issue

5 years agoprivsep: sa_family_t can be a different size
Roy Marples [Thu, 9 Jan 2020 00:33:03 +0000 (00:33 +0000)] 
privsep: sa_family_t can be a different size

5 years agoprivsep: correct debug struct name
Roy Marples [Thu, 9 Jan 2020 00:32:39 +0000 (00:32 +0000)] 
privsep: correct debug struct name

5 years agoprivsep: If the privsep user does not exist, reset errno
Roy Marples [Wed, 8 Jan 2020 20:32:15 +0000 (20:32 +0000)] 
privsep: If the privsep user does not exist, reset errno

Incase logerrx sets it....
Now we work on musl!

5 years agoioctl: The POSIX signature differs from BSD and glibc
Roy Marples [Wed, 8 Jan 2020 20:13:20 +0000 (20:13 +0000)] 
ioctl: The POSIX signature differs from BSD and glibc

BSD and glibc have the signature for request as unsigned long.
musl and Solaris have a signed int.

As such, we need to detect this at compile time and adjust the
signature of our internal ioctl functions to match.
To keep the onwire format the same, memcpy the request to the
unsigned long request and back again, thus preserving the signedness.

5 years agoLinux: privsep write uint to path needs to read the resultant error
Roy Marples [Wed, 8 Jan 2020 16:57:46 +0000 (16:57 +0000)] 
Linux: privsep write uint to path needs to read the resultant error

Otherwise it hangs around and provides bogus errors to the next
caller of root processes.

5 years agoprivsep: Pad structs out so there are no uninited memory issues
Roy Marples [Wed, 8 Jan 2020 16:07:58 +0000 (16:07 +0000)] 
privsep: Pad structs out so there are no uninited memory issues

Add #ifdef'd out debug code for them as well.

5 years agoLinux: Improve privsep code a little
Roy Marples [Wed, 8 Jan 2020 15:58:57 +0000 (15:58 +0000)] 
Linux: Improve privsep code a little

5 years agoLinux: clean up some compile warnings without privsep
Roy Marples [Wed, 8 Jan 2020 14:26:01 +0000 (14:26 +0000)] 
Linux: clean up some compile warnings without privsep

5 years agoLinux: write uints to paths again
Roy Marples [Wed, 8 Jan 2020 12:24:38 +0000 (12:24 +0000)] 
Linux: write uints to paths again

Remove debug ... sigh

5 years agoDHCP6: Only set RT to state with callbacks.
Roy Marples [Wed, 8 Jan 2020 11:17:30 +0000 (11:17 +0000)] 
DHCP6: Only set RT to state with callbacks.

5 years agoeloop: header is now the single source of truth for SEC_PER_SEC
Roy Marples [Wed, 8 Jan 2020 00:43:11 +0000 (00:43 +0000)] 
eloop: header is now the single source of truth for SEC_PER_SEC

Saves duplication

5 years agoDHCP: Fix a bogus gcc warning
Roy Marples [Sat, 4 Jan 2020 07:44:10 +0000 (07:44 +0000)] 
DHCP: Fix a bogus gcc warning

5 years agoThis cast is no longer needed.
Roy Marples [Wed, 8 Jan 2020 00:13:44 +0000 (00:13 +0000)] 
This cast is no longer needed.

5 years agocommon: Remove some now unused timing definitions
Roy Marples [Sat, 4 Jan 2020 07:36:35 +0000 (07:36 +0000)] 
common: Remove some now unused timing definitions

5 years agodhcpcd: Use milliseconds rather than timespec for delays
Roy Marples [Sat, 4 Jan 2020 07:32:34 +0000 (07:32 +0000)] 
dhcpcd: Use milliseconds rather than timespec for delays

5 years agocommon: Remove now unused timespec macros
Roy Marples [Sat, 4 Jan 2020 07:28:35 +0000 (07:28 +0000)] 
common: Remove now unused timespec macros

5 years agoinet6: Use milliseconds rather than timespec for calculating delays
Roy Marples [Sat, 4 Jan 2020 07:26:04 +0000 (07:26 +0000)] 
inet6: Use milliseconds rather than timespec for calculating delays

5 years agoinet6: Use milliseconds rather than timespec for calcuating delays
Roy Marples [Sat, 4 Jan 2020 07:20:50 +0000 (07:20 +0000)] 
inet6: Use milliseconds rather than timespec for calcuating delays

5 years agoARP: Use milliseconds rather than timespec for retransmission
Roy Marples [Sat, 4 Jan 2020 07:14:47 +0000 (07:14 +0000)] 
ARP: Use milliseconds rather than timespec for retransmission

5 years agoDHCP: Use milliseconds rather than timespec for retranmission
Roy Marples [Sat, 4 Jan 2020 06:54:23 +0000 (06:54 +0000)] 
DHCP: Use milliseconds rather than timespec for retranmission

5 years agoeloop: fix some warnings
Roy Marples [Tue, 7 Jan 2020 22:49:34 +0000 (22:49 +0000)] 
eloop: fix some warnings

5 years agocommon: We don't use timespeccmp anymore.
Roy Marples [Tue, 7 Jan 2020 22:38:40 +0000 (22:38 +0000)] 
common: We don't use timespeccmp anymore.

It's error prone when time wraps.

5 years agoinet6: Don't compare router dates when sorting
Roy Marples [Tue, 7 Jan 2020 22:36:56 +0000 (22:36 +0000)] 
inet6: Don't compare router dates when sorting

Newest routers are added at the end, so we prefer newest anyway.

5 years agoeloop: We no longer use timespec macros here
Roy Marples [Tue, 7 Jan 2020 22:31:17 +0000 (22:31 +0000)] 
eloop: We no longer use timespec macros here

5 years agoarp: use eloop_timespec_diff to handle wrapped times
Roy Marples [Tue, 7 Jan 2020 22:28:55 +0000 (22:28 +0000)] 
arp: use eloop_timespec_diff to handle wrapped times

5 years agocommon: Don't need timespecadd/sub anymore
Roy Marples [Tue, 7 Jan 2020 22:28:25 +0000 (22:28 +0000)] 
common: Don't need timespecadd/sub anymore

5 years agoDHCP6: Calulate ReTransmission using milliseconds
Roy Marples [Tue, 7 Jan 2020 22:15:09 +0000 (22:15 +0000)] 
DHCP6: Calulate ReTransmission using milliseconds

This is the exact formula in RFC8415 Section 15, the prior one
was not so exact.
This makes the code a lot simpler and removes the need for
complicated timespec handling.

5 years agoeloop: reduce timers rather than calculating expiry
Roy Marples [Tue, 7 Jan 2020 14:15:14 +0000 (14:15 +0000)] 
eloop: reduce timers rather than calculating expiry

This saves the need to store a created date per timer, we just need
to know when the timers were last changed which we can store in the
eloop.

This makes it easier to make the actual timeout for polling.

While here, add the eloop_timespec_diff function to workout the
elapsed time from usp to tsp even when time has wrapped on one or
both times.
This works if time wraps on the maximal size time_t allows AND
we know that tsp is always newer than usp.

5 years agoeloop: Allow for for timeouts greater than time_t and time wrapping
Roy Marples [Wed, 1 Jan 2020 11:18:49 +0000 (11:18 +0000)] 
eloop: Allow for for timeouts greater than time_t and time wrapping

On some systems time_t is int32_t.
However, on wire timeouts are generally uint32_t.
As such, we need to avoid using timespec internally except to
record when the timeout was created. Instead, record the timeout
as unsigned int seconds and long nanoseconds.

On long running systems using time_t as int32_t, monotonic time
would wrap after approximately 68 years. It's highly unlikely dhcpcd
would be running for so long, but just incase it does, the code
should now cope.

5 years agoWelcome to 2020!
Roy Marples [Fri, 3 Jan 2020 13:10:48 +0000 (13:10 +0000)] 
Welcome to 2020!

5 years agoinet: Open ARP for probing when not in privsep.
Roy Marples [Thu, 2 Jan 2020 16:07:58 +0000 (16:07 +0000)] 
inet: Open ARP for probing when not in privsep.

5 years agoinet: Allow forcing a host route from an interface without a lease
Roy Marples [Thu, 2 Jan 2020 11:14:13 +0000 (11:14 +0000)] 
inet: Allow forcing a host route from an interface without a lease

5 years agoinet6: Adjust prior so that we don't support old kernels
Roy Marples [Wed, 1 Jan 2020 22:52:43 +0000 (22:52 +0000)] 
inet6: Adjust prior so that we don't support old kernels

Mulitplying retrans could overflow on 32-bit kernels with
big timers, so just don't bother.

5 years agoMerge pull request #12 from andersk/ra-time-units
Roy Marples [Wed, 1 Jan 2020 22:35:56 +0000 (22:35 +0000)] 
Merge pull request #12 from andersk/ra-time-units

The RA times are provided in milliseconds, but commit
569051c8aa8fc297eb8edb7bd228e0fd353d30c1 (dhcpcd-8.1.3~18) “Linux:
prefer ms RA times” incorrectly scaled them by an extra factor of 1000
before writing them to retrans_time_ms and base_reachable_time_ms.
Instead, write the values in milliseconds directly to the *_ms files,
and correctly convert to jiffies or seconds for the other files if
necessary.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
5 years agoLinux: fix RA time unit confusion 12/head
Anders Kaseorg [Wed, 1 Jan 2020 19:42:47 +0000 (11:42 -0800)] 
Linux: fix RA time unit confusion

The RA times are provided in milliseconds, but commit
569051c8aa8fc297eb8edb7bd228e0fd353d30c1 (dhcpcd-8.1.3~18) “Linux:
prefer ms RA times” incorrectly scaled them by an extra factor of 1000
before writing them to retrans_time_ms and base_reachable_time_ms.
Instead, write the values in milliseconds directly to the *_ms files,
and correctly convert to jiffies or seconds for the other files if
necessary.

Fixes NixOS/nixpkgs#76710.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
5 years agooptions: Fix allocating the script option
Roy Marples [Fri, 20 Dec 2019 22:05:59 +0000 (22:05 +0000)] 
options: Fix allocating the script option

When passing PARSE_STRING_NULL we expect to store the string
NULL terminated. As such, allocate space for it an ensure we have
space for it.

5 years agoDHCP: Ensure we have a lease to extract options from.
Roy Marples [Thu, 19 Dec 2019 15:36:31 +0000 (15:36 +0000)] 
DHCP: Ensure we have a lease to extract options from.

5 years agoprivsep: Support the generic _dhcp entry on DragonFly
Roy Marples [Wed, 18 Dec 2019 14:37:01 +0000 (14:37 +0000)] 
privsep: Support the generic _dhcp entry on DragonFly

No need to create a specific _dhcpcd user in this instance.

5 years agoLinux: Move RTA_OK and RTA_NEXT from a while to a for loop.
Roy Marples [Wed, 18 Dec 2019 14:16:18 +0000 (14:16 +0000)] 
Linux: Move RTA_OK and RTA_NEXT from a while to a for loop.

5 years agoDHCP6: Remove now unused vars
Roy Marples [Tue, 17 Dec 2019 22:32:21 +0000 (22:32 +0000)] 
DHCP6: Remove now unused vars

5 years agoDHCP6: Add disabled code to allow packet replay
Roy Marples [Tue, 17 Dec 2019 22:23:56 +0000 (22:23 +0000)] 
DHCP6: Add disabled code to allow packet replay

I get bored of adding similar code from time to time just to
aid debugging, so let's just add it in.

Someone else might find it useful too.

5 years agoDHCP6: Rework delegation deprecation
Roy Marples [Tue, 17 Dec 2019 22:16:26 +0000 (22:16 +0000)] 
DHCP6: Rework delegation deprecation

Split ipv6_addaddrs out so ipv6_doaddr can operate on a single address.
Call this when deprecating delegated addresses to avoid calling
ipv6_addaddrs.

This allows a more simple ipv6_addaddrs that doesn't need to test
which address collection we are deleting from and removes DHCPv6
specific code from the generic IPv6 module.

5 years agoCorrect URL in prior
Roy Marples [Tue, 17 Dec 2019 15:57:18 +0000 (15:57 +0000)] 
Correct URL in prior

5 years agoNote some compilation issues and how to solve them.
Roy Marples [Tue, 17 Dec 2019 15:48:37 +0000 (15:48 +0000)] 
Note some compilation issues and how to solve them.

5 years agoLinux: work around alignment isses with clang
Roy Marples [Tue, 17 Dec 2019 15:29:53 +0000 (15:29 +0000)] 
Linux: work around alignment isses with clang

5 years agoLinux: remove some casts no longer needed
Roy Marples [Tue, 17 Dec 2019 12:26:11 +0000 (12:26 +0000)] 
Linux: remove some casts no longer needed

5 years agoDHCP6: Fix deprecating a delegated prefix
Roy Marples [Mon, 16 Dec 2019 16:56:17 +0000 (16:56 +0000)] 
DHCP6: Fix deprecating a delegated prefix

Be sure to remove the address using the right TAILQ member.
While here, simplify the initialisation of pd_pfxs.

5 years agooptions: Suboption 3 of NTP Server is a FQDN
Roy Marples [Mon, 16 Dec 2019 12:32:43 +0000 (12:32 +0000)] 
options: Suboption 3 of NTP Server is a FQDN

As such it should be domain and not ip6address.

5 years agoDHCP: Don't warn about expiry of deprecated addresses
Roy Marples [Thu, 12 Dec 2019 14:06:20 +0000 (14:06 +0000)] 
DHCP: Don't warn about expiry of deprecated addresses

5 years agocompat: Add a guard to _strtoi.h
Roy Marples [Wed, 11 Dec 2019 16:09:18 +0000 (16:09 +0000)] 
compat: Add a guard to _strtoi.h

Not really needed but LGTM wants it which blows.
Should really take this upstream.....

5 years agoRefix assertation....
Roy Marples [Wed, 11 Dec 2019 12:36:14 +0000 (12:36 +0000)] 
Refix assertation....

5 years agoIPv6ND: Fix reachable test
Roy Marples [Tue, 10 Dec 2019 21:44:24 +0000 (21:44 +0000)] 
IPv6ND: Fix reachable test

5 years agoprivsep: Don't close not open fd's
Roy Marples [Tue, 10 Dec 2019 21:35:49 +0000 (21:35 +0000)] 
privsep: Don't close not open fd's

5 years agoprivsep: prefer IN_PRIVSEP macros
Roy Marples [Tue, 10 Dec 2019 21:26:40 +0000 (21:26 +0000)] 
privsep: prefer IN_PRIVSEP macros

5 years agoprivsep: Enable ARP BPF filtering for interesting addresses
Roy Marples [Tue, 10 Dec 2019 21:00:58 +0000 (21:00 +0000)] 
privsep: Enable ARP BPF filtering for interesting addresses

This brings parity with non privsep features.
Aside from the lack of Solaris support, but that's another day.

5 years agoscript: Document why this block is intentionally blank.
Roy Marples [Sat, 7 Dec 2019 21:29:40 +0000 (21:29 +0000)] 
script: Document why this block is intentionally blank.

5 years agoDHCP: dl is always >0 at this point, so remove check.
Roy Marples [Sat, 7 Dec 2019 17:06:18 +0000 (17:06 +0000)] 
DHCP: dl is always >0 at this point, so remove check.

Found by the LGTM bot.

5 years agoprivsep: Fix an assertation
Roy Marples [Sat, 7 Dec 2019 14:11:30 +0000 (14:11 +0000)] 
privsep: Fix an assertation

Found by LGTM bot.

5 years agoprivsep: Allow priviledge separation user to be specified by configure
Roy Marples [Mon, 2 Dec 2019 00:43:07 +0000 (00:43 +0000)] 
privsep: Allow priviledge separation user to be specified by configure

5 years agoprivsep: Enable privsep by default
Roy Marples [Sun, 1 Dec 2019 22:09:18 +0000 (22:09 +0000)] 
privsep: Enable privsep by default

Except on Solaris where it's not expected to work.

5 years agoprivsep: Always check the unpriv user exists
Roy Marples [Sun, 1 Dec 2019 21:56:08 +0000 (21:56 +0000)] 
privsep: Always check the unpriv user exists

So that every process fails and we can fall back to non privsep mode.

5 years agoprivsep: Dont exit the eloop on signal in the launcher process
Roy Marples [Sun, 1 Dec 2019 21:54:48 +0000 (21:54 +0000)] 
privsep: Dont exit the eloop on signal in the launcher process

The state engine will receive the signal and write back to the
fork_fd socket.

5 years agodhcpcd: log forked to background earlier
Roy Marples [Sun, 1 Dec 2019 08:57:07 +0000 (08:57 +0000)] 
dhcpcd: log forked to background earlier

5 years agodhcpcd: Only report SSID when we have a carrier
Roy Marples [Fri, 29 Nov 2019 23:53:11 +0000 (23:53 +0000)] 
dhcpcd: Only report SSID when we have a carrier