Re: git: 21850106fdda - main - libtacplus: Allow additional AV pairs to be configured.

From: Ed Maste <emaste_at_freebsd.org>
Date: Tue, 20 Jun 2023 12:33:40 UTC
On Tue, 13 Jun 2023 at 14:16, Dag-Erling Smørgrav <des@freebsd.org> wrote:
>
> The branch main has been updated by des:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=21850106fdda5269bc881f0e62839dff3d9edf47
>
> commit 21850106fdda5269bc881f0e62839dff3d9edf47
> Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
> AuthorDate: 2023-06-13 16:04:22 +0000
> Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
> CommitDate: 2023-06-13 16:08:08 +0000
>
>     libtacplus: Allow additional AV pairs to be configured.
>
>     * Replace hand-rolled input tokenizer with openpam_readlinev() which supports line continuations and has better quoting and escaping.
>     * Simplify string handling by merging struct clnt_str and struct srvr_str into just struct tac_str.
>     * Each server entry in the configuration file can now have up to 255 AV pairs which will be appended to the ones returned by the server in response to a successful authorization request.
>
>     This allows nss_tacplus(8) to be used with servers which do not provide identity information beyond confirming the existence of the user.
>
>     This adds a dependency on libpam, however libtacplus is currently only used by pam_tacplus(8) (which is already always used with libpam) and the very recently added nss_tacplus(8) (which is extremely niche).  In the longer term it might be a good idea to split this out into a separate library.
>
>     MFC after:      1 week
>     Sponsored by:   Klara, Inc.
>     Reviewed by:    pauamma_gundo.com, markj
>     Differential Revision:  https://reviews.freebsd.org/D40285
>     Relnotes:       yes

Cirrus-CI build is failing on occasion, due to a race between libpam
and libtacplus -- e.g.:

--- libpam.so.6.full ---
building shared library libpam.so.6
/usr/local/bin/clang15 -target x86_64-unknown-freebsd14.0
--sysroot=/usr/obj/tmp/cirrus-ci-build/amd64.amd64/tmp -B/var/empty
-Wl,-zrelro --ld-path=/usr/local/bin/ld.lld15 -fstack-protector-strong
-shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-textrel -o
libpam.so.6.full -Wl,-soname,libpam.so.6 openpam_asprintf.pico
openpam_borrow_cred.pico openpam_check_owner_perms.pico
openpam_configure.pico openpam_constants.pico openpam_dispatch.pico
openpam_dynamic.pico openpam_features.pico openpam_findenv.pico
openpam_free_data.pico openpam_free_envlist.pico
openpam_get_feature.pico openpam_get_option.pico openpam_load.pico
openpam_log.pico openpam_nullconv.pico openpam_readline.pico
openpam_readlinev.pico openpam_readword.pico openpam_restore_cred.pico
openpam_set_feature.pico openpam_set_option.pico openpam_straddch.pico
openpam_strlcat.pico openpam_strlcpy.pico openpam_strlset.pico
openpam_subst.pico openpam_ttyconv.pico openpam_vasprintf.pico
pam_acct_mgmt.pico pam_authenticate.pico pam_chauthtok.pico
pam_close_session.pico pam_end.pico pam_error.pico
pam_get_authtok.pico pam_get_data.pico pam_get_item.pico
pam_get_user.pico pam_getenv.pico pam_getenvlist.pico pam_info.pico
pam_open_session.pico pam_prompt.pico pam_putenv.pico
pam_set_data.pico pam_set_item.pico pam_setcred.pico pam_setenv.pico
pam_start.pico pam_strerror.pico pam_verror.pico pam_vinfo.pico
pam_vprompt.pico
--- lib/libtacplus__L ---
ld.lld: error: unable to find library -lpam
clang-15: error: linker command failed with exit code 1 (use -v to see
invocation)