>Synopsis:      getcap(1) won't display capabilities from a 
>/etc/login.conf.d/${class} as expected
>Category:      system amd64
>Environment:
        System      : OpenBSD 7.6
        Details     : OpenBSD 7.6 (GENERIC.MP) #0: Thu Jan  9 07:32:40 MST 2025

[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

        Architecture: OpenBSD.amd64
        Machine     : amd64
>Description:

Based on the getcap(1) manpage, this should work:

$ getcap -f /etc/login.conf.d/postgresql -s datasize postgresql

but it gives a lookup error:
getcap: unable to lookup postgresql

In order to work in this case, /etc/login.conf must be added *after*
the login.conf.d/${class} file, witch is not documented in the
manpage.

>How-To-Repeat:

$ getcap -f /etc/login.conf.d/postgresql -s datasize postgresql
getcap: unable to lookup postgresql

$ getcap -f /etc/login.conf:/etc/login.conf.d/postgresql -s datasize postgresql
getcap: unable to lookup postgresql

# this works!
$ getcap -f /etc/login.conf.d/postgresql:/etc/login.conf -s datasize postgresql
8192M

>Fix:

Document that the order of files given to the -f option matters.
Perhaps also provide an example, in the EXAMPLES section, of a
capability being read from a login.d.conf/${class} file.

Thanks,
--Kor

Reply via email to