Bug 257330

Summary: net-mgmt/lldpd: Fails to run in some configurations: CRIT/privsep] unable to create chroot directory: Operation not permitted
Product: Ports & Packages Reporter: Volodymyr Kostyrko <arcade>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Open ---    
Severity: Affects Some People CC: freebsd
Priority: --- Keywords: needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (freebsd)
koobs: merge-quarterly?
Hardware: Any   
OS: Any   

Description Volodymyr Kostyrko 2021-07-22 10:59:47 UTC
Hello.

On some configurations lldpd attempts to create files in chroot. As on BSDs /var/empty is locked for modifications this is not allowed, so I get:

2021-07-22T13:24:21 [CRIT/privsep] unable to create chroot directory: Operation not permitted

The /var/empty exists and is not writable. Using /var/run/lldpd as a chroot works.

Thanks in advance.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-29 02:20:05 UTC
@Reporter 

  - Does the port fail to run in the/with the default configuration?
  - What is the minimum configuration required to reproduce the issue?
Comment 2 Volodymyr Kostyrko 2021-07-29 09:28:20 UTC
Well, there are some good questions...

I have two installations on two distinct hosts. And the first works perfectly fine:

FreeBSD limbo.b1t.name 12.2-STABLE FreeBSD 12.2-STABLE r370131 MIN  amd64

Interfaces:
if_bridge
if_ste
if_re (driver from ports
if_em

The second doesn't:

DragonFly probe2 6.1-DEVELOPMENT DragonFly v6.1.0.385.g101bb-DEVELOPMENT #5: Wed Jul 28 23:16:28 EEST 2021     arcade@probe2:/usr/obj/usr/src/sys/DMIN  x86_64

Interfaces:
ath0: AR9220

In both cases default configuration was used, works on first host after install+onestart, doesn't work on second one in same way. All defaults.

This might be triggered with something about WiFi or something about DragonFly. I'll try to install FreeBSD on the same host and recheck.

I created a ticket just because:
1. Change originated from FreeBSD ports, not DPorts.
2. It looks illogical to use /var/empty for chroot, as you can't even get /dev in there.

But yeah, it's a fair question, I'll try to retest on FreeBSD.