diff options
246 files changed, 10711 insertions, 13185 deletions
diff --git a/.github/workflows/cross-bootstrap-tools.yml b/.github/workflows/cross-bootstrap-tools.yml index 540e05cbd6e2..8f0dd933ef09 100644 --- a/.github/workflows/cross-bootstrap-tools.yml +++ b/.github/workflows/cross-bootstrap-tools.yml @@ -31,7 +31,7 @@ jobs: pkgs: bmake libarchive-dev clang-18 lld-18 - os: macos-latest compiler: clang-18 - cross-bindir: /opt/homebrew/opt/llvm@18/bin + cross-toolchain: llvm@18 pkgs: bmake libarchive llvm@18 - target_arch: amd64 target: amd64 @@ -55,6 +55,9 @@ jobs: if [ -n "${{ matrix.cross-bindir }}" ]; then echo "EXTRA_BUILD_ARGS=--cross-bindir=${{ matrix.cross-bindir }}" >> $GITHUB_ENV fi + if [ -n "${{ matrix.cross-toolchain }}" ]; then + echo "EXTRA_BUILD_ARGS=--cross-toolchain=${{ matrix.cross-toolchain }}" >> $GITHUB_ENV + fi mkdir -p ../build echo "MAKEOBJDIRPREFIX=${PWD%/*}/build" >> $GITHUB_ENV # heh, works on Linux/BSD/macOS ... diff --git a/Makefile.inc1 b/Makefile.inc1 index b66743e154eb..e6c9b49eefa3 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3588,16 +3588,6 @@ delete-old-files: .PHONY fi; \ done; \ done -# Remove catpages without corresponding manpages. - @exec 3<&0; \ - find ${DESTDIR}/usr/share/man/cat* ! -type d 2>/dev/null | sort | \ - sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \ - while read catpage; do \ - read manpage; \ - if [ ! -e "$${manpage}" ]; then \ - rm ${RM_I} $${catpage} <&3; \ - fi; \ - done # Remove compressed copies of uncompressed manpages .if ${MK_MANCOMPRESS} != "yes" @exec 3<&0; \ @@ -3640,15 +3630,6 @@ check-old-files: .PHONY fi; \ done; \ done -# Check for catpages without corresponding manpages. - @find ${DESTDIR}/usr/share/man/cat* ! -type d 2>/dev/null | \ - sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \ - while read catpage; do \ - read manpage; \ - if [ ! -e "$${manpage}" ]; then \ - echo $${catpage}; \ - fi; \ - done | sort # Check for compressed copies of uncompressed manpages .if ${MK_MANCOMPRESS} != "yes" @find ${DESTDIR}/usr/share/man ${DESTDIR}/usr/share/openssl/man ! -type d ! -name \*.gz 2>/dev/null | \ diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 0a4a7a073dcf..86a449c80a76 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -59,6 +59,10 @@ OLD_FILES+=lib/libopencsd.so.0 OLD_FILES+=usr/lib/libopencsd.a OLD_FILES+=usr/lib/libopencsd.so +# 20250801: Move compile_et to /usr/sbin +OLD_FILES+=usr/share/et/compile_et +OLD_DIRS+=usr/share/et + # 20250728: zfsboot (MBR) removed OLD_FILES+=boot/zfsboot OLD_FILES+=usr/share/man/man8/zfsboot.8.gz @@ -79,18 +83,6 @@ OLD_LIBS+=usr/lib/libkrb5.so.121 OLD_LIBS+=usr/lib/libkrb5profile.so.121 OLD_LIBS+=usr/lib/libkrb5support.so.121 OLD_LIBS+=usr/lib/libverto.so.121 -OLD_LIBS+=usr/lib/libcom_err.so.121 -OLD_LIBS+=usr/lib/libgssapi_krb5.so.121 -OLD_LIBS+=usr/lib/libgssrpc.so.121 -OLD_LIBS+=usr/lib/libk5crypto.so.121 -OLD_LIBS+=usr/lib/libkadm5clnt_mit.so.121 -OLD_LIBS+=usr/lib/libkadm5srv_mit.so.121 -OLD_LIBS+=usr/lib/libkdb5.so.121 -OLD_LIBS+=usr/lib/libkrad.so.121 -OLD_LIBS+=usr/lib/libkrb5.so.121 -OLD_LIBS+=usr/lib/libkrb5profile.so.121 -OLD_LIBS+=usr/lib/libkrb5support.so.121 -OLD_LIBS+=usr/lib/libverto.so.121 # 20250726: xargs tests rewritten OLD_FILES+=usr/tests/usr.bin/xargs/legacy_test @@ -211,7 +203,7 @@ OLD_FILES+=usr/sbin/keyserv OLD_FILES+=usr/bin/newkey OLD_FILES+=usr/share/man/man1/chkey.1.gz OLD_FILES+=usr/share/man/man1/keylogin.1.gz -OLD_FILES+=usr/share/man/man1/keylogin.1.gz +OLD_FILES+=usr/share/man/man1/keylogout.1.gz OLD_FILES+=usr/share/man/man5/publickey.5.gz OLD_FILES+=usr/share/man/man8/keyserv.1.gz OLD_FILES+=etc/rc.d/keyserv @@ -248,7 +240,6 @@ OLD_FILES+=usr/lib/libalias_skinny_p.a OLD_FILES+=usr/lib/libalias_smedia_p.a OLD_FILES+=usr/lib/libarchive_p.a OLD_FILES+=usr/lib/libasn1_p.a -OLD_FILES+=usr/lib/libauditd_p.a OLD_FILES+=usr/lib/libavl_p.a OLD_FILES+=usr/lib/libbe_p.a OLD_FILES+=usr/lib/libbegemot_p.a @@ -335,7 +326,6 @@ OLD_FILES+=usr/lib/libnss_tacplus_p.a OLD_FILES+=usr/lib/libnv_p.a OLD_FILES+=usr/lib/libnvpair_p.a OLD_FILES+=usr/lib/libopencsd_p.a -OLD_FILES+=usr/lib/libopie_p.a OLD_FILES+=usr/lib/libpanel_p.a OLD_FILES+=usr/lib/libpanelw_p.a OLD_FILES+=usr/lib/libpathconv_p.a @@ -348,7 +338,6 @@ OLD_FILES+=usr/lib/libprivateauditd_p.a OLD_FILES+=usr/lib/libprivatebsdstat_p.a OLD_FILES+=usr/lib/libprivatecbor_p.a OLD_FILES+=usr/lib/libprivatedevdctl_p.a -OLD_FILES+=usr/lib/libprivateevent_p.a OLD_FILES+=usr/lib/libprivateevent1_p.a OLD_FILES+=usr/lib/libprivatefido2_p.a OLD_FILES+=usr/lib/libprivategmock_main_p.a @@ -357,7 +346,6 @@ OLD_FILES+=usr/lib/libprivategtest_main_p.a OLD_FILES+=usr/lib/libprivategtest_p.a OLD_FILES+=usr/lib/libprivateheimipcc_p.a OLD_FILES+=usr/lib/libprivateheimipcs_p.a -OLD_FILES+=usr/lib/libprivateifconfig_p.a OLD_FILES+=usr/lib/libprivateldns_p.a OLD_FILES+=usr/lib/libprivatesqlite3_p.a OLD_FILES+=usr/lib/libprivatessh_p.a @@ -381,9 +369,7 @@ OLD_FILES+=usr/lib/libspl_p.a OLD_FILES+=usr/lib/libssl_p.a OLD_FILES+=usr/lib/libstats_p.a OLD_FILES+=usr/lib/libstdbuf_p.a -OLD_FILES+=usr/lib/libstdc++_p.a OLD_FILES+=usr/lib/libstdthreads_p.a -OLD_FILES+=usr/lib/libsupc++_p.a OLD_FILES+=usr/lib/libsysdecode_p.a OLD_FILES+=usr/lib/libtacplus_p.a OLD_FILES+=usr/lib/libtermcap_p.a @@ -11501,8300 +11487,5 @@ OLD_FILES+=usr/share/man/man4/nsp.4.gz OLD_FILES+=usr/share/man/man4/stg.4.gz # 20181021: mse(4) removal OLD_FILES+=usr/share/man/man4/mse.4.gz -# 20181015: Stale libcasper(3) files following r329452 -OLD_LIBS+=lib/casper/libcap_sysctl.so.0 -OLD_LIBS+=lib/casper/libcap_grp.so.0 -OLD_LIBS+=lib/casper/libcap_pwd.so.0 -OLD_LIBS+=lib/casper/libcap_random.so.0 -OLD_LIBS+=lib/casper/libcap_dns.so.0 -OLD_LIBS+=lib/casper/libcap_syslog.so.0 -# 20181012: rename of ixlv(4) to iavf(4) -OLD_FILES+=usr/share/man/man4/if_ixlv.4.gz -OLD_FILES+=usr/share/man/man4/ixlv.4.gz -# 20181009: OpenSSL 1.1.1 -OLD_FILES+=usr/include/openssl/des_old.h -OLD_FILES+=usr/include/openssl/dso.h -OLD_FILES+=usr/include/openssl/krb5_asn.h -OLD_FILES+=usr/include/openssl/kssl.h -OLD_FILES+=usr/include/openssl/pqueue.h -OLD_FILES+=usr/include/openssl/ssl23.h -OLD_FILES+=usr/include/openssl/ui_compat.h -OLD_FILES+=usr/share/openssl/man/man1/dss1.1.gz -OLD_FILES+=usr/share/openssl/man/man1/md2.1.gz -OLD_FILES+=usr/share/openssl/man/man1/md4.1.gz -OLD_FILES+=usr/share/openssl/man/man1/md5.1.gz -OLD_FILES+=usr/share/openssl/man/man1/mdc2.1.gz -OLD_FILES+=usr/share/openssl/man/man1/ripemd160.1.gz -OLD_FILES+=usr/share/openssl/man/man1/sha.1.gz -OLD_FILES+=usr/share/openssl/man/man1/sha1.1.gz -OLD_FILES+=usr/share/openssl/man/man1/sha224.1.gz -OLD_FILES+=usr/share/openssl/man/man1/sha256.1.gz -OLD_FILES+=usr/share/openssl/man/man1/sha384.1.gz -OLD_FILES+=usr/share/openssl/man/man1/sha512.1.gz -OLD_FILES+=usr/share/openssl/man/man1/x509v3_config.1.gz -OLD_FILES+=usr/share/openssl/man/man3/ASN1_STRING_length_set.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BIO_get_conn_int_port.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BIO_get_conn_ip.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BIO_set.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BIO_set_conn_int_port.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BIO_set_conn_ip.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BN_BLINDING_get_thread_id.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BN_BLINDING_set_thread_id.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BN_BLINDING_thread_id.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BN_CTX_init.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BN_MONT_CTX_init.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BN_RECP_CTX_init.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BN_init.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BUF_memdup.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BUF_memdup.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BUF_strdup.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BUF_strlcat.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BUF_strlcpy.3.gz -OLD_FILES+=usr/share/openssl/man/man3/BUF_strndup.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CMS_set1_signer_cert.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_cmp.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_cpy.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_current.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_get_callback.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_hash.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_set_callback.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_destroy_dynlockid.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_get_new_dynlockid.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_lock.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_num_locks.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_dynlock_create_callback.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_dynlock_destroy_callback.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_dynlock_lock_callback.3.gz -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_locking_callback.3.gz -OLD_FILES+=usr/share/openssl/man/man3/DES_ede3_cbcm_encrypt.3.gz -OLD_FILES+=usr/share/openssl/man/man3/DES_enc_read.3.gz -OLD_FILES+=usr/share/openssl/man/man3/DES_enc_write.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EC_KEY_get_key_method_data.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EC_KEY_insert_key_method_data.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EC_POINT_set_Jprojective_coordinates.3.gz -OLD_FILES+=usr/share/openssl/man/man3/ERR_load_UI_strings.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_CIPHER_CTX_cleanup.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_CIPHER_CTX_init.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_MAX_MD_SIZE.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_MD_CTX_cleanup.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_MD_CTX_create.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_MD_CTX_destroy.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_MD_CTX_init.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEVP_PKEY_CTX_set_app_data.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_CTX_set_rsa_rsa_keygen_bits.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_get_default_digest.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_dss.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_dss1.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_sha.3.gz -OLD_FILES+=usr/share/openssl/man/man3/HMAC_CTX_cleanup.3.gz -OLD_FILES+=usr/share/openssl/man/man3/HMAC_CTX_init.3.gz -OLD_FILES+=usr/share/openssl/man/man3/HMAC_cleanup.3.gz -OLD_FILES+=usr/share/openssl/man/man3/OPENSSL_ia32cap_loc.3.gz -OLD_FILES+=usr/share/openssl/man/man3/PEM.3.gz -OLD_FILES+=usr/share/openssl/man/man3/RAND_SSLeay.3.gz -OLD_FILES+=usr/share/openssl/man/man3/RSA_PKCS1_SSLeay.3.gz -OLD_FILES+=usr/share/openssl/man/man3/RSA_null_method.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_need_tmp_rsa.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_custom_cli_ext.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_default_read_ahead.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_tmp_rsa.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_tmp_rsa_callback.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_add_session.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_flush_sessions.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_get_accept_state.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_get_msg_callback_arg.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_need_tmp_rsa.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_remove_session.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_set_tmp_rsa.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_set_tmp_rsa_callback.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSLeay.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSLeay_add_ssl_algorithms.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSLeay_version.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSLv2_client_method.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSLv2_method.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSLv2_server_method.3.gz -OLD_FILES+=usr/share/openssl/man/man3/X509_STORE_CTX_set_chain.3.gz -OLD_FILES+=usr/share/openssl/man/man3/X509_STORE_CTX_trusted_stack.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bio.3.gz -OLD_FILES+=usr/share/openssl/man/man3/blowfish.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_add_words.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_check_top.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_cmp_words.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_div_words.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_dump.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_expand.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_expand2.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_fix_top.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_internal.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_mul_add_words.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_mul_comba4.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_mul_comba8.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_mul_high.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_mul_low_normal.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_mul_low_recursive.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_mul_normal.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_mul_part_recursive.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_mul_recursive.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_mul_words.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_print.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_set_high.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_set_low.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_set_max.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_sqr_comba4.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_sqr_comba8.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_sqr_normal.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_sqr_recursive.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_sqr_words.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_sub_words.3.gz -OLD_FILES+=usr/share/openssl/man/man3/bn_wexpand.3.gz -OLD_FILES+=usr/share/openssl/man/man3/buffer.3.gz -OLD_FILES+=usr/share/openssl/man/man3/crypto.3.gz -OLD_FILES+=usr/share/openssl/man/man3/d2i_ECPKParameters_bio.3.gz -OLD_FILES+=usr/share/openssl/man/man3/d2i_ECPKParameters_fp.3.gz -OLD_FILES+=usr/share/openssl/man/man3/d2i_ECPrivate_key.3.gz -OLD_FILES+=usr/share/openssl/man/man3/d2i_Netscape_RSA.3.gz -OLD_FILES+=usr/share/openssl/man/man3/d2i_PKCS8PrivateKey.3.gz -OLD_FILES+=usr/share/openssl/man/man3/d2i_Private_key.3.gz -OLD_FILES+=usr/share/openssl/man/man3/des.3.gz -OLD_FILES+=usr/share/openssl/man/man3/des_read_2passwords.3.gz -OLD_FILES+=usr/share/openssl/man/man3/des_read_password.3.gz -OLD_FILES+=usr/share/openssl/man/man3/des_read_pw.3.gz -OLD_FILES+=usr/share/openssl/man/man3/des_read_pw_string.3.gz -OLD_FILES+=usr/share/openssl/man/man3/dh.3.gz -OLD_FILES+=usr/share/openssl/man/man3/dsa.3.gz -OLD_FILES+=usr/share/openssl/man/man3/ec.3.gz -OLD_FILES+=usr/share/openssl/man/man3/ecdsa.3.gz -OLD_FILES+=usr/share/openssl/man/man3/engine.3.gz -OLD_FILES+=usr/share/openssl/man/man3/err.3.gz -OLD_FILES+=usr/share/openssl/man/man3/evp.3.gz -OLD_FILES+=usr/share/openssl/man/man3/hmac.3.gz -OLD_FILES+=usr/share/openssl/man/man3/i2d_ECPKParameters_bio.3.gz -OLD_FILES+=usr/share/openssl/man/man3/i2d_ECPKParameters_fp.3.gz -OLD_FILES+=usr/share/openssl/man/man3/i2d_Netscape_RSA.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_delete.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_doall.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_doall_arg.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_error.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_free.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_insert.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_new.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_node_stats.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_node_stats_bio.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_node_usage_stats.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_node_usage_stats_bio.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_retrieve.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_stats.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lh_stats_bio.3.gz -OLD_FILES+=usr/share/openssl/man/man3/lhash.3.gz -OLD_FILES+=usr/share/openssl/man/man3/md5.3.gz -OLD_FILES+=usr/share/openssl/man/man3/mdc2.3.gz -OLD_FILES+=usr/share/openssl/man/man3/pem.3.gz -OLD_FILES+=usr/share/openssl/man/man3/rand.3.gz -OLD_FILES+=usr/share/openssl/man/man3/rc4.3.gz -OLD_FILES+=usr/share/openssl/man/man3/ripemd.3.gz -OLD_FILES+=usr/share/openssl/man/man3/rsa.3.gz -OLD_FILES+=usr/share/openssl/man/man3/sha.3.gz -OLD_FILES+=usr/share/openssl/man/man3/ssl.3.gz -OLD_FILES+=usr/share/openssl/man/man3/threads.3.gz -OLD_FILES+=usr/share/openssl/man/man3/ui.3.gz -OLD_FILES+=usr/share/openssl/man/man3/ui_compat.3.gz -OLD_FILES+=usr/share/openssl/man/man3/x509.3.gz -OLD_LIBS+=lib/libcrypto.so.8 -OLD_LIBS+=usr/lib/engines/lib4758cca.so -OLD_LIBS+=usr/lib/engines/libaep.so -OLD_LIBS+=usr/lib/engines/libatalla.so -OLD_LIBS+=usr/lib/engines/libcapi.so -OLD_LIBS+=usr/lib/engines/libchil.so -OLD_LIBS+=usr/lib/engines/libcswift.so -OLD_LIBS+=usr/lib/engines/libgost.so -OLD_LIBS+=usr/lib/engines/libnuron.so -OLD_LIBS+=usr/lib/engines/libsureware.so -OLD_LIBS+=usr/lib/engines/libubsec.so -OLD_LIBS+=usr/lib/libssl.so.8 -OLD_LIBS+=usr/lib32/lib4758cca.so -OLD_LIBS+=usr/lib32/libaep.so -OLD_LIBS+=usr/lib32/libatalla.so -OLD_LIBS+=usr/lib32/libcapi.so -OLD_LIBS+=usr/lib32/libchil.so -OLD_LIBS+=usr/lib32/libcswift.so -OLD_LIBS+=usr/lib32/libgost.so -OLD_LIBS+=usr/lib32/libnuron.so -OLD_LIBS+=usr/lib32/libsureware.so -OLD_LIBS+=usr/lib32/libubsec.so -# 20180824: libbe(3) SHLIBDIR fixed to reflect correct location -MOVED_LIBS+=usr/lib/libbe.so.1 -# 20180819: Remove deprecated arc4random(3) stir/addrandom interfaces -OLD_FILES+=usr/share/man/man3/arc4random_addrandom.3.gz -OLD_FILES+=usr/share/man/man3/arc4random_stir.3.gz -# 20180819: send-pr(1) placeholder removal -OLD_FILES+=usr/bin/send-pr -# 20180801: jedec_ts(4) removed -OLD_FILES+=usr/share/man/man4/jedec_ts.4.gz -# 20180725: Cleanup old libcasper.so.0 -OLD_LIBS+=lib/libcasper.so.0 -# 20180722: indent(1) option renamed, test files follow -OLD_FILES+=usr/bin/indent/tests/nsac.0 -OLD_FILES+=usr/bin/indent/tests/nsac.0.pro -OLD_FILES+=usr/bin/indent/tests/nsac.0.stdout -OLD_FILES+=usr/bin/indent/tests/sac.0 -OLD_FILES+=usr/bin/indent/tests/sac.0.pro -OLD_FILES+=usr/bin/indent/tests/sac.0.stdout -# 20180721: move of libmlx5.so.1 and libibverbs.so.1 -MOVED_LIBS+=usr/lib/libmlx5.so.1 -MOVED_LIBS+=usr/lib/libibverbs.so.1 -# 20180720: zfsloader.8 merged into loader.8 -OLD_FILES+=usr/share/man/man8/zfsloader.8.gz -# 20180710: old numa cleanup -OLD_FILES+=usr/include/sys/numa.h -OLD_FILES+=usr/share/man/man2/numa_getaffinity.2.gz -OLD_FILES+=usr/share/man/man2/numa_setaffinity.2.gz -OLD_FILES+=usr/share/man/man1/numactl.1.gz -OLD_FILES+=usr/bin/numactl -# 20180630: new clang import which bumps version from 6.0.0 to 6.0.1 -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/allocator_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/asan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/common_interface_defs.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/coverage_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/dfsan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/esan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/hwasan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/linux_syscall_hooks.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/lsan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/msan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/scudo_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/tsan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/tsan_interface_atomic.h -OLD_DIRS+=usr/lib/clang/6.0.0/include/sanitizer -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_builtin_vars.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_cmath.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_complex_builtins.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_intrinsics.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_math_forward_declares.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_runtime_wrapper.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/6.0.0/include/adxintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/altivec.h -OLD_FILES+=usr/lib/clang/6.0.0/include/ammintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/arm64intr.h -OLD_FILES+=usr/lib/clang/6.0.0/include/arm_acle.h -OLD_FILES+=usr/lib/clang/6.0.0/include/arm_neon.h -OLD_FILES+=usr/lib/clang/6.0.0/include/armintr.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512bitalgintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512cdintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512dqintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512ifmaintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512ifmavlintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512pfintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmi2intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmiintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmivlintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlbitalgintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlcdintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vldqintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlvbmi2intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlvnniintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vnniintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vpopcntdqintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vpopcntdqvlintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avxintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/cetintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/clflushoptintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/clwbintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/clzerointrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/cpuid.h -OLD_FILES+=usr/lib/clang/6.0.0/include/emmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/fxsrintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/gfniintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/htmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/htmxlintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/immintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/lwpintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/6.0.0/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/6.0.0/include/mmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/module.modulemap -OLD_FILES+=usr/lib/clang/6.0.0/include/msa.h -OLD_FILES+=usr/lib/clang/6.0.0/include/mwaitxintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/opencl-c.h -OLD_FILES+=usr/lib/clang/6.0.0/include/pkuintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/s390intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/shaintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/smmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/vadefs.h -OLD_FILES+=usr/lib/clang/6.0.0/include/vaesintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/vecintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/vpclmulqdqintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/x86intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xopintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xsavecintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xsaveintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xsaveoptintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xsavesintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xtestintrin.h -OLD_DIRS+=usr/lib/clang/6.0.0/include -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-i386.so -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-x86_64.so -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-armhf.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.safestack-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats_client-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.tsan-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_minimal-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/6.0.0/lib/freebsd -OLD_DIRS+=usr/lib/clang/6.0.0/lib -OLD_DIRS+=usr/lib/clang/6.0.0 -# 20180615: asf(8) removed -OLD_FILES+=usr/sbin/asf -OLD_FILES+=usr/share/man/man8/asf.8.gz -# 20180609: obsolete libc++ files missed from the 5.0.0 import -OLD_FILES+=usr/include/c++/v1/__refstring -OLD_FILES+=usr/include/c++/v1/__undef_min_max -OLD_FILES+=usr/include/c++/v1/tr1/__refstring -OLD_FILES+=usr/include/c++/v1/tr1/__undef_min_max -# 20180607: remove nls support from grep -OLD_FILES+=usr/share/nls/pt_BR.ISO8859-1/grep.cat -OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/grep.cat -OLD_FILES+=usr/share/nls/ja_JP.SJIS/grep.cat -OLD_FILES+=usr/share/nls/ja_JP.eucJP/grep.cat -OLD_FILES+=usr/share/nls/gl_ES.ISO8859-1/grep.cat -OLD_FILES+=usr/share/nls/zh_CN.UTF-8/grep.cat -OLD_FILES+=usr/share/nls/es_ES.ISO8859-1/grep.cat -OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/grep.cat -OLD_FILES+=usr/share/nls/uk_UA.UTF-8/grep.cat -OLD_FILES+=usr/share/nls/ja_JP.UTF-8/grep.cat -# 20180528: libpcap update removed header file -OLD_FILES+=usr/include/pcap/export-defs.h -# 20180517: retire vxge -OLD_FILES+=usr/share/man/man4/if_vxge.4.gz -OLD_FILES+=usr/share/man/man4/vxge.4.gz -# 20180512: Rename Unbound tools -OLD_FILES+=usr/sbin/unbound -OLD_FILES+=usr/sbin/unbound-anchor -OLD_FILES+=usr/sbin/unbound-checkconf -OLD_FILES+=usr/sbin/unbound-control -OLD_FILES+=usr/share/man/man5/unbound.conf.5.gz -OLD_FILES+=usr/share/man/man8/unbound-anchor.8.gz -OLD_FILES+=usr/share/man/man8/unbound-checkconf.8.gz -OLD_FILES+=usr/share/man/man8/unbound-control.8.gz -OLD_FILES+=usr/share/man/man8/unbound.8.gz -# 20180508: retire nxge -OLD_FILES+=usr/share/man/man4/if_nxge.4.gz -OLD_FILES+=usr/share/man/man4/nxge.4.gz -# 20180505: rhosts -OLD_FILES+=usr/share/skel/dot.rhosts -# 20180502: retire ixgb -OLD_FILES+=usr/share/man/man4/if_ixgb.4.gz -OLD_FILES+=usr/share/man/man4/ixgb.4.gz -# 20180501: retire lmc -OLD_FILES+=usr/include/dev/lmc/if_lmc.h -OLD_DIRS+=usr/include/dev/lmc -OLD_FILES+=usr/sbin/lmcconfig -OLD_FILES+=usr/share/man/man4/lmc.4.gz -OLD_FILES+=usr/share/man/man4/if_lmc.4.gz -OLD_FILES+=usr/share/man/man8/lmcconfig.8.gz -# 20180417: remove fuswintr and suswintr -OLD_FILES+=usr/share/man/man9/fuswintr.9.gz -OLD_FILES+=usr/share/man/man9/suswintr.9.gz -# 20180413: remove Arcnet support -OLD_FILES+=usr/include/net/if_arc.h -OLD_FILES+=usr/share/man/man4/cm.4.gz -# 20180409: remove FDDI support -OLD_FILES+=usr/include/net/fddi.h -OLD_FILES+=usr/share/man/man4/fpa.4.gz -# 20180319: remove /boot/overlays, replaced by /boot/dtb/overlays -OLD_DIRS+=boot/overlays -# 20180311: remove sys/sys/i386/include/pcaudioio.h -.if ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/include/machine/pcaudioio.h -.endif -# 20180310: remove sys/sys/dataacq.h -OLD_FILES+=usr/include/sys/dataacq.h -# 20180306: remove DTrace scripts made obsolete by dwatch(1) -OLD_FILES+=usr/share/dtrace/watch_execve -OLD_FILES+=usr/share/dtrace/watch_kill -OLD_FILES+=usr/share/dtrace/watch_vop_remove -# 20180212: move devmatch -OLD_FILES+=usr/sbin/devmatch -# 20180211: remove usb.conf -OLD_FILES+=etc/devd/usb.conf -# 20180208: remove c_rehash(1) -OLD_FILES+=usr/share/openssl/man/man1/c_rehash.1.gz -# 20180206: remove gdbtui -OLD_FILES+=usr/bin/gdbtui -# 20180201: Obsolete forth files -OLD_FILES+=boot/pcibios.4th -# 20180114: new clang import which bumps version from 5.0.1 to 6.0.0 -OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/allocator_interface.h -OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/asan_interface.h -OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/common_interface_defs.h -OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/coverage_interface.h -OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/dfsan_interface.h -OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/esan_interface.h -OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/linux_syscall_hooks.h -OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/lsan_interface.h -OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/msan_interface.h -OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/tsan_interface.h -OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/tsan_interface_atomic.h -OLD_DIRS+=usr/lib/clang/5.0.1/include/sanitizer -OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_builtin_vars.h -OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_cmath.h -OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_complex_builtins.h -OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_intrinsics.h -OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_math_forward_declares.h -OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_runtime_wrapper.h -OLD_FILES+=usr/lib/clang/5.0.1/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/5.0.1/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/5.0.1/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/5.0.1/include/adxintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/altivec.h -OLD_FILES+=usr/lib/clang/5.0.1/include/ammintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/arm_acle.h -OLD_FILES+=usr/lib/clang/5.0.1/include/arm_neon.h -OLD_FILES+=usr/lib/clang/5.0.1/include/armintr.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512cdintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512dqintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512ifmaintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512ifmavlintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512pfintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vbmiintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vbmivlintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vlcdintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vldqintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vpopcntdqintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/avxintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/clflushoptintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/clzerointrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/cpuid.h -OLD_FILES+=usr/lib/clang/5.0.1/include/emmintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/fxsrintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/htmintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/htmxlintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/immintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/lwpintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/5.0.1/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/5.0.1/include/mmintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/module.modulemap -OLD_FILES+=usr/lib/clang/5.0.1/include/msa.h -OLD_FILES+=usr/lib/clang/5.0.1/include/mwaitxintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/opencl-c.h -OLD_FILES+=usr/lib/clang/5.0.1/include/pkuintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/s390intrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/shaintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/smmintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/vadefs.h -OLD_FILES+=usr/lib/clang/5.0.1/include/vecintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/x86intrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/xopintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/xsavecintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/xsaveintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/xsaveoptintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/xsavesintrin.h -OLD_FILES+=usr/lib/clang/5.0.1/include/xtestintrin.h -OLD_DIRS+=usr/lib/clang/5.0.1/include -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-i386.so -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-preinit-i386.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-x86_64.so -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.profile-armhf.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.safestack-i386.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.safestack-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.stats-i386.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.stats-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.stats_client-i386.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.stats_client-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.ubsan_standalone-i386.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a -OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/5.0.1/lib/freebsd -OLD_DIRS+=usr/lib/clang/5.0.1/lib -OLD_DIRS+=usr/lib/clang/5.0.1 -# 20180109: Remove vestiges of digi(4) driver -OLD_FILES+=usr/include/sys/digiio.h -OLD_FILES+=usr/sbin/digictl -OLD_FILES+=usr/share/man/man8/digictl.8.gz -# 20180107: Convert remaining geli(8) tests to ATF -OLD_FILES+=tests/sys/geom/class/eli/nokey_test.sh -OLD_FILES+=tests/sys/geom/class/eli/readonly_test.sh -# 20180106: Convert most geli(8) tests to ATF -OLD_FILES+=tests/sys/geom/class/eli/attach_d_test.sh -OLD_FILES+=tests/sys/geom/class/eli/configure_b_B_test.sh -OLD_FILES+=tests/sys/geom/class/eli/detach_l_test.sh -OLD_FILES+=tests/sys/geom/class/eli/init_B_test.sh -OLD_FILES+=tests/sys/geom/class/eli/init_J_test.sh -OLD_FILES+=tests/sys/geom/class/eli/init_a_test.sh -OLD_FILES+=tests/sys/geom/class/eli/init_alias_test.sh -OLD_FILES+=tests/sys/geom/class/eli/init_i_P_test.sh -OLD_FILES+=tests/sys/geom/class/eli/integrity_copy_test.sh -OLD_FILES+=tests/sys/geom/class/eli/integrity_data_test.sh -OLD_FILES+=tests/sys/geom/class/eli/integrity_hmac_test.sh -OLD_FILES+=tests/sys/geom/class/eli/onetime_a_test.sh -OLD_FILES+=tests/sys/geom/class/eli/onetime_d_test.sh -# 20171230: Remove /etc/skel from mtree -OLD_DIRS+=etc/skel -# 20171208: Remove basename_r(3) -OLD_FILES+=usr/share/man/man3/basename_r.3.gz -# 20171206: Remove sponge(1) -OLD_FILES+=usr/bin/sponge -OLD_FILES+=usr/share/man/man1/sponge.1.gz -# 20171204: Move fdformat man page from volume 1 to volume 8 -OLD_FILES+=usr/share/man/man1/fdformat.1.gz -# 20171203: libproc version bump -OLD_LIBS+=usr/lib/libproc.so.4 -# 20171203: new clang import which bumps version from 5.0.0 to 5.0.1 -OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/allocator_interface.h -OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/asan_interface.h -OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/common_interface_defs.h -OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/coverage_interface.h -OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/dfsan_interface.h -OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/esan_interface.h -OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/linux_syscall_hooks.h -OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/lsan_interface.h -OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/msan_interface.h -OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/tsan_interface.h -OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/tsan_interface_atomic.h -OLD_DIRS+=usr/lib/clang/5.0.0/include/sanitizer -OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_builtin_vars.h -OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_cmath.h -OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_complex_builtins.h -OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_intrinsics.h -OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_math_forward_declares.h -OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_runtime_wrapper.h -OLD_FILES+=usr/lib/clang/5.0.0/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/5.0.0/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/5.0.0/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/5.0.0/include/adxintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/altivec.h -OLD_FILES+=usr/lib/clang/5.0.0/include/ammintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/arm_acle.h -OLD_FILES+=usr/lib/clang/5.0.0/include/arm_neon.h -OLD_FILES+=usr/lib/clang/5.0.0/include/armintr.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512cdintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512dqintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512ifmaintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512ifmavlintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512pfintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vbmiintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vbmivlintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlcdintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vldqintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vpopcntdqintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/avxintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/clflushoptintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/clzerointrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/cpuid.h -OLD_FILES+=usr/lib/clang/5.0.0/include/emmintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/fxsrintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/htmintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/htmxlintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/immintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/lwpintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/5.0.0/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/5.0.0/include/mmintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/module.modulemap -OLD_FILES+=usr/lib/clang/5.0.0/include/msa.h -OLD_FILES+=usr/lib/clang/5.0.0/include/mwaitxintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/opencl-c.h -OLD_FILES+=usr/lib/clang/5.0.0/include/pkuintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/s390intrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/shaintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/smmintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/vadefs.h -OLD_FILES+=usr/lib/clang/5.0.0/include/vecintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/x86intrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/xopintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/xsavecintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/xsaveintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/xsaveoptintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/xsavesintrin.h -OLD_FILES+=usr/lib/clang/5.0.0/include/xtestintrin.h -OLD_DIRS+=usr/lib/clang/5.0.0/include -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-i386.so -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-x86_64.so -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-armhf.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-i386.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-i386.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-i386.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/5.0.0/lib/freebsd -OLD_DIRS+=usr/lib/clang/5.0.0/lib -OLD_DIRS+=usr/lib/clang/5.0.0 -# 20171118: Remove old etc casper files -OLD_FILES+=etc/casper/system.dns -OLD_FILES+=etc/casper/system.grp -OLD_FILES+=etc/casper/system.pwd -OLD_FILES+=etc/casper/system.random -OLD_FILES+=etc/casper/system.sysctl -OLD_DIRS+=etc/casper -# 20171116: lint(1) removal -OLD_FILES+=usr/bin/lint -OLD_FILES+=usr/libexec/lint1 -OLD_FILES+=usr/libexec/lint2 -OLD_FILES+=usr/libdata/lint/llib-lposix.ln -OLD_FILES+=usr/libdata/lint/llib-lstdc.ln -OLD_FILES+=usr/share/man/man1/lint.1.gz -OLD_FILES+=usr/share/man/man7/lint.7.gz -OLD_DIRS+=usr/libdata/lint -# 20171114: Removal of all fortune datfiles other than freebsd-tips -OLD_FILES+=usr/share/games/fortune/fortunes -OLD_FILES+=usr/share/games/fortune/fortunes.dat -OLD_FILES+=usr/share/games/fortune/gerrold.limerick -OLD_FILES+=usr/share/games/fortune/gerrold.limerick.dat -OLD_FILES+=usr/share/games/fortune/limerick -OLD_FILES+=usr/share/games/fortune/limerick.dat -OLD_FILES+=usr/share/games/fortune/murphy -OLD_FILES+=usr/share/games/fortune/murphy-o -OLD_FILES+=usr/share/games/fortune/murphy-o.dat -OLD_FILES+=usr/share/games/fortune/murphy.dat -OLD_FILES+=usr/share/games/fortune/startrek -OLD_FILES+=usr/share/games/fortune/startrek.dat -OLD_FILES+=usr/share/games/fortune/zippy -OLD_FILES+=usr/share/games/fortune/zippy.dat -# 20171112: Removal of eqnchar definition -OLD_FILES+=usr/share/misc/eqnchar -# 20171110: Removal of mailaddr man page -OLD_FILES+=usr/share/man/man7/mailaddr.7.gz -# 20171108: Rename of NgSendMsgReply to NgSendReplyMsg -OLD_FILES+=usr/share/man/man3/NgSendMsgReply.3.gz -# 20171108: badsect(8) removal -OLD_FILES+=sbin/badsect -OLD_FILES+=rescue/badsect -OLD_FILES+=usr/share/man/man8/badsect.8.gz -# 20171105: fixing lib/libclang_rt CRTARCH for arm:armv[67] -.if ${MACHINE_ARCH:Marmv[67]*} != "" && \ - (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-arm.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.a -OLD_LIBS+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.so -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-arm.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-arm.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-arm.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-arm.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-arm.a -OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a -.endif -# 20171104: libcap_random should be in /lib not in /usr/lib -OLD_LIBS+=usr/lib/libcap_random.so.0 -# 20171104: Casper can work only as shared library -OLD_FILES+=usr/lib/libcap_dns.a -OLD_FILES+=usr/lib/libcap_dns_p.a -OLD_FILES+=usr/lib/libcap_grp.a -OLD_FILES+=usr/lib/libcap_grp_p.a -OLD_FILES+=usr/lib/libcap_pwd.a -OLD_FILES+=usr/lib/libcap_pwd_p.a -OLD_FILES+=usr/lib/libcap_random.a -OLD_FILES+=usr/lib/libcap_random_p.a -OLD_FILES+=usr/lib/libcap_sysctl.a -OLD_FILES+=usr/lib/libcap_sysctl_p.a -OLD_FILES+=usr/lib/libcasper.a -OLD_FILES+=usr/lib/libcasper_p.a -# 20171031: Removal of adding_user man page -OLD_FILES+=usr/share/man/man7/adding_user.7.gz -# 20171031: Disconnected libpathconv tests -OLD_DIRS+=usr/tests/lib/libpathconv -# 20171017: Removal of mbpool(9) -OLD_FILES+=usr/include/sys/mbpool.h -OLD_FILES+=usr/share/man/man9/mbpool.9.gz -OLD_FILES+=usr/share/man/man9/mbp_destroy.9.gz -OLD_FILES+=usr/share/man/man9/mbp_alloc.9.gz -OLD_FILES+=usr/share/man/man9/mbp_ext_free.9.gz -OLD_FILES+=usr/share/man/man9/mbp_count.9.gz -OLD_FILES+=usr/share/man/man9/mbp_card_free.9.gz -OLD_FILES+=usr/share/man/man9/mbp_get_keep.9.gz -OLD_FILES+=usr/share/man/man9/mbp_free.9.gz -OLD_FILES+=usr/share/man/man9/mbp_get.9.gz -OLD_FILES+=usr/share/man/man9/mbp_create.9.gz -OLD_FILES+=usr/share/man/man9/mbp_sync.9.gz -# 20171010: Remove libstand -OLD_FILES+=usr/lib/libstand.a -OLD_FILES+=usr/lib/libstand_p.a -OLD_FILES+=usr/include/stand.h -OLD_FILES+=usr/share/man/man3/libstand.3.gz -# 20171003: remove RCMDS -OLD_FILES+=bin/rcp -OLD_FILES+=rescue/rcp -OLD_FILES+=usr/bin/rlogin -OLD_FILES+=usr/bin/rsh -OLD_FILES+=usr/libexec/rlogind -OLD_FILES+=usr/libexec/rshd -OLD_FILES+=usr/share/man/man1/rcp.1.gz -OLD_FILES+=usr/share/man/man1/rlogin.1.gz -OLD_FILES+=usr/share/man/man1/rsh.1.gz -OLD_FILES+=usr/share/man/man8/rlogind.8.gz -OLD_FILES+=usr/share/man/man8/rshd.8.gz -# 20170927: crshared -OLD_FILES+=usr/share/man/man9/crshared.9.gz -# 20170927: procctl -OLD_FILES+=usr/share/man/man8/procctl.8.gz -OLD_FILES+=usr/sbin/procctl -# 20170926: remove unneeded man aliases and locales directory -OLD_FILES+=usr/share/man/en.ISO8859-1/man1 -OLD_FILES+=usr/share/man/en.ISO8859-1/man2 -OLD_FILES+=usr/share/man/en.ISO8859-1/man3 -OLD_FILES+=usr/share/man/en.ISO8859-1/man4 -OLD_FILES+=usr/share/man/en.ISO8859-1/man5 -OLD_FILES+=usr/share/man/en.ISO8859-1/man6 -OLD_FILES+=usr/share/man/en.ISO8859-1/man7 -OLD_FILES+=usr/share/man/en.ISO8859-1/man8 -OLD_FILES+=usr/share/man/en.ISO8859-1/man9 -OLD_DIRS+=usr/share/man/en.ISO8859-1 -OLD_FILES+=usr/share/man/en.ISO8859-1/mandoc.db -OLD_FILES+=usr/share/man/en.UTF-8/man1 -OLD_FILES+=usr/share/man/en.UTF-8/man2 -OLD_FILES+=usr/share/man/en.UTF-8/man3 -OLD_FILES+=usr/share/man/en.UTF-8/man4 -OLD_FILES+=usr/share/man/en.UTF-8/man5 -OLD_FILES+=usr/share/man/en.UTF-8/man6 -OLD_FILES+=usr/share/man/en.UTF-8/man7 -OLD_FILES+=usr/share/man/en.UTF-8/man8 -OLD_FILES+=usr/share/man/en.UTF-8/man9 -OLD_FILES+=usr/share/man/en.UTF-8/mandoc.db -OLD_DIRS+=usr/share/man/en.UTF-8 -OLD_FILES+=usr/share/man/en.ISO8859-15 -OLD_FILES+=usr/share/openssl/man/en.ISO8859-1/man1 -OLD_FILES+=usr/share/openssl/man/en.ISO8859-1/man3 -OLD_FILES+=usr/share/openssl/man/en.ISO8859-1/mandoc.db -OLD_DIRS+=usr/share/openssl/man/en.ISO8859-1 -OLD_FILES+=usr/share/openssl/man/en.ISO8859-15 -OLD_DIRS+=usr/share/man/ja/man1 -OLD_DIRS+=usr/share/man/ja/man2 -OLD_DIRS+=usr/share/man/ja/man3 -OLD_DIRS+=usr/share/man/ja/man4 -OLD_DIRS+=usr/share/man/ja/man5 -OLD_DIRS+=usr/share/man/ja/man6 -OLD_DIRS+=usr/share/man/ja/man7 -OLD_DIRS+=usr/share/man/ja/man8 -OLD_DIRS+=usr/share/man/ja/man9 -OLD_DIRS+=usr/share/man/ja -# 20170913: remove unneeded catman utility -OLD_FILES+=etc/periodic/weekly/330.catman -OLD_FILES+=usr/bin/catman -OLD_FILES+=usr/libexec/catman.local -OLD_FILES+=usr/share/man/man1/catman.1.gz -OLD_FILES+=usr/share/man/man8/catman.local.8.gz -OLD_DIRS+=usr/share/man/cat1 -OLD_DIRS+=usr/share/man/cat2 -OLD_DIRS+=usr/share/man/cat3 -OLD_DIRS+=usr/share/man/cat4/amd64 -OLD_DIRS+=usr/share/man/cat4/arm -OLD_DIRS+=usr/share/man/cat4/i386 -OLD_DIRS+=usr/share/man/cat4/powerpc -OLD_DIRS+=usr/share/man/cat4/sparc64 -OLD_DIRS+=usr/share/man/cat4 -OLD_DIRS+=usr/share/man/cat5 -OLD_DIRS+=usr/share/man/cat6 -OLD_DIRS+=usr/share/man/cat7 -OLD_DIRS+=usr/share/man/cat8/amd64 -OLD_DIRS+=usr/share/man/cat8/arm -OLD_DIRS+=usr/share/man/cat8/i386 -OLD_DIRS+=usr/share/man/cat8/powerpc -OLD_DIRS+=usr/share/man/cat8/sparc64 -OLD_DIRS+=usr/share/man/cat8 -OLD_DIRS+=usr/share/man/cat9 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat1 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat2 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat3 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4/amd64 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4/arm -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4/i386 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4/powerpc -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4/sparc64 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat5 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat6 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat7 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8/amd64 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8/arm -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8/i386 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8/powerpc -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8/sparc64 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8 -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat9 -OLD_DIRS+=usr/share/man/en.UTF-8/cat1 -OLD_DIRS+=usr/share/man/en.UTF-8/cat2 -OLD_DIRS+=usr/share/man/en.UTF-8/cat3 -OLD_DIRS+=usr/share/man/en.UTF-8/cat4/amd64 -OLD_DIRS+=usr/share/man/en.UTF-8/cat4/arm -OLD_DIRS+=usr/share/man/en.UTF-8/cat4/i386 -OLD_DIRS+=usr/share/man/en.UTF-8/cat4/powerpc -OLD_DIRS+=usr/share/man/en.UTF-8/cat4/sparc64 -OLD_DIRS+=usr/share/man/en.UTF-8/cat4 -OLD_DIRS+=usr/share/man/en.UTF-8/cat5 -OLD_DIRS+=usr/share/man/en.UTF-8/cat6 -OLD_DIRS+=usr/share/man/en.UTF-8/cat7 -OLD_DIRS+=usr/share/man/en.UTF-8/cat8/amd64 -OLD_DIRS+=usr/share/man/en.UTF-8/cat8/arm -OLD_DIRS+=usr/share/man/en.UTF-8/cat8/i386 -OLD_DIRS+=usr/share/man/en.UTF-8/cat8/powerpc -OLD_DIRS+=usr/share/man/en.UTF-8/cat8/sparc64 -OLD_DIRS+=usr/share/man/en.UTF-8/cat8 -OLD_DIRS+=usr/share/man/en.UTF-8/cat9 -OLD_DIRS+=usr/share/man/ja/cat1 -OLD_DIRS+=usr/share/man/ja/cat2 -OLD_DIRS+=usr/share/man/ja/cat3 -OLD_DIRS+=usr/share/man/ja/cat4/amd64 -OLD_DIRS+=usr/share/man/ja/cat4/arm -OLD_DIRS+=usr/share/man/ja/cat4/i386 -OLD_DIRS+=usr/share/man/ja/cat4/powerpc -OLD_DIRS+=usr/share/man/ja/cat4/sparc64 -OLD_DIRS+=usr/share/man/ja/cat4 -OLD_DIRS+=usr/share/man/ja/cat5 -OLD_DIRS+=usr/share/man/ja/cat6 -OLD_DIRS+=usr/share/man/ja/cat7 -OLD_DIRS+=usr/share/man/ja/cat8/amd64 -OLD_DIRS+=usr/share/man/ja/cat8/arm -OLD_DIRS+=usr/share/man/ja/cat8/powerpc -OLD_DIRS+=usr/share/man/ja/cat8/sparc64 -OLD_DIRS+=usr/share/man/ja/cat8 -OLD_DIRS+=usr/share/man/ja/cat9 -OLD_DIRS+=usr/share/openssl/man/cat1 -OLD_DIRS+=usr/share/openssl/man/cat3 -OLD_DIRS+=usr/share/openssl/man/en.ISO8859-1/cat1 -OLD_DIRS+=usr/share/openssl/man/en.ISO8859-1/cat3 -# 20170830: rename ntb_hw(4) to ntb_hw_intel(4) -OLD_FILES+=usr/share/man/man4/ntb_hw.4.gz -# 20170802: ksyms(4) ioctl interface was removed -OLD_FILES+=usr/include/sys/ksyms.h -# 20170729: the iicbus/pcf8563 driver is replaced with iicbus/nxprtc -OLD_FILES+=usr/include/dev/iicbus/pcf8563reg.h -# 20170727: options FLOWTABLE removed -OLD_FILES+=usr/include/net/flowtable.h -# 20170722: new clang import which bumps version from 4.0.0 to 5.0.0 -OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/allocator_interface.h -OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/asan_interface.h -OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/common_interface_defs.h -OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/coverage_interface.h -OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/dfsan_interface.h -OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/esan_interface.h -OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/linux_syscall_hooks.h -OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/lsan_interface.h -OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/msan_interface.h -OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/tsan_interface_atomic.h -OLD_DIRS+=usr/lib/clang/4.0.0/include/sanitizer -OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_builtin_vars.h -OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_cmath.h -OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_complex_builtins.h -OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_intrinsics.h -OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_math_forward_declares.h -OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_runtime_wrapper.h -OLD_FILES+=usr/lib/clang/4.0.0/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/4.0.0/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/4.0.0/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/4.0.0/include/adxintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/altivec.h -OLD_FILES+=usr/lib/clang/4.0.0/include/ammintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/arm_acle.h -OLD_FILES+=usr/lib/clang/4.0.0/include/arm_neon.h -OLD_FILES+=usr/lib/clang/4.0.0/include/armintr.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512cdintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512dqintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512ifmaintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512ifmavlintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512pfintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vbmiintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vbmivlintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vlcdintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vldqintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/avxintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/clflushoptintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/cpuid.h -OLD_FILES+=usr/lib/clang/4.0.0/include/emmintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/fxsrintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/htmintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/htmxlintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/immintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/4.0.0/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/4.0.0/include/mmintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/module.modulemap -OLD_FILES+=usr/lib/clang/4.0.0/include/msa.h -OLD_FILES+=usr/lib/clang/4.0.0/include/mwaitxintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/opencl-c.h -OLD_FILES+=usr/lib/clang/4.0.0/include/pkuintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/s390intrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/shaintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/smmintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/vadefs.h -OLD_FILES+=usr/lib/clang/4.0.0/include/vecintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/x86intrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/xopintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/xsavecintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/xsaveintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/xsaveoptintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/xsavesintrin.h -OLD_FILES+=usr/lib/clang/4.0.0/include/xtestintrin.h -OLD_DIRS+=usr/lib/clang/4.0.0/include -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-i386.so -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-x86_64.so -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.safestack-i386.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.stats-i386.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.stats-x86_64.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.stats_client-i386.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a -OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/4.0.0/lib/freebsd -OLD_DIRS+=usr/lib/clang/4.0.0/lib -OLD_DIRS+=usr/lib/clang/4.0.0 -OLD_FILES+=usr/bin/llvm-pdbdump -# 20170717: Remove documentation of vaporware -OLD_FILES+=usr/share/man/man2/pdwait4.2.gz -# 20170610: chown-f_test replaced by chown_test -OLD_FILES+=usr/tests/usr.sbin/chown/chown-f_test -# 20170531: removal of groff -OLD_FILES+=usr/bin/addftinfo -OLD_FILES+=usr/bin/afmtodit -OLD_FILES+=usr/bin/checknr -OLD_FILES+=usr/bin/colcrt -OLD_FILES+=usr/bin/eqn -OLD_FILES+=usr/bin/grn -OLD_FILES+=usr/bin/grodvi -OLD_FILES+=usr/bin/groff -OLD_FILES+=usr/bin/grog -OLD_FILES+=usr/bin/grolbp -OLD_FILES+=usr/bin/grolj4 -OLD_FILES+=usr/bin/grops -OLD_FILES+=usr/bin/grotty -OLD_FILES+=usr/bin/hpftodit -OLD_FILES+=usr/bin/indxbib -OLD_FILES+=usr/bin/lkbib -OLD_FILES+=usr/bin/lookbib -OLD_FILES+=usr/bin/mmroff -OLD_FILES+=usr/bin/neqn -OLD_FILES+=usr/bin/nroff -OLD_FILES+=usr/bin/pfbtops -OLD_FILES+=usr/bin/pic -OLD_FILES+=usr/bin/post-grohtml -OLD_FILES+=usr/bin/pre-grohtml -OLD_FILES+=usr/bin/psroff -OLD_FILES+=usr/bin/refer -OLD_FILES+=usr/bin/tbl -OLD_FILES+=usr/bin/tfmtodit -OLD_FILES+=usr/bin/troff -OLD_FILES+=usr/bin/vgrind -OLD_FILES+=usr/libexec/vfontedpr -OLD_FILES+=usr/share/dict/eign -OLD_FILES+=usr/share/groff_font/devX100-12/CB -OLD_FILES+=usr/share/groff_font/devX100-12/CBI -OLD_FILES+=usr/share/groff_font/devX100-12/CI -OLD_FILES+=usr/share/groff_font/devX100-12/CR -OLD_FILES+=usr/share/groff_font/devX100-12/DESC -OLD_FILES+=usr/share/groff_font/devX100-12/HB -OLD_FILES+=usr/share/groff_font/devX100-12/HBI -OLD_FILES+=usr/share/groff_font/devX100-12/HI -OLD_FILES+=usr/share/groff_font/devX100-12/HR -OLD_FILES+=usr/share/groff_font/devX100-12/NB -OLD_FILES+=usr/share/groff_font/devX100-12/NBI -OLD_FILES+=usr/share/groff_font/devX100-12/NI -OLD_FILES+=usr/share/groff_font/devX100-12/NR -OLD_FILES+=usr/share/groff_font/devX100-12/S -OLD_FILES+=usr/share/groff_font/devX100-12/TB -OLD_FILES+=usr/share/groff_font/devX100-12/TBI -OLD_FILES+=usr/share/groff_font/devX100-12/TI -OLD_FILES+=usr/share/groff_font/devX100-12/TR -OLD_DIRS+=usr/share/groff_font/devX100-12 -OLD_FILES+=usr/share/groff_font/devX100/CB -OLD_FILES+=usr/share/groff_font/devX100/CBI -OLD_FILES+=usr/share/groff_font/devX100/CI -OLD_FILES+=usr/share/groff_font/devX100/CR -OLD_FILES+=usr/share/groff_font/devX100/DESC -OLD_FILES+=usr/share/groff_font/devX100/HB -OLD_FILES+=usr/share/groff_font/devX100/HBI -OLD_FILES+=usr/share/groff_font/devX100/HI -OLD_FILES+=usr/share/groff_font/devX100/HR -OLD_FILES+=usr/share/groff_font/devX100/NB -OLD_FILES+=usr/share/groff_font/devX100/NBI -OLD_FILES+=usr/share/groff_font/devX100/NI -OLD_FILES+=usr/share/groff_font/devX100/NR -OLD_FILES+=usr/share/groff_font/devX100/S -OLD_FILES+=usr/share/groff_font/devX100/TB -OLD_FILES+=usr/share/groff_font/devX100/TBI -OLD_FILES+=usr/share/groff_font/devX100/TI -OLD_FILES+=usr/share/groff_font/devX100/TR -OLD_DIRS+=usr/share/groff_font/devX100 -OLD_FILES+=usr/share/groff_font/devX75-12/CB -OLD_FILES+=usr/share/groff_font/devX75-12/CBI -OLD_FILES+=usr/share/groff_font/devX75-12/CI -OLD_FILES+=usr/share/groff_font/devX75-12/CR -OLD_FILES+=usr/share/groff_font/devX75-12/DESC -OLD_FILES+=usr/share/groff_font/devX75-12/HB -OLD_FILES+=usr/share/groff_font/devX75-12/HBI -OLD_FILES+=usr/share/groff_font/devX75-12/HI -OLD_FILES+=usr/share/groff_font/devX75-12/HR -OLD_FILES+=usr/share/groff_font/devX75-12/NB -OLD_FILES+=usr/share/groff_font/devX75-12/NBI -OLD_FILES+=usr/share/groff_font/devX75-12/NI -OLD_FILES+=usr/share/groff_font/devX75-12/NR -OLD_FILES+=usr/share/groff_font/devX75-12/S -OLD_FILES+=usr/share/groff_font/devX75-12/TB -OLD_FILES+=usr/share/groff_font/devX75-12/TBI -OLD_FILES+=usr/share/groff_font/devX75-12/TI -OLD_FILES+=usr/share/groff_font/devX75-12/TR -OLD_DIRS+=usr/share/groff_font/devX75-12 -OLD_FILES+=usr/share/groff_font/devX75/CB -OLD_FILES+=usr/share/groff_font/devX75/CBI -OLD_FILES+=usr/share/groff_font/devX75/CI -OLD_FILES+=usr/share/groff_font/devX75/CR -OLD_FILES+=usr/share/groff_font/devX75/DESC -OLD_FILES+=usr/share/groff_font/devX75/HB -OLD_FILES+=usr/share/groff_font/devX75/HBI -OLD_FILES+=usr/share/groff_font/devX75/HI -OLD_FILES+=usr/share/groff_font/devX75/HR -OLD_FILES+=usr/share/groff_font/devX75/NB -OLD_FILES+=usr/share/groff_font/devX75/NBI -OLD_FILES+=usr/share/groff_font/devX75/NI -OLD_FILES+=usr/share/groff_font/devX75/NR -OLD_FILES+=usr/share/groff_font/devX75/S -OLD_FILES+=usr/share/groff_font/devX75/TB -OLD_FILES+=usr/share/groff_font/devX75/TBI -OLD_FILES+=usr/share/groff_font/devX75/TI -OLD_FILES+=usr/share/groff_font/devX75/TR -OLD_DIRS+=usr/share/groff_font/devX75 -OLD_FILES+=usr/share/groff_font/devascii/B -OLD_FILES+=usr/share/groff_font/devascii/BI -OLD_FILES+=usr/share/groff_font/devascii/CW -OLD_FILES+=usr/share/groff_font/devascii/DESC -OLD_FILES+=usr/share/groff_font/devascii/I -OLD_FILES+=usr/share/groff_font/devascii/L -OLD_FILES+=usr/share/groff_font/devascii/R -OLD_FILES+=usr/share/groff_font/devascii/S -OLD_DIRS+=usr/share/groff_font/devascii -OLD_FILES+=usr/share/groff_font/devcp1047/B -OLD_FILES+=usr/share/groff_font/devcp1047/BI -OLD_FILES+=usr/share/groff_font/devcp1047/CW -OLD_FILES+=usr/share/groff_font/devcp1047/DESC -OLD_FILES+=usr/share/groff_font/devcp1047/I -OLD_FILES+=usr/share/groff_font/devcp1047/L -OLD_FILES+=usr/share/groff_font/devcp1047/R -OLD_FILES+=usr/share/groff_font/devcp1047/S -OLD_DIRS+=usr/share/groff_font/devcp1047 -OLD_FILES+=usr/share/groff_font/devdvi/CW -OLD_FILES+=usr/share/groff_font/devdvi/CWEC -OLD_FILES+=usr/share/groff_font/devdvi/CWI -OLD_FILES+=usr/share/groff_font/devdvi/CWIEC -OLD_FILES+=usr/share/groff_font/devdvi/CWITC -OLD_FILES+=usr/share/groff_font/devdvi/CWTC -OLD_FILES+=usr/share/groff_font/devdvi/CompileFonts -OLD_FILES+=usr/share/groff_font/devdvi/DESC -OLD_FILES+=usr/share/groff_font/devdvi/EX -OLD_FILES+=usr/share/groff_font/devdvi/HB -OLD_FILES+=usr/share/groff_font/devdvi/HBEC -OLD_FILES+=usr/share/groff_font/devdvi/HBI -OLD_FILES+=usr/share/groff_font/devdvi/HBIEC -OLD_FILES+=usr/share/groff_font/devdvi/HBITC -OLD_FILES+=usr/share/groff_font/devdvi/HBTC -OLD_FILES+=usr/share/groff_font/devdvi/HI -OLD_FILES+=usr/share/groff_font/devdvi/HIEC -OLD_FILES+=usr/share/groff_font/devdvi/HITC -OLD_FILES+=usr/share/groff_font/devdvi/HR -OLD_FILES+=usr/share/groff_font/devdvi/HREC -OLD_FILES+=usr/share/groff_font/devdvi/HRTC -OLD_FILES+=usr/share/groff_font/devdvi/MI -OLD_FILES+=usr/share/groff_font/devdvi/Makefile -OLD_FILES+=usr/share/groff_font/devdvi/S -OLD_FILES+=usr/share/groff_font/devdvi/SA -OLD_FILES+=usr/share/groff_font/devdvi/SB -OLD_FILES+=usr/share/groff_font/devdvi/SC -OLD_FILES+=usr/share/groff_font/devdvi/TB -OLD_FILES+=usr/share/groff_font/devdvi/TBEC -OLD_FILES+=usr/share/groff_font/devdvi/TBI -OLD_FILES+=usr/share/groff_font/devdvi/TBIEC -OLD_FILES+=usr/share/groff_font/devdvi/TBITC -OLD_FILES+=usr/share/groff_font/devdvi/TBTC -OLD_FILES+=usr/share/groff_font/devdvi/TI -OLD_FILES+=usr/share/groff_font/devdvi/TIEC -OLD_FILES+=usr/share/groff_font/devdvi/TITC -OLD_FILES+=usr/share/groff_font/devdvi/TR -OLD_FILES+=usr/share/groff_font/devdvi/TREC -OLD_FILES+=usr/share/groff_font/devdvi/TRTC -OLD_FILES+=usr/share/groff_font/devdvi/ec.map -OLD_FILES+=usr/share/groff_font/devdvi/msam.map -OLD_FILES+=usr/share/groff_font/devdvi/msbm.map -OLD_FILES+=usr/share/groff_font/devdvi/tc.map -OLD_FILES+=usr/share/groff_font/devdvi/texb.map -OLD_FILES+=usr/share/groff_font/devdvi/texex.map -OLD_FILES+=usr/share/groff_font/devdvi/texi.map -OLD_FILES+=usr/share/groff_font/devdvi/texmi.map -OLD_FILES+=usr/share/groff_font/devdvi/texr.map -OLD_FILES+=usr/share/groff_font/devdvi/texsy.map -OLD_FILES+=usr/share/groff_font/devdvi/textex.map -OLD_FILES+=usr/share/groff_font/devdvi/textt.map -OLD_DIRS+=usr/share/groff_font/devdvi -OLD_FILES+=usr/share/groff_font/devhtml/B -OLD_FILES+=usr/share/groff_font/devhtml/BI -OLD_FILES+=usr/share/groff_font/devhtml/CB -OLD_FILES+=usr/share/groff_font/devhtml/CBI -OLD_FILES+=usr/share/groff_font/devhtml/CI -OLD_FILES+=usr/share/groff_font/devhtml/CR -OLD_FILES+=usr/share/groff_font/devhtml/DESC -OLD_FILES+=usr/share/groff_font/devhtml/I -OLD_FILES+=usr/share/groff_font/devhtml/R -OLD_FILES+=usr/share/groff_font/devhtml/S -OLD_DIRS+=usr/share/groff_font/devhtml -OLD_FILES+=usr/share/groff_font/devkoi8-r/B -OLD_FILES+=usr/share/groff_font/devkoi8-r/BI -OLD_FILES+=usr/share/groff_font/devkoi8-r/CW -OLD_FILES+=usr/share/groff_font/devkoi8-r/DESC -OLD_FILES+=usr/share/groff_font/devkoi8-r/I -OLD_FILES+=usr/share/groff_font/devkoi8-r/L -OLD_FILES+=usr/share/groff_font/devkoi8-r/R -OLD_FILES+=usr/share/groff_font/devkoi8-r/S -OLD_DIRS+=usr/share/groff_font/devkoi8-r -OLD_FILES+=usr/share/groff_font/devlatin1/B -OLD_FILES+=usr/share/groff_font/devlatin1/BI -OLD_FILES+=usr/share/groff_font/devlatin1/CW -OLD_FILES+=usr/share/groff_font/devlatin1/DESC -OLD_FILES+=usr/share/groff_font/devlatin1/I -OLD_FILES+=usr/share/groff_font/devlatin1/L -OLD_FILES+=usr/share/groff_font/devlatin1/R -OLD_FILES+=usr/share/groff_font/devlatin1/S -OLD_DIRS+=usr/share/groff_font/devlatin1 -OLD_FILES+=usr/share/groff_font/devlbp/CB -OLD_FILES+=usr/share/groff_font/devlbp/CI -OLD_FILES+=usr/share/groff_font/devlbp/CR -OLD_FILES+=usr/share/groff_font/devlbp/DESC -OLD_FILES+=usr/share/groff_font/devlbp/EB -OLD_FILES+=usr/share/groff_font/devlbp/EI -OLD_FILES+=usr/share/groff_font/devlbp/ER -OLD_FILES+=usr/share/groff_font/devlbp/HB -OLD_FILES+=usr/share/groff_font/devlbp/HBI -OLD_FILES+=usr/share/groff_font/devlbp/HI -OLD_FILES+=usr/share/groff_font/devlbp/HNB -OLD_FILES+=usr/share/groff_font/devlbp/HNBI -OLD_FILES+=usr/share/groff_font/devlbp/HNI -OLD_FILES+=usr/share/groff_font/devlbp/HNR -OLD_FILES+=usr/share/groff_font/devlbp/HR -OLD_FILES+=usr/share/groff_font/devlbp/TB -OLD_FILES+=usr/share/groff_font/devlbp/TBI -OLD_FILES+=usr/share/groff_font/devlbp/TI -OLD_FILES+=usr/share/groff_font/devlbp/TR -OLD_DIRS+=usr/share/groff_font/devlbp -OLD_FILES+=usr/share/groff_font/devlj4/AB -OLD_FILES+=usr/share/groff_font/devlj4/ABI -OLD_FILES+=usr/share/groff_font/devlj4/AI -OLD_FILES+=usr/share/groff_font/devlj4/ALBB -OLD_FILES+=usr/share/groff_font/devlj4/ALBR -OLD_FILES+=usr/share/groff_font/devlj4/AOB -OLD_FILES+=usr/share/groff_font/devlj4/AOI -OLD_FILES+=usr/share/groff_font/devlj4/AOR -OLD_FILES+=usr/share/groff_font/devlj4/AR -OLD_FILES+=usr/share/groff_font/devlj4/CB -OLD_FILES+=usr/share/groff_font/devlj4/CBI -OLD_FILES+=usr/share/groff_font/devlj4/CI -OLD_FILES+=usr/share/groff_font/devlj4/CLARENDON -OLD_FILES+=usr/share/groff_font/devlj4/CORONET -OLD_FILES+=usr/share/groff_font/devlj4/CR -OLD_FILES+=usr/share/groff_font/devlj4/DESC -OLD_FILES+=usr/share/groff_font/devlj4/GB -OLD_FILES+=usr/share/groff_font/devlj4/GBI -OLD_FILES+=usr/share/groff_font/devlj4/GI -OLD_FILES+=usr/share/groff_font/devlj4/GR -OLD_FILES+=usr/share/groff_font/devlj4/LGB -OLD_FILES+=usr/share/groff_font/devlj4/LGI -OLD_FILES+=usr/share/groff_font/devlj4/LGR -OLD_FILES+=usr/share/groff_font/devlj4/MARIGOLD -OLD_FILES+=usr/share/groff_font/devlj4/OB -OLD_FILES+=usr/share/groff_font/devlj4/OBI -OLD_FILES+=usr/share/groff_font/devlj4/OI -OLD_FILES+=usr/share/groff_font/devlj4/OR -OLD_FILES+=usr/share/groff_font/devlj4/S -OLD_FILES+=usr/share/groff_font/devlj4/SYMBOL -OLD_FILES+=usr/share/groff_font/devlj4/TB -OLD_FILES+=usr/share/groff_font/devlj4/TBI -OLD_FILES+=usr/share/groff_font/devlj4/TI -OLD_FILES+=usr/share/groff_font/devlj4/TNRB -OLD_FILES+=usr/share/groff_font/devlj4/TNRBI -OLD_FILES+=usr/share/groff_font/devlj4/TNRI -OLD_FILES+=usr/share/groff_font/devlj4/TNRR -OLD_FILES+=usr/share/groff_font/devlj4/TR -OLD_FILES+=usr/share/groff_font/devlj4/UB -OLD_FILES+=usr/share/groff_font/devlj4/UBI -OLD_FILES+=usr/share/groff_font/devlj4/UCB -OLD_FILES+=usr/share/groff_font/devlj4/UCBI -OLD_FILES+=usr/share/groff_font/devlj4/UCI -OLD_FILES+=usr/share/groff_font/devlj4/UCR -OLD_FILES+=usr/share/groff_font/devlj4/UI -OLD_FILES+=usr/share/groff_font/devlj4/UR -OLD_FILES+=usr/share/groff_font/devlj4/WINGDINGS -OLD_DIRS+=usr/share/groff_font/devlj4 -OLD_FILES+=usr/share/groff_font/devps/AB -OLD_FILES+=usr/share/groff_font/devps/ABI -OLD_FILES+=usr/share/groff_font/devps/AI -OLD_FILES+=usr/share/groff_font/devps/AR -OLD_FILES+=usr/share/groff_font/devps/BMB -OLD_FILES+=usr/share/groff_font/devps/BMBI -OLD_FILES+=usr/share/groff_font/devps/BMI -OLD_FILES+=usr/share/groff_font/devps/BMR -OLD_FILES+=usr/share/groff_font/devps/CB -OLD_FILES+=usr/share/groff_font/devps/CBI -OLD_FILES+=usr/share/groff_font/devps/CI -OLD_FILES+=usr/share/groff_font/devps/CR -OLD_FILES+=usr/share/groff_font/devps/DESC -OLD_FILES+=usr/share/groff_font/devps/EURO -OLD_FILES+=usr/share/groff_font/devps/HB -OLD_FILES+=usr/share/groff_font/devps/HBI -OLD_FILES+=usr/share/groff_font/devps/HI -OLD_FILES+=usr/share/groff_font/devps/HNB -OLD_FILES+=usr/share/groff_font/devps/HNBI -OLD_FILES+=usr/share/groff_font/devps/HNI -OLD_FILES+=usr/share/groff_font/devps/HNR -OLD_FILES+=usr/share/groff_font/devps/HR -OLD_FILES+=usr/share/groff_font/devps/Makefile -OLD_FILES+=usr/share/groff_font/devps/NB -OLD_FILES+=usr/share/groff_font/devps/NBI -OLD_FILES+=usr/share/groff_font/devps/NI -OLD_FILES+=usr/share/groff_font/devps/NR -OLD_FILES+=usr/share/groff_font/devps/PB -OLD_FILES+=usr/share/groff_font/devps/PBI -OLD_FILES+=usr/share/groff_font/devps/PI -OLD_FILES+=usr/share/groff_font/devps/PR -OLD_FILES+=usr/share/groff_font/devps/S -OLD_FILES+=usr/share/groff_font/devps/SS -OLD_FILES+=usr/share/groff_font/devps/TB -OLD_FILES+=usr/share/groff_font/devps/TBI -OLD_FILES+=usr/share/groff_font/devps/TI -OLD_FILES+=usr/share/groff_font/devps/TR -OLD_FILES+=usr/share/groff_font/devps/ZCMI -OLD_FILES+=usr/share/groff_font/devps/ZD -OLD_FILES+=usr/share/groff_font/devps/ZDR -OLD_FILES+=usr/share/groff_font/devps/afmname -OLD_FILES+=usr/share/groff_font/devps/dingbats.map -OLD_FILES+=usr/share/groff_font/devps/dingbats.rmap -OLD_FILES+=usr/share/groff_font/devps/download -OLD_FILES+=usr/share/groff_font/devps/freeeuro.pfa -OLD_FILES+=usr/share/groff_font/devps/lgreekmap -OLD_FILES+=usr/share/groff_font/devps/prologue -OLD_FILES+=usr/share/groff_font/devps/symbol.sed -OLD_FILES+=usr/share/groff_font/devps/symbolchars -OLD_FILES+=usr/share/groff_font/devps/symbolsl.afm -OLD_FILES+=usr/share/groff_font/devps/symbolsl.pfa -OLD_FILES+=usr/share/groff_font/devps/text.enc -OLD_FILES+=usr/share/groff_font/devps/textmap -OLD_FILES+=usr/share/groff_font/devps/zapfdr.pfa -OLD_DIRS+=usr/share/groff_font/devps -OLD_FILES+=usr/share/groff_font/devutf8/B -OLD_FILES+=usr/share/groff_font/devutf8/BI -OLD_FILES+=usr/share/groff_font/devutf8/CW -OLD_FILES+=usr/share/groff_font/devutf8/DESC -OLD_FILES+=usr/share/groff_font/devutf8/I -OLD_FILES+=usr/share/groff_font/devutf8/L -OLD_FILES+=usr/share/groff_font/devutf8/R -OLD_FILES+=usr/share/groff_font/devutf8/S -OLD_DIRS+=usr/share/groff_font/devutf8 -OLD_DIRS+=usr/share/groff_font -OLD_FILES+=usr/share/man/man1/addftinfo.1.gz -OLD_FILES+=usr/share/man/man1/afmtodit.1.gz -OLD_FILES+=usr/share/man/man1/checknr.1.gz -OLD_FILES+=usr/share/man/man1/colcrt.1.gz -OLD_FILES+=usr/share/man/man1/eqn.1.gz -OLD_FILES+=usr/share/man/man1/grn.1.gz -OLD_FILES+=usr/share/man/man1/grodvi.1.gz -OLD_FILES+=usr/share/man/man1/groff.1.gz -OLD_FILES+=usr/share/man/man1/grog.1.gz -OLD_FILES+=usr/share/man/man1/grolbp.1.gz -OLD_FILES+=usr/share/man/man1/grolj4.1.gz -OLD_FILES+=usr/share/man/man1/grops.1.gz -OLD_FILES+=usr/share/man/man1/grotty.1.gz -OLD_FILES+=usr/share/man/man1/hpftodit.1.gz -OLD_FILES+=usr/share/man/man1/indxbib.1.gz -OLD_FILES+=usr/share/man/man1/lkbib.1.gz -OLD_FILES+=usr/share/man/man1/lookbib.1.gz -OLD_FILES+=usr/share/man/man1/mmroff.1.gz -OLD_FILES+=usr/share/man/man1/neqn.1.gz -OLD_FILES+=usr/share/man/man1/nroff.1.gz -OLD_FILES+=usr/share/man/man1/pfbtops.1.gz -OLD_FILES+=usr/share/man/man1/pic.1.gz -OLD_FILES+=usr/share/man/man1/psroff.1.gz -OLD_FILES+=usr/share/man/man1/refer.1.gz -OLD_FILES+=usr/share/man/man1/tbl.1.gz -OLD_FILES+=usr/share/man/man1/tfmtodit.1.gz -OLD_FILES+=usr/share/man/man1/troff.1.gz -OLD_FILES+=usr/share/man/man1/vgrind.1.gz -OLD_FILES+=usr/share/man/man5/groff_font.5.gz -OLD_FILES+=usr/share/man/man5/groff_out.5.gz -OLD_FILES+=usr/share/man/man5/groff_tmac.5.gz -OLD_FILES+=usr/share/man/man5/lj4_font.5.gz -OLD_FILES+=usr/share/man/man5/tmac.5.gz -OLD_FILES+=usr/share/man/man5/vgrindefs.5.gz -OLD_FILES+=usr/share/man/man7/ditroff.7.gz -OLD_FILES+=usr/share/man/man7/groff.7.gz -OLD_FILES+=usr/share/man/man7/groff_char.7.gz -OLD_FILES+=usr/share/man/man7/groff_diff.7.gz -OLD_FILES+=usr/share/man/man7/groff_man.7.gz -OLD_FILES+=usr/share/man/man7/groff_mdoc.7.gz -OLD_FILES+=usr/share/man/man7/groff_me.7.gz -OLD_FILES+=usr/share/man/man7/groff_mm.7.gz -OLD_FILES+=usr/share/man/man7/groff_mmse.7.gz -OLD_FILES+=usr/share/man/man7/groff_ms.7.gz -OLD_FILES+=usr/share/man/man7/groff_trace.7.gz -OLD_FILES+=usr/share/man/man7/groff_www.7.gz -OLD_FILES+=usr/share/man/man7/mdoc.samples.7.gz -OLD_FILES+=usr/share/man/man7/me.7.gz -OLD_FILES+=usr/share/man/man7/mm.7.gz -OLD_FILES+=usr/share/man/man7/mmse.7.gz -OLD_FILES+=usr/share/man/man7/ms.7.gz -OLD_FILES+=usr/share/man/man7/orig_me.7.gz -OLD_FILES+=usr/share/me/acm.me -OLD_FILES+=usr/share/me/chars.me -OLD_FILES+=usr/share/me/deltext.me -OLD_FILES+=usr/share/me/eqn.me -OLD_FILES+=usr/share/me/float.me -OLD_FILES+=usr/share/me/footnote.me -OLD_FILES+=usr/share/me/index.me -OLD_FILES+=usr/share/me/letterhead.me -OLD_FILES+=usr/share/me/local.me -OLD_FILES+=usr/share/me/null.me -OLD_FILES+=usr/share/me/refer.me -OLD_FILES+=usr/share/me/revisions -OLD_FILES+=usr/share/me/sh.me -OLD_FILES+=usr/share/me/tbl.me -OLD_FILES+=usr/share/me/thesis.me -OLD_DIRS+=usr/share/me -OLD_FILES+=usr/share/misc/vgrindefs -OLD_FILES+=usr/share/misc/vgrindefs.db -OLD_FILES+=usr/share/tmac/X.tmac -OLD_FILES+=usr/share/tmac/Xps.tmac -OLD_FILES+=usr/share/tmac/a4.tmac -OLD_FILES+=usr/share/tmac/an-old.tmac -OLD_FILES+=usr/share/tmac/an.tmac -OLD_FILES+=usr/share/tmac/andoc.tmac -OLD_FILES+=usr/share/tmac/composite.tmac -OLD_FILES+=usr/share/tmac/cp1047.tmac -OLD_FILES+=usr/share/tmac/devtag.tmac -OLD_FILES+=usr/share/tmac/doc.tmac -OLD_FILES+=usr/share/tmac/dvi.tmac -OLD_FILES+=usr/share/tmac/e.tmac -OLD_FILES+=usr/share/tmac/ec.tmac -OLD_FILES+=usr/share/tmac/eqnrc -OLD_FILES+=usr/share/tmac/europs.tmac -OLD_FILES+=usr/share/tmac/html-end.tmac -OLD_FILES+=usr/share/tmac/html.tmac -OLD_FILES+=usr/share/tmac/hyphen.ru -OLD_FILES+=usr/share/tmac/hyphen.us -OLD_FILES+=usr/share/tmac/hyphenex.us -OLD_FILES+=usr/share/tmac/koi8-r.tmac -OLD_FILES+=usr/share/tmac/latin1.tmac -OLD_FILES+=usr/share/tmac/latin2.tmac -OLD_FILES+=usr/share/tmac/latin9.tmac -OLD_FILES+=usr/share/tmac/lbp.tmac -OLD_FILES+=usr/share/tmac/lj4.tmac -OLD_FILES+=usr/share/tmac/m.tmac -OLD_FILES+=usr/share/tmac/man.local -OLD_FILES+=usr/share/tmac/man.tmac -OLD_FILES+=usr/share/tmac/mandoc.tmac -OLD_FILES+=usr/share/tmac/mdoc.local -OLD_FILES+=usr/share/tmac/mdoc.tmac -OLD_FILES+=usr/share/tmac/mdoc/doc-common -OLD_FILES+=usr/share/tmac/mdoc/doc-ditroff -OLD_FILES+=usr/share/tmac/mdoc/doc-nroff -OLD_FILES+=usr/share/tmac/mdoc/doc-syms -OLD_FILES+=usr/share/tmac/mdoc/fr.ISO8859-1 -OLD_FILES+=usr/share/tmac/mdoc/ru.KOI8-R -OLD_DIRS+=usr/share/tmac/mdoc -OLD_FILES+=usr/share/tmac/me.tmac -OLD_FILES+=usr/share/tmac/mm/0.MT -OLD_FILES+=usr/share/tmac/mm/4.MT -OLD_FILES+=usr/share/tmac/mm/5.MT -OLD_FILES+=usr/share/tmac/mm/locale -OLD_FILES+=usr/share/tmac/mm/mm.tmac -OLD_FILES+=usr/share/tmac/mm/mmse.tmac -OLD_FILES+=usr/share/tmac/mm/ms.cov -OLD_FILES+=usr/share/tmac/mm/se_locale -OLD_FILES+=usr/share/tmac/mm/se_ms.cov -OLD_DIRS+=usr/share/tmac/mm -OLD_FILES+=usr/share/tmac/ms.tmac -OLD_FILES+=usr/share/tmac/mse.tmac -OLD_FILES+=usr/share/tmac/papersize.tmac -OLD_FILES+=usr/share/tmac/pic.tmac -OLD_FILES+=usr/share/tmac/ps.tmac -OLD_FILES+=usr/share/tmac/psatk.tmac -OLD_FILES+=usr/share/tmac/psold.tmac -OLD_FILES+=usr/share/tmac/pspic.tmac -OLD_FILES+=usr/share/tmac/s.tmac -OLD_FILES+=usr/share/tmac/safer.tmac -OLD_FILES+=usr/share/tmac/tmac.orig_me -OLD_FILES+=usr/share/tmac/tmac.vgrind -OLD_FILES+=usr/share/tmac/trace.tmac -OLD_FILES+=usr/share/tmac/troffrc -OLD_FILES+=usr/share/tmac/troffrc-end -OLD_FILES+=usr/share/tmac/tty-char.tmac -OLD_FILES+=usr/share/tmac/tty.tmac -OLD_FILES+=usr/share/tmac/unicode.tmac -OLD_FILES+=usr/share/tmac/www.tmac -OLD_DIRS+=usr/share/tmac -# 20170607: remove incorrect atf_check(1) manpage link -OLD_FILES+=usr/share/man/man1/atf_check.1.gz -# 20170601: remove stale manpage -OLD_FILES+=usr/share/man/man2/cap_rights_get.2.gz -# 20170601: old libifconfig and libifc -OLD_FILES+=usr/lib/libifc.a -OLD_FILES+=usr/lib/libifc_p.a -OLD_FILES+=usr/lib/libifconfig.a -OLD_FILES+=usr/lib/libifconfig_p.a -# 20170529: mount.conf(8) -> mount.conf(5) -OLD_FILES+=usr/share/man/man8/mount.conf.8.gz -# 20170525: remove misleading template -OLD_FILES+=usr/share/misc/man.template -# 20170525: disconnect the roff docs from the build -OLD_FILES+=usr/share/doc/papers/beyond43.ascii.gz -OLD_FILES+=usr/share/doc/papers/bio.ascii.gz -OLD_FILES+=usr/share/doc/papers/contents.ascii.gz -OLD_FILES+=usr/share/doc/papers/devfs.ascii.gz -OLD_FILES+=usr/share/doc/papers/diskperf.ascii.gz -OLD_FILES+=usr/share/doc/papers/fsinterface.ascii.gz -OLD_FILES+=usr/share/doc/papers/hwpmc.ascii.gz -OLD_FILES+=usr/share/doc/papers/jail.ascii.gz -OLD_FILES+=usr/share/doc/papers/kernmalloc.ascii.gz -OLD_FILES+=usr/share/doc/papers/kerntune.ascii.gz -OLD_FILES+=usr/share/doc/papers/malloc.ascii.gz -OLD_FILES+=usr/share/doc/papers/newvm.ascii.gz -OLD_FILES+=usr/share/doc/papers/releng.ascii.gz -OLD_FILES+=usr/share/doc/papers/sysperf.ascii.gz -OLD_FILES+=usr/share/doc/papers/timecounter.ascii.gz -OLD_DIRS+=usr/share/doc/papers -OLD_FILES+=usr/share/doc/psd/01.cacm/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/01.cacm -OLD_FILES+=usr/share/doc/psd/02.implement/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/02.implement -OLD_FILES+=usr/share/doc/psd/03.iosys/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/03.iosys -OLD_FILES+=usr/share/doc/psd/04.uprog/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/04.uprog -OLD_FILES+=usr/share/doc/psd/05.sysman/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/05.sysman -OLD_FILES+=usr/share/doc/psd/06.Clang/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/06.Clang -OLD_FILES+=usr/share/doc/psd/12.make/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/12.make -OLD_FILES+=usr/share/doc/psd/13.rcs/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/13.rcs -OLD_FILES+=usr/share/doc/psd/13.rcs/rcs_func.ascii.gz -OLD_DIRS+=usr/share/doc/psd/13.rcs -OLD_FILES+=usr/share/doc/psd/15.yacc/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/15.yacc -OLD_FILES+=usr/share/doc/psd/16.lex/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/16.lex -OLD_FILES+=usr/share/doc/psd/17.m4/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/17.m4 -OLD_FILES+=usr/share/doc/psd/18.gprof/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/18.gprof -OLD_FILES+=usr/share/doc/psd/20.ipctut/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/20.ipctut -OLD_FILES+=usr/share/doc/psd/21.ipc/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/21.ipc -OLD_FILES+=usr/share/doc/psd/22.rpcgen/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/22.rpcgen -OLD_FILES+=usr/share/doc/psd/23.rpc/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/23.rpc -OLD_FILES+=usr/share/doc/psd/24.xdr/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/24.xdr -OLD_FILES+=usr/share/doc/psd/25.xdrrfc/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/25.xdrrfc -OLD_FILES+=usr/share/doc/psd/26.rpcrfc/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/26.rpcrfc -OLD_FILES+=usr/share/doc/psd/27.nfsrfc/paper.ascii.gz -OLD_DIRS+=usr/share/doc/psd/27.nfsrfc -OLD_FILES+=usr/share/doc/psd/Title.ascii.gz -OLD_FILES+=usr/share/doc/psd/contents.ascii.gz -OLD_DIRS+=usr/share/doc/psd/ -OLD_FILES+=usr/share/doc/smm/01.setup/paper.ascii.gz -OLD_DIRS+=usr/share/doc/smm/01.setup -OLD_FILES+=usr/share/doc/smm/02.config/paper.ascii.gz -OLD_DIRS+=usr/share/doc/smm/02.config -OLD_FILES+=usr/share/doc/smm/03.fsck/paper.ascii.gz -OLD_DIRS+=usr/share/doc/smm/03.fsck -OLD_FILES+=usr/share/doc/smm/04.quotas/paper.ascii.gz -OLD_DIRS+=usr/share/doc/smm/04.quotas -OLD_FILES+=usr/share/doc/smm/05.fastfs/paper.ascii.gz -OLD_DIRS+=usr/share/doc/smm/05.fastfs -OLD_FILES+=usr/share/doc/smm/06.nfs/paper.ascii.gz -OLD_DIRS+=usr/share/doc/smm/06.nfs -OLD_FILES+=usr/share/doc/smm/07.lpd/paper.ascii.gz -OLD_DIRS+=usr/share/doc/smm/07.lpd -OLD_FILES+=usr/share/doc/smm/08.sendmailop/paper.ascii.gz -OLD_DIRS+=usr/share/doc/smm/08.sendmailop -OLD_FILES+=usr/share/doc/smm/11.timedop/paper.ascii.gz -OLD_DIRS+=usr/share/doc/smm/11.timedop -OLD_FILES+=usr/share/doc/smm/12.timed/paper.ascii.gz -OLD_DIRS+=usr/share/doc/smm/12.timed -OLD_FILES+=usr/share/doc/smm/18.net/paper.ascii.gz -OLD_DIRS+=usr/share/doc/smm/18.net -OLD_FILES+=usr/share/doc/smm/Title.ascii.gz -OLD_FILES+=usr/share/doc/smm/contents.ascii.gz -OLD_DIRS+=usr/share/doc/smm -OLD_FILES+=usr/share/doc/usd/04.csh/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/04.csh -OLD_FILES+=usr/share/doc/usd/05.dc/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/05.dc -OLD_FILES+=usr/share/doc/usd/06.bc/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/06.bc -OLD_FILES+=usr/share/doc/usd/07.mail/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/07.mail -OLD_FILES+=usr/share/doc/usd/10.exref/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/10.exref/summary.ascii.gz -OLD_DIRS+=usr/share/doc/usd/10.exref -OLD_FILES+=usr/share/doc/usd/11.edit/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/11.edit -OLD_FILES+=usr/share/doc/usd/12.vi/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/12.vi/summary.ascii.gz -OLD_FILES+=usr/share/doc/usd/12.vi/viapwh.ascii.gz -OLD_DIRS+=usr/share/doc/usd/12.vi -OLD_FILES+=usr/share/doc/usd/13.viref/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/13.viref -OLD_FILES+=usr/share/doc/usd/18.msdiffs/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/18.msdiffs -OLD_FILES+=usr/share/doc/usd/19.memacros/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/19.memacros -OLD_FILES+=usr/share/doc/usd/20.meref/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/20.meref -OLD_FILES+=usr/share/doc/usd/21.troff/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/21.troff -OLD_FILES+=usr/share/doc/usd/22.trofftut/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/22.trofftut -OLD_FILES+=usr/share/doc/usd/Title.ascii.gz -OLD_FILES+=usr/share/doc/usd/contents.ascii.gz -OLD_DIRS+=usr/share/doc/usd -# 20170523: 64-bit inode support, library version bumps -OLD_LIBS+=lib/libzfs.so.2 -OLD_LIBS+=usr/lib/libarchive.so.6 -OLD_LIBS+=usr/lib/libmilter.so.5 -# 20170427: NATM configuration support removed -OLD_FILES+=etc/rc.d/atm1 -OLD_FILES+=etc/rc.d/atm2 -OLD_FILES+=etc/rc.d/atm3 -OLD_FILES+=usr/share/man/man8/rc.atm.8.gz -# 20170426: UMA_ZONE_REFCNT removed -OLD_FILES+=usr/share/man/man9/uma_find_refcnt.9.gz -# 20170424: NATM support removed -OLD_FILES+=rescue/atmconfig -OLD_FILES+=sbin/atmconfig -OLD_FILES+=usr/include/bsnmp/snmp_atm.h -OLD_FILES+=usr/include/dev/utopia/idtphy.h -OLD_FILES+=usr/include/dev/utopia/suni.h -OLD_FILES+=usr/include/dev/utopia/utopia.h -OLD_FILES+=usr/include/dev/utopia/utopia_priv.h -OLD_DIRS+=usr/include/dev/utopia -OLD_FILES+=usr/include/net/if_atm.h -OLD_FILES+=usr/include/netgraph/atm/ng_atm.h -OLD_FILES+=usr/include/netinet/if_atm.h -OLD_FILES+=usr/include/netnatm/natm.h -OLD_FILES+=usr/lib/snmp_atm.so -OLD_LIBS+=usr/lib/snmp_atm.so.6 -OLD_FILES+=usr/share/doc/atm/atmconfig.help -OLD_FILES+=usr/share/doc/atm/atmconfig_device.help -OLD_DIRS+=usr/share/doc/atm -OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz -OLD_FILES+=usr/share/man/man4/en.4.gz -OLD_FILES+=usr/share/man/man4/fatm.4.gz -OLD_FILES+=usr/share/man/man4/hatm.4.gz -OLD_FILES+=usr/share/man/man4/if_en.4.gz -OLD_FILES+=usr/share/man/man4/if_fatm.4.gz -OLD_FILES+=usr/share/man/man4/if_hatm.4.gz -OLD_FILES+=usr/share/man/man4/if_patm.4.gz -OLD_FILES+=usr/share/man/man4/natm.4.gz -OLD_FILES+=usr/share/man/man4/natmip.4.gz -OLD_FILES+=usr/share/man/man4/ng_atm.4.gz -OLD_FILES+=usr/share/man/man4/patm.4.gz -OLD_FILES+=usr/share/man/man4/utopia.4.gz -OLD_FILES+=usr/share/man/man8/atmconfig.8.gz -OLD_FILES+=usr/share/man/man9/utopia.9.gz -OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def -OLD_FILES+=usr/share/snmp/defs/atm_tree.def -OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt -OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM.txt -# 20170420: remove GNU diff -OLD_FILES+=usr/share/man/man7/diff.7.gz -# 20170322: rename <x> to <x>_test to match the FreeBSD test suite name scheme -OLD_FILES+=usr/tests/usr.bin/col/col -OLD_FILES+=usr/tests/usr.bin/diff/diff -OLD_FILES+=usr/tests/usr.bin/ident/ident -OLD_FILES+=usr/tests/usr.bin/mkimg/mkimg -OLD_FILES+=usr/tests/usr.bin/sdiff/sdiff -OLD_FILES+=usr/tests/usr.bin/soelim/soelim -OLD_FILES+=usr/tests/usr.sbin/pw/pw_config -OLD_FILES+=usr/tests/usr.sbin/pw/pw_etcdir -OLD_FILES+=usr/tests/usr.sbin/pw/pw_groupadd -OLD_FILES+=usr/tests/usr.sbin/pw/pw_groupdel -OLD_FILES+=usr/tests/usr.sbin/pw/pw_groupmod -OLD_FILES+=usr/tests/usr.sbin/pw/pw_lock -OLD_FILES+=usr/tests/usr.sbin/pw/pw_useradd -OLD_FILES+=usr/tests/usr.sbin/pw/pw_userdel -OLD_FILES+=usr/tests/usr.sbin/pw/pw_usermod -OLD_FILES+=usr/tests/usr.sbin/pw/pw_usernext -# 20170319: io_test requires zh_TW.Big5 locale -OLD_FILES+=usr/tests/lib/libc/locale/io_test -# 20170319: remove nls for non supported Big5* locales -OLD_DIRS+=usr/share/nls/zh_HK.Big5HKSCS -OLD_DIRS+=usr/share/nls/zh_TW.Big5 -# 20170313: move .../sys/geom/eli/... to .../sys/geom/class/eli/... -OLD_FILES+=usr/tests/sys/geom/eli/pbkdf2/pbkdf2 -OLD_FILES+=usr/tests/sys/geom/eli/pbkdf2/Kyuafile -OLD_FILES+=usr/tests/sys/geom/eli/Kyuafile -OLD_DIRS+=usr/tests/sys/geom/eli/pbkdf2 -OLD_DIRS+=usr/tests/sys/geom/eli -# 20170313: sbin/ipftest and ipresend temporarily disconnected -OLD_FILES+=sbin/ipftest -OLD_FILES+=sbin/ipresend -OLD_FILES+=usr/share/man/man1/ipftest.1.gz -OLD_FILES+=usr/share/man/man1/ipresend.1.gz -# 20170311: Remove WITHOUT_MANDOCDB option -OLD_FILES+=usr/share/man/man1/makewhatis.1.gz -# 20170308: rename some tests -OLD_FILES+=usr/tests/bin/pwait/pwait -OLD_FILES+=usr/tests/usr.bin/timeout/timeout -# 20170307: remove pcap-int.h -OLD_FILES+=usr/include/pcap-int.h -# 20170302: new libc++ import which bumps version from 3.9.1 to 4.0.0 -OLD_FILES+=usr/include/c++/v1/__undef___deallocate -OLD_FILES+=usr/include/c++/v1/tr1/__undef___deallocate -# 20170302: new clang import which bumps version from 3.9.1 to 4.0.0 -OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/allocator_interface.h -OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/asan_interface.h -OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/common_interface_defs.h -OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/coverage_interface.h -OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/dfsan_interface.h -OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/esan_interface.h -OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/linux_syscall_hooks.h -OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/lsan_interface.h -OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/msan_interface.h -OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/tsan_interface_atomic.h -OLD_DIRS+=usr/lib/clang/3.9.1/include/sanitizer -OLD_FILES+=usr/lib/clang/3.9.1/include/__clang_cuda_cmath.h -OLD_FILES+=usr/lib/clang/3.9.1/include/__clang_cuda_intrinsics.h -OLD_FILES+=usr/lib/clang/3.9.1/include/__clang_cuda_math_forward_declares.h -OLD_FILES+=usr/lib/clang/3.9.1/include/__clang_cuda_runtime_wrapper.h -OLD_FILES+=usr/lib/clang/3.9.1/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/3.9.1/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/3.9.1/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/3.9.1/include/adxintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/altivec.h -OLD_FILES+=usr/lib/clang/3.9.1/include/ammintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/arm_acle.h -OLD_FILES+=usr/lib/clang/3.9.1/include/arm_neon.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512cdintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512dqintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512ifmaintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512ifmavlintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512pfintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vbmiintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vbmivlintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vlcdintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vldqintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/avxintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/clflushoptintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/cpuid.h -OLD_FILES+=usr/lib/clang/3.9.1/include/cuda_builtin_vars.h -OLD_FILES+=usr/lib/clang/3.9.1/include/emmintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/fxsrintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/htmintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/htmxlintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/immintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/3.9.1/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/3.9.1/include/mmintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/module.modulemap -OLD_FILES+=usr/lib/clang/3.9.1/include/msa.h -OLD_FILES+=usr/lib/clang/3.9.1/include/mwaitxintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/opencl-c.h -OLD_FILES+=usr/lib/clang/3.9.1/include/pkuintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/s390intrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/shaintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/smmintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/vadefs.h -OLD_FILES+=usr/lib/clang/3.9.1/include/vecintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/x86intrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/xopintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/xsavecintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/xsaveintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/xsaveoptintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/xsavesintrin.h -OLD_FILES+=usr/lib/clang/3.9.1/include/xtestintrin.h -OLD_DIRS+=usr/lib/clang/3.9.1/include -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-i386.so -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-preinit-i386.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-x86_64.so -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.safestack-i386.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.safestack-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.stats-i386.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.stats-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.stats_client-i386.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.stats_client-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.ubsan_standalone-i386.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/3.9.1/lib/freebsd -OLD_DIRS+=usr/lib/clang/3.9.1/lib -OLD_DIRS+=usr/lib/clang/3.9.1 -# 20170226: SVR4 compatibility removed -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/share/man/man4/streams.4.gz -OLD_FILES+=usr/share/man/man4/svr4.4.gz -.endif -# 20170219: OpenPAM RADULA upgrade removed the libpam tests -OLD_FILES+=usr/tests/lib/libpam/Kyuafile -OLD_FILES+=usr/tests/lib/libpam/t_openpam_ctype -OLD_FILES+=usr/tests/lib/libpam/t_openpam_readlinev -OLD_FILES+=usr/tests/lib/libpam/t_openpam_readword -OLD_DIRS+=usr/test/lib/libpam -# 20170216: remove ahb(4) -OLD_FILES+=usr/share/man/man4/ahb.4.gz -# 20170216: remove fea(4) -OLD_FILES+=usr/share/man/man4/fea.4.gz -# 20170206: remove bdes(1) -OLD_FILES+=usr/bin/bdes -OLD_FILES+=usr/share/man/man1/bdes.1.gz -# 20170206: merged projects/ipsec -OLD_FILES+=usr/include/netinet/ip_ipsec.h -OLD_FILES+=usr/include/netinet6/ip6_ipsec.h -# 20170128: remove pc98 support -OLD_FILES+=usr/include/dev/ic/i8251.h -OLD_FILES+=usr/include/dev/ic/i8255.h -OLD_FILES+=usr/include/dev/ic/rsa.h -OLD_FILES+=usr/include/dev/ic/wd33c93reg.h -OLD_FILES+=usr/include/sys/disk/pc98.h -OLD_FILES+=usr/include/sys/diskpc98.h -OLD_FILES+=usr/share/man/man4/i386/ct.4.gz -OLD_FILES+=usr/share/man/man4/i386/snc.4.gz -OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.iso.kbd -OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.kbd -OLD_FILES+=usr/share/vt/keymaps/jp.pc98.iso.kbd -OLD_FILES+=usr/share/vt/keymaps/jp.pc98.kbd -# 20170110: Four files from ggate tests consolidated into one -OLD_FILES+=usr/tests/sys/geom/class/gate/1_test -OLD_FILES+=usr/tests/sys/geom/class/gate/2_test -OLD_FILES+=usr/tests/sys/geom/class/gate/3_test -OLD_FILES+=usr/tests/sys/geom/class/gate/conf.sh -# 20170103: libbsnmptools.so made into an INTERNALLIB -OLD_FILES+=usr/lib/libbsnmptools.a -OLD_FILES+=usr/lib/libbsnmptools_p.a -OLD_LIBS+=usr/lib/libbsnmptools.so.0 -OLD_FILES+=usr/lib/libbsnmptools.so -# 20170102: sysdecode_getfsstat_flags() renamed to sysdecode_getfsstat_mode() -OLD_FILES+=usr/share/man/man3/sysdecode_getfsstat_flags.3.gz -# 20161230: libarchive ACL pax test renamed to test_acl_pax_posix1e.tar.uu -OLD_FILES+=usr/tests/lib/libarchive/test_acl_pax.tar.uu -# 20161229: Three files from gnop tests consolidated into one -OLD_FILES+=usr/tests/sys/geom/class/nop/1_test -OLD_FILES+=usr/tests/sys/geom/class/nop/2_test -OLD_FILES+=usr/tests/sys/geom/class/nop/conf.sh -# 20161217: new clang import which bumps version from 3.9.0 to 3.9.1 -OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/allocator_interface.h -OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/asan_interface.h -OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/common_interface_defs.h -OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/coverage_interface.h -OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/dfsan_interface.h -OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/esan_interface.h -OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/linux_syscall_hooks.h -OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/lsan_interface.h -OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/msan_interface.h -OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/tsan_interface_atomic.h -OLD_DIRS+=usr/lib/clang/3.9.0/include/sanitizer -OLD_FILES+=usr/lib/clang/3.9.0/include/__clang_cuda_cmath.h -OLD_FILES+=usr/lib/clang/3.9.0/include/__clang_cuda_intrinsics.h -OLD_FILES+=usr/lib/clang/3.9.0/include/__clang_cuda_math_forward_declares.h -OLD_FILES+=usr/lib/clang/3.9.0/include/__clang_cuda_runtime_wrapper.h -OLD_FILES+=usr/lib/clang/3.9.0/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/3.9.0/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/3.9.0/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/3.9.0/include/adxintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/altivec.h -OLD_FILES+=usr/lib/clang/3.9.0/include/ammintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/arm_acle.h -OLD_FILES+=usr/lib/clang/3.9.0/include/arm_neon.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512cdintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512dqintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512ifmaintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512ifmavlintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512pfintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vbmiintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vbmivlintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vlcdintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vldqintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/avxintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/clflushoptintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/cpuid.h -OLD_FILES+=usr/lib/clang/3.9.0/include/cuda_builtin_vars.h -OLD_FILES+=usr/lib/clang/3.9.0/include/emmintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/fxsrintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/htmintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/htmxlintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/immintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/3.9.0/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/3.9.0/include/mmintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/module.modulemap -OLD_FILES+=usr/lib/clang/3.9.0/include/mwaitxintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/opencl-c.h -OLD_FILES+=usr/lib/clang/3.9.0/include/pkuintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/s390intrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/shaintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/smmintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/vadefs.h -OLD_FILES+=usr/lib/clang/3.9.0/include/vecintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/x86intrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/xopintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/xsavecintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/xsaveintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/xsaveoptintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/xsavesintrin.h -OLD_FILES+=usr/lib/clang/3.9.0/include/xtestintrin.h -OLD_DIRS+=usr/lib/clang/3.9.0/include -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-i386.so -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-preinit-i386.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-x86_64.so -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.safestack-i386.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.safestack-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.stats-i386.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.stats-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.stats_client-i386.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.stats_client-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/3.9.0/lib/freebsd -OLD_DIRS+=usr/lib/clang/3.9.0/lib -OLD_DIRS+=usr/lib/clang/3.9.0 -# 20161205: libproc version bump -OLD_LIBS+=usr/lib/libproc.so.3 -# 20161127: Remove vm_page_cache(9) -OLD_FILES+=usr/share/man/man9/vm_page_cache.9.gz -# 20161124: new clang import which bumps version from 3.8.0 to 3.9.0 -OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/allocator_interface.h -OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/asan_interface.h -OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/common_interface_defs.h -OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/coverage_interface.h -OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/dfsan_interface.h -OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/linux_syscall_hooks.h -OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/lsan_interface.h -OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/msan_interface.h -OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/tsan_interface_atomic.h -OLD_DIRS+=usr/lib/clang/3.8.0/include/sanitizer -OLD_FILES+=usr/lib/clang/3.8.0/include/__clang_cuda_runtime_wrapper.h -OLD_FILES+=usr/lib/clang/3.8.0/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/3.8.0/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/3.8.0/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/3.8.0/include/adxintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/altivec.h -OLD_FILES+=usr/lib/clang/3.8.0/include/ammintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/arm_acle.h -OLD_FILES+=usr/lib/clang/3.8.0/include/arm_neon.h -OLD_FILES+=usr/lib/clang/3.8.0/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/avx512cdintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/avx512dqintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/avx512vldqintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/avxintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/cpuid.h -OLD_FILES+=usr/lib/clang/3.8.0/include/cuda_builtin_vars.h -OLD_FILES+=usr/lib/clang/3.8.0/include/emmintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/fxsrintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/htmintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/htmxlintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/immintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/3.8.0/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/3.8.0/include/mmintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/module.modulemap -OLD_FILES+=usr/lib/clang/3.8.0/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/pkuintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/s390intrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/shaintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/smmintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/vadefs.h -OLD_FILES+=usr/lib/clang/3.8.0/include/vecintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/x86intrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/xopintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/xsavecintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/xsaveintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/xsaveoptintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/xsavesintrin.h -OLD_FILES+=usr/lib/clang/3.8.0/include/xtestintrin.h -OLD_DIRS+=usr/lib/clang/3.8.0/include -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-i386.so -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-preinit-i386.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-x86_64.so -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.safestack-i386.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.safestack-x86_64.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/3.8.0/lib/freebsd -OLD_DIRS+=usr/lib/clang/3.8.0/lib -OLD_DIRS+=usr/lib/clang/3.8.0 -# 20161121: Hyper-V manuals only apply to amd64 and i386 -.if ${TARGET_ARCH} != "amd64" && ${TARGET_ARCH} != "i386" -OLD_FILES+=usr/share/man/man4/hv_kvp.4.gz -OLD_FILES+=usr/share/man/man4/hv_netvsc.4.gz -OLD_FILES+=usr/share/man/man4/hv_storvsc.4.gz -OLD_FILES+=usr/share/man/man4/hv_utils.4.gz -OLD_FILES+=usr/share/man/man4/hv_vmbus.4.gz -OLD_FILES+=usr/share/man/man4/hv_vss.4.gz -.endif -# 20161118: Remove hv_ata_pci_disengage(4) -OLD_FILES+=usr/share/man/man4/hv_ata_pci_disengage.4.gz -# 20161017: urtwn(4) was merged into rtwn(4) -OLD_FILES+=usr/share/man/man4/if_urtwn.4.gz -OLD_FILES+=usr/share/man/man4/urtwn.4.gz -OLD_FILES+=usr/share/man/man4/urtwnfw.4.gz -# 20161015: Remove GNU rcs -OLD_FILES+=usr/bin/ci -OLD_FILES+=usr/bin/co -OLD_FILES+=usr/bin/merge -OLD_FILES+=usr/bin/rcs -OLD_FILES+=usr/bin/rcsclean -OLD_FILES+=usr/bin/rcsdiff -OLD_FILES+=usr/bin/rcsfreeze -OLD_FILES+=usr/bin/rcsmerge -OLD_FILES+=usr/bin/rlog -OLD_FILES+=usr/share/doc/psd/13.rcs/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/13.rcs/rcs_func.ascii.gz -OLD_DIRS+=usr/share/doc/psd/13.rcs -OLD_FILES+=usr/share/man/man1/ci.1.gz -OLD_FILES+=usr/share/man/man1/co.1.gz -OLD_FILES+=usr/share/man/man1/merge.1.gz -OLD_FILES+=usr/share/man/man1/rcs.1.gz -OLD_FILES+=usr/share/man/man1/rcsclean.1.gz -OLD_FILES+=usr/share/man/man1/rcsdiff.1.gz -OLD_FILES+=usr/share/man/man1/rcsfreeze.1.gz -OLD_FILES+=usr/share/man/man1/rcsintro.1.gz -OLD_FILES+=usr/share/man/man1/rcsmerge.1.gz -OLD_FILES+=usr/share/man/man1/rlog.1.gz -OLD_FILES+=usr/share/man/man5/rcsfile.5.gz -# 20161010: remove link to removed m_getclr(9) macro -OLD_FILES+=usr/share/man/man9/m_getclr.9.gz -# 20160906: libkqueue tests moved to /usr/tests/sys/kqueue/libkqueue -OLD_FILES+=usr/tests/sys/kqueue/kqtest -OLD_FILES+=usr/tests/sys/kqueue/kqueue_test -# 20160903: idle page zeroing support removed -OLD_FILES+=usr/share/man/man9/pmap_zero_idle.9.gz -# 20160901: Remove digi(4) -OLD_FILES+=usr/share/man/man4/digi.4.gz -# 20160819: Remove ie(4) -OLD_FILES+=usr/share/man/man4/i386/ie.4.gz -# 20160819: Remove spic(4) -OLD_FILES+=usr/share/man/man4/spic.4.gz -# 20160819: Remove wl(4) and wlconfig(8) -OLD_FILES+=usr/share/man/man4/i386/wl.4.gz -OLD_FILES+=usr/sbin/wlconfig -OLD_FILES+=usr/share/man/man8/i386/wlconfig.8.gz -# 20160819: Remove si(4) and sicontrol(8) -OLD_FILES+=usr/share/man/man4/si.4.gz -OLD_FILES+=usr/sbin/sicontrol -OLD_FILES+=usr/share/man/man8/sicontrol.8.gz -# 20160819: Remove scd(4) -OLD_FILES+=usr/share/man/man4/scd.4.gz -# 20160815: Remove mcd(4) -OLD_FILES+=usr/share/man/man4/mcd.4.gz -# 20160805: lockmgr_waiters(9) removed -OLD_FILES+=usr/share/man/man9/lockmgr_waiters.9.gz -# 20160703: POSIXify locales with variants -OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_MESSAGES -OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_TIME -OLD_DIRS+=usr/share/locale/zh_Hant_TW.UTF-8 -OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_COLLATE -OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_CTYPE -OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_MESSAGES -OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_MONETARY -OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_NUMERIC -OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_TIME -OLD_DIRS+=usr/share/locale/zh_Hant_TW.Big5 -OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_MESSAGES -OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_TIME -OLD_DIRS+=usr/share/locale/zh_Hant_HK.UTF-8 -OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_COLLATE -OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_CTYPE -OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_MESSAGES -OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_MONETARY -OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_NUMERIC -OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_TIME -OLD_DIRS+=usr/share/locale/zh_Hans_CN.eucCN -OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_MESSAGES -OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_TIME -OLD_DIRS+=usr/share/locale/zh_Hans_CN.UTF-8 -OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_COLLATE -OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_CTYPE -OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_MESSAGES -OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_MONETARY -OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_NUMERIC -OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_TIME -OLD_DIRS+=usr/share/locale/zh_Hans_CN.GBK -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_COLLATE -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_CTYPE -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_MESSAGES -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_MONETARY -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_NUMERIC -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_TIME -OLD_DIRS+=usr/share/locale/zh_Hans_CN.GB2312 -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_COLLATE -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_CTYPE -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_MESSAGES -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_MONETARY -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_NUMERIC -OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_TIME -OLD_DIRS+=usr/share/locale/zh_Hans_CN.GB18030 -OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_MESSAGES -OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_TIME -OLD_DIRS+=usr/share/locale/sr_Latn_RS.UTF-8 -OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_COLLATE -OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_CTYPE -OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_MESSAGES -OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_MONETARY -OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_NUMERIC -OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_TIME -OLD_DIRS+=usr/share/locale/sr_Latn_RS.ISO8859-2 -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_MESSAGES -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_TIME -OLD_DIRS+=usr/share/locale/sr_Cyrl_RS.UTF-8 -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_COLLATE -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_CTYPE -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_MESSAGES -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_MONETARY -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_NUMERIC -OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_TIME -OLD_DIRS+=usr/share/locale/sr_Cyrl_RS.ISO8859-5 -OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_MESSAGES -OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_TIME -OLD_DIRS+=usr/share/locale/mn_Cyrl_MN.UTF-8 -OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_MESSAGES -OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_TIME -OLD_DIRS+=usr/share/locale/kk_Cyrl_KZ.UTF-8 -# 20160608: removed pam_verbose_error -OLD_LIBS+=usr/lib/libpam.so.5 -OLD_LIBS+=usr/lib/pam_chroot.so.5 -OLD_LIBS+=usr/lib/pam_deny.so.5 -OLD_LIBS+=usr/lib/pam_echo.so.5 -OLD_LIBS+=usr/lib/pam_exec.so.5 -OLD_LIBS+=usr/lib/pam_ftpusers.so.5 -OLD_LIBS+=usr/lib/pam_group.so.5 -OLD_LIBS+=usr/lib/pam_guest.so.5 -OLD_LIBS+=usr/lib/pam_krb5.so.5 -OLD_LIBS+=usr/lib/pam_ksu.so.5 -OLD_LIBS+=usr/lib/pam_lastlog.so.5 -OLD_LIBS+=usr/lib/pam_login_access.so.5 -OLD_LIBS+=usr/lib/pam_nologin.so.5 -OLD_LIBS+=usr/lib/pam_opie.so.5 -OLD_LIBS+=usr/lib/pam_opieaccess.so.5 -OLD_LIBS+=usr/lib/pam_passwdqc.so.5 -OLD_LIBS+=usr/lib/pam_permit.so.5 -OLD_LIBS+=usr/lib/pam_radius.so.5 -OLD_LIBS+=usr/lib/pam_rhosts.so.5 -OLD_LIBS+=usr/lib/pam_rootok.so.5 -OLD_LIBS+=usr/lib/pam_securetty.so.5 -OLD_LIBS+=usr/lib/pam_self.so.5 -OLD_LIBS+=usr/lib/pam_ssh.so.5 -OLD_LIBS+=usr/lib/pam_tacplus.so.5 -OLD_LIBS+=usr/lib/pam_unix.so.5 -# 20160523: remove extranous ALTQ files -OLD_FILES+=usr/include/altq/altq_codel.h -OLD_FILES+=usr/include/altq/altq_fairq.h -# 20160519: remove DTrace Toolkit from base -OLD_FILES+=usr/sbin/dtruss -OLD_FILES+=usr/share/dtrace/toolkit/execsnoop -OLD_FILES+=usr/share/dtrace/toolkit/hotkernel -OLD_FILES+=usr/share/dtrace/toolkit/hotuser -OLD_FILES+=usr/share/dtrace/toolkit/opensnoop -OLD_FILES+=usr/share/dtrace/toolkit/procsystime -OLD_DIRS+=usr/share/dtrace/toolkit -OLD_FILES+=usr/share/man/man1/dtruss.1.gz -# 20160519: stale MLINK removed -OLD_FILES+=usr/share/man/man9/rman_await_resource.9.gz -# 20160517: ReiserFS removed -OLD_FILES+=usr/share/man/man5/reiserfs.5.gz -# 20160504: tests rework -OLD_FILES+=usr/tests/lib/libc/regex/data/README -# 20160430: kvm_getfiles(3) removed from kvm(3) -OLD_LIBS+=lib/libkvm.so.6 -OLD_FILES+=usr/share/man/man3/kvm_getfiles.3.gz -# 20160423: remove mroute6d -OLD_FILES+=etc/rc.d/mroute6d -# 20160419: rename units.lib -> definitions.units -OLD_FILES+=usr/share/misc/units.lib -# 20160419: remove Big5HKSCS locales -OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_COLLATE -OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_CTYPE -OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_MESSAGES -OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_MONETARY -OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_NUMERIC -OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_TIME -OLD_DIRS+=usr/share/locale/zh_HK.Big5HKSCS -OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_COLLATE -OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_CTYPE -OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_MESSAGES -OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_MONETARY -OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_NUMERIC -OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_TIME -OLD_DIRS+=usr/share/locale/zh_Hant_HK.Big5HKSCS -# 20160317: rman_res_t size bump to uintmax_t -OLD_LIBS+=usr/lib/libdevinfo.so.5 -# 20160305: new clang import which bumps version from 3.7.1 to 3.8.0 -OLD_FILES+=usr/bin/macho-dump -OLD_FILES+=usr/bin/tblgen -OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/allocator_interface.h -OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/asan_interface.h -OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/common_interface_defs.h -OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/coverage_interface.h -OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/dfsan_interface.h -OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/linux_syscall_hooks.h -OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/lsan_interface.h -OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/msan_interface.h -OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/tsan_interface_atomic.h -OLD_DIRS+=usr/lib/clang/3.7.1/include/sanitizer -OLD_FILES+=usr/lib/clang/3.7.1/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/3.7.1/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/3.7.1/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/3.7.1/include/adxintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/altivec.h -OLD_FILES+=usr/lib/clang/3.7.1/include/ammintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/arm_acle.h -OLD_FILES+=usr/lib/clang/3.7.1/include/arm_neon.h -OLD_FILES+=usr/lib/clang/3.7.1/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/avx512cdintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/avx512dqintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/avx512vldqintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/avxintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/cpuid.h -OLD_FILES+=usr/lib/clang/3.7.1/include/cuda_builtin_vars.h -OLD_FILES+=usr/lib/clang/3.7.1/include/emmintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/fxsrintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/htmintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/htmxlintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/immintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/3.7.1/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/3.7.1/include/mmintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/module.modulemap -OLD_FILES+=usr/lib/clang/3.7.1/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/s390intrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/shaintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/smmintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/vadefs.h -OLD_FILES+=usr/lib/clang/3.7.1/include/vecintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/x86intrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/xopintrin.h -OLD_FILES+=usr/lib/clang/3.7.1/include/xtestintrin.h -OLD_DIRS+=usr/lib/clang/3.7.1/include -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-preinit-i386.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.safestack-i386.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.safestack-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone-i386.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/3.7.1/lib/freebsd -OLD_DIRS+=usr/lib/clang/3.7.1/lib -OLD_DIRS+=usr/lib/clang/3.7.1 -OLD_FILES+=usr/share/man/man1/tblgen.1.gz -# 20160301: Remove taskqueue_enqueue_fast -OLD_FILES+=usr/share/man/man9/taskqueue_enqueue_fast.9.gz -# 20160225: Remove casperd and libcapsicum -OLD_FILES+=sbin/casperd -OLD_FILES+=etc/rc.d/casperd -OLD_FILES+=usr/share/man/man8/casperd.8.gz -OLD_FILES+=usr/include/libcapsicum.h -OLD_FILES+=usr/include/libcapsicum_service.h -OLD_FILES+=usr/include/libcapsicum.h -OLD_FILES+=usr/share/man/man3/libcapsicum.3.gz -OLD_FILES+=usr/include/libcapsicum_dns.h -OLD_FILES+=usr/include/libcapsicum_grp.h -OLD_FILES+=usr/include/libcapsicum_impl.h -OLD_FILES+=usr/include/libcapsicum_pwd.h -OLD_FILES+=usr/include/libcapsicum_random.h -OLD_FILES+=usr/include/libcapsicum_sysctl.h -OLD_FILES+=libexec/casper/dns -OLD_FILES+=libexec/casper/grp -OLD_FILES+=libexec/casper/pwd -OLD_FILES+=libexec/casper/random -OLD_FILES+=libexec/casper/sysctl -OLD_FILES+=libexec/casper/.debug/random.debug -OLD_FILES+=libexec/casper/.debug/dns.debug -OLD_FILES+=libexec/casper/.debug/sysctl.debug -OLD_FILES+=libexec/casper/.debug/pwd.debug -OLD_FILES+=libexec/casper/.debug/grp.debug -OLD_DIRS+=libexec/casper/.debug -OLD_DIRS+=libexec/casper -OLD_FILES+=usr/lib/libcapsicum.a -OLD_FILES+=usr/lib/libcapsicum.so -OLD_LIBS+=lib/libcapsicum.so.0 -OLD_FILES+=usr/lib/libcapsicum_p.a -# 20160223: functionality from mkulzma(1) merged into mkuzip(1) -OLD_FILES+=usr/bin/mkulzma -OLD_FILES+=usr/share/man/man4/geom_uncompress.4.gz -OLD_FILES+=usr/share/man/man8/mkulzma.8.gz -# 20160211: Remove obsolete unbound-control-setup -OLD_FILES+=usr/sbin/unbound-control-setup -# 20160121: cc.h moved -OLD_FILES+=usr/include/netinet/cc.h -# 20160116: Update mandoc to cvs snapshot 20160116 -OLD_FILES+=usr/share/mdocml/example.style.css -OLD_FILES+=usr/share/mdocml/style.css -OLD_DIRS+=usr/share/mdocml -# 20160114: SA-16:06.snmpd -OLD_FILES+=usr/share/examples/etc/snmpd.config -# 20160107: GNU ld installed as ld.bfd and linked as ld -OLD_FILES+=usr/lib/debug/usr/bin/ld.debug -# 20151225: new clang import which bumps version from 3.7.0 to 3.7.1 -OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/allocator_interface.h -OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/asan_interface.h -OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/common_interface_defs.h -OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/coverage_interface.h -OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/dfsan_interface.h -OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/linux_syscall_hooks.h -OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/lsan_interface.h -OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/msan_interface.h -OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/tsan_interface_atomic.h -OLD_DIRS+=usr/lib/clang/3.7.0/include/sanitizer -OLD_FILES+=usr/lib/clang/3.7.0/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/3.7.0/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/3.7.0/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/3.7.0/include/adxintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/altivec.h -OLD_FILES+=usr/lib/clang/3.7.0/include/ammintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/arm_acle.h -OLD_FILES+=usr/lib/clang/3.7.0/include/arm_neon.h -OLD_FILES+=usr/lib/clang/3.7.0/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/avx512cdintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/avx512dqintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/avx512vldqintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/avxintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/cpuid.h -OLD_FILES+=usr/lib/clang/3.7.0/include/cuda_builtin_vars.h -OLD_FILES+=usr/lib/clang/3.7.0/include/emmintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/fxsrintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/htmintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/htmxlintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/immintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/3.7.0/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/3.7.0/include/mmintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/module.modulemap -OLD_FILES+=usr/lib/clang/3.7.0/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/s390intrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/shaintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/smmintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/vadefs.h -OLD_FILES+=usr/lib/clang/3.7.0/include/vecintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/x86intrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/xopintrin.h -OLD_FILES+=usr/lib/clang/3.7.0/include/xtestintrin.h -OLD_DIRS+=usr/lib/clang/3.7.0/include -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-preinit-i386.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.safestack-i386.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.safestack-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/3.7.0/lib/freebsd -OLD_DIRS+=usr/lib/clang/3.7.0/lib -OLD_DIRS+=usr/lib/clang/3.7.0 -# 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406) -MOVED_LIBS+=usr/lib/libelf.so.2 -# 20151115: Fox bad upgrade scheme -OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 -OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 -OLD_FILES+=usr/share/locale/zh_CN.GBK/zh_Hans_CN.GBK -OLD_FILES+=usr/share/locale/zh_CN.UTF-8/zh_Hans_CN.UTF-8 -OLD_FILES+=usr/share/locale/zh_CN.eucCN/zh_Hans_CN.eucCN -OLD_FILES+=usr/share/locale/zh_TW.Big5/zh_Hant_TW.Big5 -OLD_FILES+=usr/share/locale/zh_TW.UTF-8/zh_Hant_TW.UTF-8 -# 20151107: String collation improvements -OLD_FILES+=usr/share/locale/UTF-8/LC_CTYPE -OLD_DIRS+=usr/share/locale/UTF-8 -OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_COLLATE -OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_CTYPE -OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_MESSAGES -OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_MONETARY -OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_NUMERIC -OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_TIME -OLD_DIRS+=usr/share/locale/kk_KZ.PT154/ -OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_COLLATE -OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_CTYPE -OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_TIME -OLD_DIRS+=usr/share/locale/la_LN.ISO8859-1 -OLD_FILES+=usr/share/locale/la_LN.ISO8859-13/LC_COLLATE -OLD_FILES+=usr/share/locale/la_LN.ISO8859-13/LC_CTYPE -OLD_DIRS+=usr/share/locale/la_LN.ISO8859-13 -OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_COLLATE -OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_CTYPE -OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_TIME -OLD_DIRS+=usr/share/locale/la_LN.ISO8859-15 -OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_COLLATE -OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_CTYPE -OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_TIME -OLD_DIRS+=usr/share/locale/la_LN.ISO8859-2 -OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_COLLATE -OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_CTYPE -OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_TIME -OLD_DIRS+=usr/share/locale/la_LN.ISO8859-4 -OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_COLLATE -OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_CTYPE -OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_TIME -OLD_DIRS+=usr/share/locale/la_LN.US-ASCII -OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_MESSAGES -OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_TIME -OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_COLLATE -OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_MONETARY -OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_CTYPE -OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_NUMERIC -OLD_DIRS+=usr/share/locale/lt_LT.ISO8859-4 -OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_COLLATE -OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_CTYPE -OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_MESSAGES -OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_MONETARY -OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_NUMERIC -OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_TIME -OLD_DIRS+=usr/share/locale/no_NO.ISO8859-1 -OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_COLLATE -OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_CTYPE -OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_MESSAGES -OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_MONETARY -OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_NUMERIC -OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_TIME -OLD_DIRS+=usr/share/locale/no_NO.ISO8859-15 -OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_MESSAGES -OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_TIME -OLD_DIRS+=usr/share/locale/no_NO.UTF-8 -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_COLLATE -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_TIME -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_CTYPE -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_MESSAGES -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_NUMERIC -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_MONETARY -OLD_DIRS+=usr/share/locale/sr_YU.ISO8859-2 -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_COLLATE -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_MONETARY -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_NUMERIC -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_CTYPE -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_TIME -OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_MESSAGES -OLD_DIRS+=usr/share/locale/sr_YU.ISO8859-5 -OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_TIME -OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_MESSAGES -OLD_DIRS+=usr/share/locale/sr_YU.UTF-8 -# 20151101: added missing _test suffix on multiple tests in lib/libc -OLD_FILES+=usr/tests/lib/libc/c063/faccessat -OLD_FILES+=usr/tests/lib/libc/c063/fchmodat -OLD_FILES+=usr/tests/lib/libc/c063/fchownat -OLD_FILES+=usr/tests/lib/libc/c063/fexecve -OLD_FILES+=usr/tests/lib/libc/c063/fstatat -OLD_FILES+=usr/tests/lib/libc/c063/linkat -OLD_FILES+=usr/tests/lib/libc/c063/mkdirat -OLD_FILES+=usr/tests/lib/libc/c063/mkfifoat -OLD_FILES+=usr/tests/lib/libc/c063/mknodat -OLD_FILES+=usr/tests/lib/libc/c063/openat -OLD_FILES+=usr/tests/lib/libc/c063/readlinkat -OLD_FILES+=usr/tests/lib/libc/c063/renameat -OLD_FILES+=usr/tests/lib/libc/c063/symlinkat -OLD_FILES+=usr/tests/lib/libc/c063/unlinkat -OLD_FILES+=usr/tests/lib/libc/c063/utimensat -OLD_FILES+=usr/tests/lib/libc/string/memchr -OLD_FILES+=usr/tests/lib/libc/string/memcpy -OLD_FILES+=usr/tests/lib/libc/string/memmem -OLD_FILES+=usr/tests/lib/libc/string/memset -OLD_FILES+=usr/tests/lib/libc/string/strcat -OLD_FILES+=usr/tests/lib/libc/string/strchr -OLD_FILES+=usr/tests/lib/libc/string/strcmp -OLD_FILES+=usr/tests/lib/libc/string/strcpy -OLD_FILES+=usr/tests/lib/libc/string/strcspn -OLD_FILES+=usr/tests/lib/libc/string/strerror -OLD_FILES+=usr/tests/lib/libc/string/strlen -OLD_FILES+=usr/tests/lib/libc/string/strpbrk -OLD_FILES+=usr/tests/lib/libc/string/strrchr -OLD_FILES+=usr/tests/lib/libc/string/strspn -OLD_FILES+=usr/tests/lib/libc/string/swab -# 20151101: 430.status-rwho was renamed to 430.status-uptime -OLD_FILES+=etc/periodic/daily/430.status-rwho -# 20151030: OpenSSL 1.0.2d import -OLD_FILES+=usr/share/openssl/man/man3/CMS_set1_signer_certs.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_ctrl.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_ctrl_str.3.gz -OLD_FILES+=usr/share/openssl/man/man3/d2i_509_CRL_fp.3.gz -OLD_LIBS+=lib/libcrypto.so.7 -OLD_LIBS+=usr/lib/libssl.so.7 -# 20151029: LinuxKPI moved to sys/compat/linuxkpi -OLD_FILES+=usr/include/dev/usb/usb_compat_linux.h -# 20151015: test symbols moved to /usr/lib/debug -OLD_DIRS+=usr/tests/lib/atf/libatf-c++/.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/atf_c++_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/build_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/check_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/config_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/macros_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/tests_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/utils_test.debug -OLD_DIRS+=usr/tests/lib/atf/libatf-c++/detail/.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/application_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/env_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/exceptions_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/fs_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/process_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/sanity_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/text_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/version_helper.debug -OLD_DIRS+=usr/tests/lib/atf/libatf-c/.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/atf_c_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/build_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/check_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/config_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/error_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/macros_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/tc_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/tp_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/utils_test.debug -OLD_DIRS+=usr/tests/lib/atf/libatf-c/detail/.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/dynstr_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/env_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/fs_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/list_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/map_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/process_helpers.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/process_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/sanity_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/text_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/user_test.debug -OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/version_helper.debug -OLD_DIRS+=usr/tests/lib/atf/test-programs/.debug -OLD_FILES+=usr/tests/lib/atf/test-programs/.debug/c_helpers.debug -OLD_FILES+=usr/tests/lib/atf/test-programs/.debug/cpp_helpers.debug -OLD_DIRS+=usr/tests/lib/libc/c063/.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/faccessat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/fchmodat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/fchownat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/fexecve.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/fstatat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/linkat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/mkdirat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/mkfifoat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/mknodat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/openat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/readlinkat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/renameat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/symlinkat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/unlinkat.debug -OLD_FILES+=usr/tests/lib/libc/c063/.debug/utimensat.debug -OLD_DIRS+=usr/tests/lib/libc/db/.debug -OLD_FILES+=usr/tests/lib/libc/db/.debug/h_db.debug -OLD_DIRS+=usr/tests/lib/libc/gen/.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/alarm_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/arc4random_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/assert_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/basedirname_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/dir_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/floatunditf_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/fnmatch_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpclassify2_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpclassify_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpsetmask_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpsetround_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/ftok_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/getcwd_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/getgrent_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/glob_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/humanize_number_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/isnan_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/nice_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/pause_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/raise_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/realpath_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/setdomainname_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/sethostname_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/sleep_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/syslog_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/time_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/ttyname_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/.debug/vis_test.debug -OLD_DIRS+=usr/tests/lib/libc/gen/execve/.debug -OLD_FILES+=usr/tests/lib/libc/gen/execve/.debug/execve_test.debug -OLD_DIRS+=usr/tests/lib/libc/gen/posix_spawn/.debug -OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/fileactions_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/h_fileactions.debug -OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/h_spawn.debug -OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/h_spawnattr.debug -OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/spawn_test.debug -OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/spawnattr_test.debug -OLD_DIRS+=usr/tests/lib/libc/hash/.debug -OLD_FILES+=usr/tests/lib/libc/hash/.debug/h_hash.debug -OLD_FILES+=usr/tests/lib/libc/hash/.debug/sha2_test.debug -OLD_DIRS+=usr/tests/lib/libc/inet/.debug -OLD_FILES+=usr/tests/lib/libc/inet/.debug/inet_network_test.debug -OLD_DIRS+=usr/tests/lib/libc/locale/.debug -OLD_FILES+=usr/tests/lib/libc/locale/.debug/io_test.debug -OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbrtowc_test.debug -OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbsnrtowcs_test.debug -OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbstowcs_test.debug -OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbtowc_test.debug -OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcscspn_test.debug -OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcspbrk_test.debug -OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcsspn_test.debug -OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcstod_test.debug -OLD_FILES+=usr/tests/lib/libc/locale/.debug/wctomb_test.debug -OLD_DIRS+=usr/tests/lib/libc/net/.debug -OLD_FILES+=usr/tests/lib/libc/net/.debug/ether_aton_test.debug -OLD_FILES+=usr/tests/lib/libc/net/.debug/getprotoent_test.debug -OLD_FILES+=usr/tests/lib/libc/net/.debug/h_dns_server.debug -OLD_FILES+=usr/tests/lib/libc/net/.debug/h_nsd_recurse.debug -OLD_FILES+=usr/tests/lib/libc/net/.debug/h_protoent.debug -OLD_FILES+=usr/tests/lib/libc/net/.debug/h_servent.debug -OLD_DIRS+=usr/tests/lib/libc/regex/.debug -OLD_FILES+=usr/tests/lib/libc/regex/.debug/exhaust_test.debug -OLD_FILES+=usr/tests/lib/libc/regex/.debug/h_regex.debug -OLD_FILES+=usr/tests/lib/libc/regex/.debug/regex_att_test.debug -OLD_DIRS+=usr/tests/lib/libc/ssp/.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_fgets.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_getcwd.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_gets.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_memcpy.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_memmove.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_memset.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_raw.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_read.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_readlink.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_snprintf.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_sprintf.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_stpcpy.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_stpncpy.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strcat.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strcpy.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strncat.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strncpy.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_vsnprintf.debug -OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_vsprintf.debug -OLD_DIRS+=usr/tests/lib/libc/stdio/.debug -OLD_FILES+=usr/tests/lib/libc/stdio/.debug/clearerr_test.debug -OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fflush_test.debug -OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fmemopen2_test.debug -OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fmemopen_test.debug -OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fopen_test.debug -OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fputc_test.debug -OLD_FILES+=usr/tests/lib/libc/stdio/.debug/mktemp_test.debug -OLD_FILES+=usr/tests/lib/libc/stdio/.debug/popen_test.debug -OLD_FILES+=usr/tests/lib/libc/stdio/.debug/printf_test.debug -OLD_FILES+=usr/tests/lib/libc/stdio/.debug/scanf_test.debug -OLD_DIRS+=usr/tests/lib/libc/stdlib/.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/abs_test.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/atoi_test.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/div_test.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/exit_test.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/getenv_test.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/h_getopt.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/h_getopt_long.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/hsearch_test.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/posix_memalign_test.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/random_test.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/strtod_test.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/strtol_test.debug -OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/system_test.debug -OLD_DIRS+=usr/tests/lib/libc/string/.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/memchr.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/memcpy.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/memmem.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/memset.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/strcat.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/strchr.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/strcmp.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/strcpy.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/strcspn.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/strerror.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/strlen.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/strpbrk.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/strrchr.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/strspn.debug -OLD_FILES+=usr/tests/lib/libc/string/.debug/swab.debug -OLD_DIRS+=usr/tests/lib/libc/sys/.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/access_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/chroot_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/clock_gettime_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/connect_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/dup_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/fsync_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/getcontext_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/getgroups_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/getitimer_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/getlogin_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/getpid_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/getrusage_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/getsid_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/gettimeofday_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/issetugid_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/kevent_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/kill_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/link_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/listen_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/mincore_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/mkdir_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/mkfifo_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/mknod_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/mlock_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/mmap_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/mprotect_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgctl_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgget_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgrcv_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgsnd_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/msync_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/nanosleep_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/pipe2_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/pipe_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/poll_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/revoke_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/select_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/setrlimit_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/setuid_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/sigaction_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/sigqueue_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/sigtimedwait_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/socketpair_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/stat_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/timer_create_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/truncate_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/ucontext_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/umask_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/unlink_test.debug -OLD_FILES+=usr/tests/lib/libc/sys/.debug/write_test.debug -OLD_DIRS+=usr/tests/lib/libc/termios/.debug -OLD_FILES+=usr/tests/lib/libc/termios/.debug/tcsetpgrp_test.debug -OLD_DIRS+=usr/tests/lib/libc/tls/.debug -OLD_FILES+=usr/tests/lib/libc/tls/.debug/h_tls_dlopen.so.debug -OLD_FILES+=usr/tests/lib/libc/tls/.debug/libh_tls_dynamic.so.1.debug -OLD_FILES+=usr/tests/lib/libc/tls/.debug/tls_dlopen_test.debug -OLD_FILES+=usr/tests/lib/libc/tls/.debug/tls_dynamic_test.debug -OLD_DIRS+=usr/tests/lib/libc/ttyio/.debug -OLD_FILES+=usr/tests/lib/libc/ttyio/.debug/ttyio_test.debug -OLD_DIRS+=usr/tests/lib/libcrypt/.debug -OLD_FILES+=usr/tests/lib/libcrypt/.debug/crypt_tests.debug -OLD_DIRS+=usr/tests/lib/libmp/.debug -OLD_FILES+=usr/tests/lib/libmp/.debug/legacy_test.debug -OLD_DIRS+=usr/tests/lib/libnv/.debug -OLD_FILES+=usr/tests/lib/libnv/.debug/dnv_tests.debug -OLD_FILES+=usr/tests/lib/libnv/.debug/nv_array_tests.debug -OLD_FILES+=usr/tests/lib/libnv/.debug/nv_tests.debug -OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_add_test.debug -OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_exists_test.debug -OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_free_test.debug -OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_get_test.debug -OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_move_test.debug -OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_send_recv_test.debug -OLD_DIRS+=usr/tests/lib/libpam/.debug -OLD_FILES+=usr/tests/lib/libpam/.debug/t_openpam_ctype.debug -OLD_FILES+=usr/tests/lib/libpam/.debug/t_openpam_readlinev.debug -OLD_FILES+=usr/tests/lib/libpam/.debug/t_openpam_readword.debug -OLD_DIRS+=usr/tests/lib/libproc/.debug -OLD_FILES+=usr/tests/lib/libproc/.debug/proc_test.debug -OLD_FILES+=usr/tests/lib/libproc/.debug/target_prog.debug -OLD_DIRS+=usr/tests/lib/librt/.debug -OLD_FILES+=usr/tests/lib/librt/.debug/sched_test.debug -OLD_FILES+=usr/tests/lib/librt/.debug/sem_test.debug -OLD_DIRS+=usr/tests/lib/libthr/.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/barrier_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/cond_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/condwait_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/detach_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/equal_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/fork_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/fpu_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/h_atexit.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/h_cancel.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/h_exit.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/h_resolv.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/join_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/kill_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/mutex_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/once_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/preempt_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/rwlock_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/sem_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/siglongjmp_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/sigmask_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/sigsuspend_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/sleep_test.debug -OLD_FILES+=usr/tests/lib/libthr/.debug/swapcontext_test.debug -OLD_DIRS+=usr/tests/lib/libthr/dlopen/.debug -OLD_FILES+=usr/tests/lib/libthr/dlopen/.debug/dlopen_test.debug -OLD_FILES+=usr/tests/lib/libthr/dlopen/.debug/h_pthread_dlopen.so.1.debug -OLD_FILES+=usr/tests/lib/libthr/dlopen/.debug/main_pthread_create_test.debug -OLD_DIRS+=usr/tests/lib/libutil/.debug -OLD_FILES+=usr/tests/lib/libutil/.debug/flopen_test.debug -OLD_FILES+=usr/tests/lib/libutil/.debug/grp_test.debug -OLD_FILES+=usr/tests/lib/libutil/.debug/humanize_number_test.debug -OLD_FILES+=usr/tests/lib/libutil/.debug/pidfile_test.debug -OLD_FILES+=usr/tests/lib/libutil/.debug/trimdomain-nodomain_test.debug -OLD_FILES+=usr/tests/lib/libutil/.debug/trimdomain_test.debug -OLD_DIRS+=usr/tests/lib/libxo/.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/libenc_test.so.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/test_01.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/test_02.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/test_03.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/test_04.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/test_05.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/test_06.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/test_07.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/test_08.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/test_09.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/test_10.debug -OLD_FILES+=usr/tests/lib/libxo/.debug/test_11.debug -OLD_DIRS+=usr/tests/lib/msun/.debug -OLD_FILES+=usr/tests/lib/msun/.debug/acos_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/asin_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/atan_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/cbrt_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/ceil_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/cos_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/cosh_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/erf_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/exp_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/fmod_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/infinity_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/ldexp_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/log_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/pow_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/precision_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/round_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/scalbn_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/sin_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/sinh_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/sqrt_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/tan_test.debug -OLD_FILES+=usr/tests/lib/msun/.debug/tanh_test.debug -OLD_DIRS+=usr/tests/libexec/rtld-elf/.debug -OLD_FILES+=usr/tests/libexec/rtld-elf/.debug/ld_library_pathfds.debug -OLD_FILES+=usr/tests/libexec/rtld-elf/.debug/libpythagoras.so.0.debug -OLD_FILES+=usr/tests/libexec/rtld-elf/.debug/target.debug -OLD_DIRS+=usr/tests/sbin/devd/.debug -OLD_FILES+=usr/tests/sbin/devd/.debug/client_test.debug -OLD_DIRS+=usr/tests/sbin/dhclient/.debug -OLD_FILES+=usr/tests/sbin/dhclient/.debug/option-domain-search_test.debug -OLD_DIRS+=usr/tests/share/examples/tests/atf/.debug -OLD_FILES+=usr/tests/share/examples/tests/atf/.debug/printf_test.debug -OLD_DIRS+=usr/tests/share/examples/tests/plain/.debug -OLD_FILES+=usr/tests/share/examples/tests/plain/.debug/printf_test.debug -OLD_DIRS+=usr/tests/sys/aio/.debug -OLD_FILES+=usr/tests/sys/aio/.debug/aio_kqueue_test.debug -OLD_FILES+=usr/tests/sys/aio/.debug/aio_test.debug -OLD_FILES+=usr/tests/sys/aio/.debug/lio_kqueue_test.debug -OLD_DIRS+=usr/tests/sys/fifo/.debug -OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_create.debug -OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_io.debug -OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_misc.debug -OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_open.debug -OLD_DIRS+=usr/tests/sys/file/.debug -OLD_FILES+=usr/tests/sys/file/.debug/closefrom_test.debug -OLD_FILES+=usr/tests/sys/file/.debug/dup_test.debug -OLD_FILES+=usr/tests/sys/file/.debug/fcntlflags_test.debug -OLD_FILES+=usr/tests/sys/file/.debug/flock_helper.debug -OLD_FILES+=usr/tests/sys/file/.debug/ftruncate_test.debug -OLD_FILES+=usr/tests/sys/file/.debug/newfileops_on_fork_test.debug -OLD_DIRS+=usr/tests/sys/kern/.debug -OLD_FILES+=usr/tests/sys/kern/.debug/kern_descrip_test.debug -OLD_FILES+=usr/tests/sys/kern/.debug/ptrace_test.debug -OLD_FILES+=usr/tests/sys/kern/.debug/unix_seqpacket_test.debug -OLD_DIRS+=usr/tests/sys/kern/execve/.debug -OLD_FILES+=usr/tests/sys/kern/execve/.debug/execve_helper.debug -OLD_FILES+=usr/tests/sys/kern/execve/.debug/good_aout.debug -OLD_DIRS+=usr/tests/sys/kqueue/.debug -OLD_FILES+=usr/tests/sys/kqueue/.debug/kqtest.debug -OLD_DIRS+=usr/tests/sys/mqueue/.debug -OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest1.debug -OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest2.debug -OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest3.debug -OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest4.debug -OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest5.debug -OLD_DIRS+=usr/tests/sys/netinet/.debug -OLD_FILES+=usr/tests/sys/netinet/.debug/udp_dontroute.debug -OLD_DIRS+=usr/tests/sys/pjdfstest/.debug -OLD_FILES+=usr/tests/sys/pjdfstest/.debug/pjdfstest.debug -OLD_DIRS+=usr/tests/sys/vm/.debug -OLD_FILES+=usr/tests/sys/vm/.debug/mmap_test.debug -# 20151015: Rename files due to file-installed-as-dir bug -OLD_FILES+=usr/share/doc/legal/realtek -OLD_FILES+=usr/share/doc/legal/realtek/LICENSE -OLD_DIRS+=usr/share/doc/legal/realtek -OLD_DIRS+=usr/share/doc/legal/intel_ipw -OLD_FILES+=usr/share/doc/legal/intel_ipw/LICENSE -OLD_FILES+=usr/share/doc/legal/intel_iwn -OLD_FILES+=usr/share/doc/legal/intel_iwn/LICENSE -OLD_DIRS+=usr/share/doc/legal/intel_iwn -OLD_DIRS+=usr/share/doc/legal/intel_iwi -OLD_FILES+=usr/share/doc/legal/intel_iwi/LICENSE -OLD_DIRS+=usr/share/doc/legal/intel_wpi -OLD_FILES+=usr/share/doc/legal/intel_wpi/LICENSE -# 20151006: new libc++ import -OLD_FILES+=usr/include/c++/__tuple_03 -OLD_FILES+=usr/include/c++/v1/__tuple_03 -OLD_FILES+=usr/include/c++/v1/tr1/__tuple_03 -# 20151006: new clang import which bumps version from 3.6.1 to 3.7.0 -OLD_FILES+=usr/lib/clang/3.6.1/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/3.6.1/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/3.6.1/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/3.6.1/include/adxintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/altivec.h -OLD_FILES+=usr/lib/clang/3.6.1/include/ammintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/arm_acle.h -OLD_FILES+=usr/lib/clang/3.6.1/include/arm_neon.h -OLD_FILES+=usr/lib/clang/3.6.1/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/avxintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/cpuid.h -OLD_FILES+=usr/lib/clang/3.6.1/include/emmintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/immintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/3.6.1/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/3.6.1/include/mmintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/module.modulemap -OLD_FILES+=usr/lib/clang/3.6.1/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/shaintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/smmintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/x86intrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/3.6.1/include/xopintrin.h -OLD_DIRS+=usr/lib/clang/3.6.1/include -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.san-i386.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.san-x86_64.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan-i386.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan-x86_64.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/3.6.1/lib/freebsd -OLD_DIRS+=usr/lib/clang/3.6.1/lib -OLD_DIRS+=usr/lib/clang/3.6.1 -# 20150928: unused sgsmsg utility is removed -OLD_FILES+=usr/bin/sgsmsg -# 20150926: remove links to removed/unimplemented mbuf(9) macros -OLD_FILES+=usr/share/man/man9/MEXT_ADD_REF.9.gz -OLD_FILES+=usr/share/man/man9/MEXTFREE.9.gz -OLD_FILES+=usr/share/man/man9/MEXT_IS_REF.9.gz -OLD_FILES+=usr/share/man/man9/MEXT_REM_REF.9.gz -OLD_FILES+=usr/share/man/man9/MFREE.9.gz -# 20150818: *allocm() are gone in jemalloc 4.0.0 -OLD_FILES+=usr/share/man/man3/allocm.3.gz -OLD_FILES+=usr/share/man/man3/dallocm.3.gz -OLD_FILES+=usr/share/man/man3/nallocm.3.gz -OLD_FILES+=usr/share/man/man3/rallocm.3.gz -OLD_FILES+=usr/share/man/man3/sallocm.3.gz -# 20150802: Remove netbsd's test on pw(8) -OLD_FILES+=usr/tests/usr.sbin/pw/pw_test -# 20150719: Remove libarchive.pc -OLD_FILES+=usr/libdata/pkgconfig/libarchive.pc -# 20150705: Rename DTrace provider man pages -OLD_FILES+=usr/share/man/man4/dtrace-io.4.gz -OLD_FILES+=usr/share/man/man4/dtrace-ip.4.gz -OLD_FILES+=usr/share/man/man4/dtrace-proc.4.gz -OLD_FILES+=usr/share/man/man4/dtrace-sched.4.gz -OLD_FILES+=usr/share/man/man4/dtrace-tcp.4.gz -OLD_FILES+=usr/share/man/man4/dtrace-udp.4.gz -# 20150704: nvlist private headers no longer installed -OLD_FILES+=usr/include/sys/nv_impl.h -OLD_FILES+=usr/include/sys/nvlist_impl.h -OLD_FILES+=usr/include/sys/nvpair_impl.h -# 20150624 -OLD_LIBS+=usr/lib/libugidfw.so.4 -# 20150604: Move nvlist man pages to section 9 -OLD_FILES+=usr/share/man/man3/libnv.3.gz -OLD_FILES+=usr/share/man/man3/nv.3.gz -OLD_FILES+=usr/share/man/man3/nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_add_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_add_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_add_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_add_null.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_add_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_add_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_add_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_add_stringf.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_add_stringv.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_clone.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_create.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_destroy.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_dump.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_empty.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_error.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_exists.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_exists_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_exists_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_exists_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_exists_null.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_exists_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_exists_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_exists_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_exists_type.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_fdump.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_flags.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_free.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_free_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_free_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_free_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_free_null.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_free_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_free_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_free_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_free_type.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_get_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_get_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_get_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_get_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_get_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_get_parent.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_get_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_move_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_move_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_move_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_move_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_next.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_pack.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_recv.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_send.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_set_error.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_size.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_take_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_take_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_take_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_take_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_take_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_take_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_unpack.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_xfer.3.gz -# 20150702: Remove duplicated nvlist includes -OLD_FILES+=usr/include/dnv.h -OLD_FILES+=usr/include/nv.h -# 20150528: PCI IOV device driver methods moved to a separate kobj interface -OLD_FILES+=usr/share/man/man9/PCI_ADD_VF.9.gz -OLD_FILES+=usr/share/man/man9/PCI_INIT_IOV.9.gz -OLD_FILES+=usr/share/man/man9/PCI_UNINIT_IOV.9.gz -# 20150525: new clang import which bumps version from 3.6.0 to 3.6.1 -OLD_FILES+=usr/lib/clang/3.6.0/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/3.6.0/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/3.6.0/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/3.6.0/include/adxintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/altivec.h -OLD_FILES+=usr/lib/clang/3.6.0/include/ammintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/arm_acle.h -OLD_FILES+=usr/lib/clang/3.6.0/include/arm_neon.h -OLD_FILES+=usr/lib/clang/3.6.0/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/avxintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/cpuid.h -OLD_FILES+=usr/lib/clang/3.6.0/include/emmintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/immintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/3.6.0/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/3.6.0/include/mmintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/module.modulemap -OLD_FILES+=usr/lib/clang/3.6.0/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/shaintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/smmintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/x86intrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/3.6.0/include/xopintrin.h -OLD_DIRS+=usr/lib/clang/3.6.0/include -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.san-i386.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.san-x86_64.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan-i386.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan-x86_64.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/3.6.0/lib/freebsd -OLD_DIRS+=usr/lib/clang/3.6.0/lib -OLD_DIRS+=usr/lib/clang/3.6.0 -# 20150521 -OLD_FILES+=usr/bin/demandoc -OLD_FILES+=usr/share/man/man1/demandoc.1.gz -OLD_FILES+=usr/share/man/man3/mandoc.3.gz -OLD_FILES+=usr/share/man/man3/mandoc_headers.3.gz -# 20150520 -OLD_FILES+=usr/lib/libheimsqlite.a -OLD_FILES+=usr/lib/libheimsqlite.so -OLD_LIBS+=usr/lib/libheimsqlite.so.11 -OLD_FILES+=usr/lib/libheimsqlite_p.a -# 20150506 -OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz -# 20150504 -OLD_FILES+=usr/share/examples/etc/libmap32.conf -OLD_FILES+=usr/include/bsdstat.h -OLD_DIRS+=usr/lib32/private -OLD_LIBS+=usr/lib/private/libatf-c++.so.2 -OLD_LIBS+=usr/lib/private/libbsdstat.so.1 -OLD_LIBS+=usr/lib/private/libheimipcs.so.11 -OLD_LIBS+=usr/lib/private/libsqlite3.so.0 -OLD_LIBS+=usr/lib/private/libunbound.so.5 -OLD_LIBS+=usr/lib/private/libatf-c.so.1 -OLD_LIBS+=usr/lib/private/libheimipcc.so.11 -OLD_LIBS+=usr/lib/private/libldns.so.5 -OLD_LIBS+=usr/lib/private/libssh.so.5 -OLD_LIBS+=usr/lib/private/libucl.so.1 -OLD_DIRS+=usr/lib/private -# 20150501 -OLD_FILES+=usr/bin/soeliminate -OLD_FILES+=usr/share/man/man1/soeliminate.1.gz -# 20150501: Remove the nvlist_.*[vf] functions manpages -OLD_FILES+=usr/share/man/man3/nvlist_addf_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addf_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addf_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addf_null.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addf_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addf_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addf_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addv_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addv_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addv_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addv_null.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addv_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addv_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_addv_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsf.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsf_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsf_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsf_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsf_null.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsf_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsf_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsf_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsf_type.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsv.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsv_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsv_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsv_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsv_null.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsv_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsv_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsv_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_existsv_type.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freef.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freef_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freef_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freef_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freef_null.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freef_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freef_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freef_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freef_type.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freev.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freev_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freev_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freev_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freev_null.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freev_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freev_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freev_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_freev_type.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getf_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getf_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getf_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getf_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getf_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getf_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getv_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getv_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getv_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getv_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getv_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_getv_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_movef_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_movef_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_movef_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_movef_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_movev_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_movev_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_movev_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_movev_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takef_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takef_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takef_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takef_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takef_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takef_string.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takev_binary.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takev_bool.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takev_descriptor.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takev_number.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takev_nvlist.3.gz -OLD_FILES+=usr/share/man/man3/nvlist_takev_string.3.gz -# 20150429: remove never written documentation -OLD_FILES+=usr/share/doc/papers/hwpmc.ascii.gz -# 20150427: test/sys/kern/mmap_test moved to test/sys/vm/mmap_test -OLD_FILES+=usr/tests/sys/kern/mmap_test -# 20150422: zlib.c moved from net to libkern -OLD_FILES+=usr/include/net/zlib.h -OLD_FILES+=usr/include/net/zutil.h -# 20150418 -OLD_FILES+=sbin/mount_oldnfs -OLD_FILES+=usr/share/man/man8/mount_oldnfs.8.gz -# 20150416: ALTQ moved to net/altq -OLD_FILES+=usr/include/altq/altq_rmclass_debug.h -OLD_FILES+=usr/include/altq/altq.h -OLD_FILES+=usr/include/altq/altq_cdnr.h -OLD_FILES+=usr/include/altq/altq_hfsc.h -OLD_FILES+=usr/include/altq/altq_priq.h -OLD_FILES+=usr/include/altq/altqconf.h -OLD_FILES+=usr/include/altq/altq_classq.h -OLD_FILES+=usr/include/altq/altq_red.h -OLD_FILES+=usr/include/altq/if_altq.h -OLD_FILES+=usr/include/altq/altq_var.h -OLD_FILES+=usr/include/altq/altq_rmclass.h -OLD_FILES+=usr/include/altq/altq_cbq.h -OLD_FILES+=usr/include/altq/altq_rio.h -OLD_DIRS+=usr/include/altq -# 20150330: ntp 4.2.8p1 -OLD_FILES+=usr/share/doc/ntp/driver1.html -OLD_FILES+=usr/share/doc/ntp/driver10.html -OLD_FILES+=usr/share/doc/ntp/driver11.html -OLD_FILES+=usr/share/doc/ntp/driver12.html -OLD_FILES+=usr/share/doc/ntp/driver16.html -OLD_FILES+=usr/share/doc/ntp/driver18.html -OLD_FILES+=usr/share/doc/ntp/driver19.html -OLD_FILES+=usr/share/doc/ntp/driver2.html -OLD_FILES+=usr/share/doc/ntp/driver20.html -OLD_FILES+=usr/share/doc/ntp/driver22.html -OLD_FILES+=usr/share/doc/ntp/driver26.html -OLD_FILES+=usr/share/doc/ntp/driver27.html -OLD_FILES+=usr/share/doc/ntp/driver28.html -OLD_FILES+=usr/share/doc/ntp/driver29.html -OLD_FILES+=usr/share/doc/ntp/driver3.html -OLD_FILES+=usr/share/doc/ntp/driver30.html -OLD_FILES+=usr/share/doc/ntp/driver32.html -OLD_FILES+=usr/share/doc/ntp/driver33.html -OLD_FILES+=usr/share/doc/ntp/driver34.html -OLD_FILES+=usr/share/doc/ntp/driver35.html -OLD_FILES+=usr/share/doc/ntp/driver36.html -OLD_FILES+=usr/share/doc/ntp/driver37.html -OLD_FILES+=usr/share/doc/ntp/driver4.html -OLD_FILES+=usr/share/doc/ntp/driver5.html -OLD_FILES+=usr/share/doc/ntp/driver6.html -OLD_FILES+=usr/share/doc/ntp/driver7.html -OLD_FILES+=usr/share/doc/ntp/driver8.html -OLD_FILES+=usr/share/doc/ntp/driver9.html -OLD_FILES+=usr/share/doc/ntp/ldisc.html -OLD_FILES+=usr/share/doc/ntp/measure.html -OLD_FILES+=usr/share/doc/ntp/mx4200data.html -OLD_FILES+=usr/share/doc/ntp/notes.html -OLD_FILES+=usr/share/doc/ntp/patches.html -OLD_FILES+=usr/share/doc/ntp/porting.html -OLD_FILES+=usr/share/man/man1/sntp.1.gz -# 20150329 -.if ${TARGET_ARCH} == "arm" -OLD_FILES+=usr/include/bootconfig.h -.endif -# 20150326 -OLD_FILES+=usr/share/man/man1/pmcstudy.1.gz -# 20150315: new clang import which bumps version from 3.5.1 to 3.6.0 -OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_aes.h -OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_pclmul.h -OLD_FILES+=usr/include/clang/3.5.1/altivec.h -OLD_FILES+=usr/include/clang/3.5.1/ammintrin.h -OLD_FILES+=usr/include/clang/3.5.1/arm_acle.h -OLD_FILES+=usr/include/clang/3.5.1/arm_neon.h -OLD_FILES+=usr/include/clang/3.5.1/avx2intrin.h -OLD_FILES+=usr/include/clang/3.5.1/avxintrin.h -OLD_FILES+=usr/include/clang/3.5.1/bmi2intrin.h -OLD_FILES+=usr/include/clang/3.5.1/bmiintrin.h -OLD_FILES+=usr/include/clang/3.5.1/cpuid.h -OLD_FILES+=usr/include/clang/3.5.1/emmintrin.h -OLD_FILES+=usr/include/clang/3.5.1/f16cintrin.h -OLD_FILES+=usr/include/clang/3.5.1/fma4intrin.h -OLD_FILES+=usr/include/clang/3.5.1/fmaintrin.h -OLD_FILES+=usr/include/clang/3.5.1/ia32intrin.h -OLD_FILES+=usr/include/clang/3.5.1/immintrin.h -OLD_FILES+=usr/include/clang/3.5.1/lzcntintrin.h -OLD_FILES+=usr/include/clang/3.5.1/mm3dnow.h -OLD_FILES+=usr/include/clang/3.5.1/mm_malloc.h -OLD_FILES+=usr/include/clang/3.5.1/mmintrin.h -OLD_FILES+=usr/include/clang/3.5.1/module.modulemap -OLD_FILES+=usr/include/clang/3.5.1/nmmintrin.h -OLD_FILES+=usr/include/clang/3.5.1/pmmintrin.h -OLD_FILES+=usr/include/clang/3.5.1/popcntintrin.h -OLD_FILES+=usr/include/clang/3.5.1/prfchwintrin.h -OLD_FILES+=usr/include/clang/3.5.1/rdseedintrin.h -OLD_FILES+=usr/include/clang/3.5.1/rtmintrin.h -OLD_FILES+=usr/include/clang/3.5.1/shaintrin.h -OLD_FILES+=usr/include/clang/3.5.1/smmintrin.h -OLD_FILES+=usr/include/clang/3.5.1/tbmintrin.h -OLD_FILES+=usr/include/clang/3.5.1/tmmintrin.h -OLD_FILES+=usr/include/clang/3.5.1/wmmintrin.h -OLD_FILES+=usr/include/clang/3.5.1/x86intrin.h -OLD_FILES+=usr/include/clang/3.5.1/xmmintrin.h -OLD_FILES+=usr/include/clang/3.5.1/xopintrin.h -OLD_DIRS+=usr/include/clang/3.5.1 -OLD_DIRS+=usr/include/clang -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.san-i386.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.san-x86_64.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan-i386.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan-x86_64.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/3.5.1/lib/freebsd -OLD_DIRS+=usr/lib/clang/3.5.1/lib -OLD_DIRS+=usr/lib/clang/3.5.1 -# 20150302: binutils documentation distributed as a manpage -OLD_FILES+=usr/share/doc/binutils/as.txt -OLD_FILES+=usr/share/doc/binutils/ld.txt -OLD_DIRS+=usr/share/doc/binutils -# 20150222: Removed bcd(6) and ppt(6) -OLD_FILES+=usr/bin/bcd -OLD_FILES+=usr/bin/ppt -OLD_FILES+=usr/share/man/man6/bcd.6.gz -OLD_FILES+=usr/share/man/man6/ppt.6.gz -# 20150217: Removed remnants of ar(4) driver -OLD_FILES+=usr/include/dev/ic/hd64570.h -# 20150212: /usr/games moving into /usr/bin -OLD_FILES+=usr/games/bcd -OLD_FILES+=usr/games/caesar -OLD_FILES+=usr/games/factor -OLD_FILES+=usr/games/fortune -OLD_FILES+=usr/games/grdc -OLD_FILES+=usr/games/morse -OLD_FILES+=usr/games/number -OLD_FILES+=usr/games/pom -OLD_FILES+=usr/games/ppt -OLD_FILES+=usr/games/primes -OLD_FILES+=usr/games/random -OLD_FILES+=usr/games/rot13 -OLD_FILES+=usr/games/strfile -OLD_FILES+=usr/games/unstr -OLD_DIRS+=usr/games -# 20150209: liblzma header -OLD_FILES+=usr/include/lzma/lzma.h -# 20150124: spl.9 and friends -OLD_FILES+=usr/share/man/man9/spl.9.gz -OLD_FILES+=usr/share/man/man9/spl0.9.gz -OLD_FILES+=usr/share/man/man9/splbio.9.gz -OLD_FILES+=usr/share/man/man9/splclock.9.gz -OLD_FILES+=usr/share/man/man9/splhigh.9.gz -OLD_FILES+=usr/share/man/man9/splimp.9.gz -OLD_FILES+=usr/share/man/man9/splnet.9.gz -OLD_FILES+=usr/share/man/man9/splsoftclock.9.gz -OLD_FILES+=usr/share/man/man9/splsofttty.9.gz -OLD_FILES+=usr/share/man/man9/splstatclock.9.gz -OLD_FILES+=usr/share/man/man9/spltty.9.gz -OLD_FILES+=usr/share/man/man9/splvm.9.gz -OLD_FILES+=usr/share/man/man9/splx.9.gz -# 20150118: toeplitz.c moved from netinet to net -OLD_FILES+=usr/include/netinet/toeplitz.h -# 20150118: new clang import which bumps version from 3.5.0 to 3.5.1 -OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_aes.h -OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_pclmul.h -OLD_FILES+=usr/include/clang/3.5.0/altivec.h -OLD_FILES+=usr/include/clang/3.5.0/ammintrin.h -OLD_FILES+=usr/include/clang/3.5.0/arm_acle.h -OLD_FILES+=usr/include/clang/3.5.0/arm_neon.h -OLD_FILES+=usr/include/clang/3.5.0/avx2intrin.h -OLD_FILES+=usr/include/clang/3.5.0/avxintrin.h -OLD_FILES+=usr/include/clang/3.5.0/bmi2intrin.h -OLD_FILES+=usr/include/clang/3.5.0/bmiintrin.h -OLD_FILES+=usr/include/clang/3.5.0/cpuid.h -OLD_FILES+=usr/include/clang/3.5.0/emmintrin.h -OLD_FILES+=usr/include/clang/3.5.0/f16cintrin.h -OLD_FILES+=usr/include/clang/3.5.0/fma4intrin.h -OLD_FILES+=usr/include/clang/3.5.0/fmaintrin.h -OLD_FILES+=usr/include/clang/3.5.0/ia32intrin.h -OLD_FILES+=usr/include/clang/3.5.0/immintrin.h -OLD_FILES+=usr/include/clang/3.5.0/lzcntintrin.h -OLD_FILES+=usr/include/clang/3.5.0/mm3dnow.h -OLD_FILES+=usr/include/clang/3.5.0/mm_malloc.h -OLD_FILES+=usr/include/clang/3.5.0/mmintrin.h -OLD_FILES+=usr/include/clang/3.5.0/module.modulemap -OLD_FILES+=usr/include/clang/3.5.0/nmmintrin.h -OLD_FILES+=usr/include/clang/3.5.0/pmmintrin.h -OLD_FILES+=usr/include/clang/3.5.0/popcntintrin.h -OLD_FILES+=usr/include/clang/3.5.0/prfchwintrin.h -OLD_FILES+=usr/include/clang/3.5.0/rdseedintrin.h -OLD_FILES+=usr/include/clang/3.5.0/rtmintrin.h -OLD_FILES+=usr/include/clang/3.5.0/shaintrin.h -OLD_FILES+=usr/include/clang/3.5.0/smmintrin.h -OLD_FILES+=usr/include/clang/3.5.0/tbmintrin.h -OLD_FILES+=usr/include/clang/3.5.0/tmmintrin.h -OLD_FILES+=usr/include/clang/3.5.0/wmmintrin.h -OLD_FILES+=usr/include/clang/3.5.0/x86intrin.h -OLD_FILES+=usr/include/clang/3.5.0/xmmintrin.h -OLD_FILES+=usr/include/clang/3.5.0/xopintrin.h -OLD_DIRS+=usr/include/clang/3.5.0 -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-i386.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-x86_64.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-i386.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-x86_64.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-i386.a -OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/3.5.0/lib/freebsd -OLD_DIRS+=usr/lib/clang/3.5.0/lib -OLD_DIRS+=usr/lib/clang/3.5.0 -# 20150102: removal of asr(4) -OLD_FILES+=usr/share/man/man4/asr.4.gz -# 20150102: removal of texinfo -OLD_FILES+=usr/bin/info -OLD_FILES+=usr/bin/infokey -OLD_FILES+=usr/bin/install-info -OLD_FILES+=usr/bin/makeinfo -OLD_FILES+=usr/bin/texindex -OLD_FILES+=usr/share/info/am-utils.info.gz -OLD_FILES+=usr/share/info/as.info.gz -OLD_FILES+=usr/share/info/binutils.info.gz -OLD_FILES+=usr/share/info/com_err.info.gz -OLD_FILES+=usr/share/info/cpp.info.gz -OLD_FILES+=usr/share/info/cppinternals.info.gz -OLD_FILES+=usr/share/info/diff.info.gz -OLD_FILES+=usr/share/info/dir -OLD_FILES+=usr/share/info/gcc.info.gz -OLD_FILES+=usr/share/info/gccint.info.gz -OLD_FILES+=usr/share/info/gdb.info.gz -OLD_FILES+=usr/share/info/gdbint.info.gz -OLD_FILES+=usr/share/info/gperf.info.gz -OLD_FILES+=usr/share/info/grep.info.gz -OLD_FILES+=usr/share/info/groff.info.gz -OLD_FILES+=usr/share/info/heimdal.info.gz -OLD_FILES+=usr/share/info/history.info.gz -OLD_FILES+=usr/share/info/info-stnd.info.gz -OLD_FILES+=usr/share/info/info.info.gz -OLD_FILES+=usr/share/info/ld.info.gz -OLD_FILES+=usr/share/info/regex.info.gz -OLD_FILES+=usr/share/info/rluserman.info.gz -OLD_FILES+=usr/share/info/stabs.info.gz -OLD_FILES+=usr/share/info/texinfo.info.gz -OLD_FILES+=usr/share/man/man1/info.1.gz -OLD_FILES+=usr/share/man/man1/infokey.1.gz -OLD_FILES+=usr/share/man/man1/install-info.1.gz -OLD_FILES+=usr/share/man/man1/makeinfo.1.gz -OLD_FILES+=usr/share/man/man1/texindex.1.gz -OLD_FILES+=usr/share/man/man5/info.5.gz -OLD_FILES+=usr/share/man/man5/texinfo.5.gz -OLD_DIRS+=usr/share/info -# 20141231: new clang import which bumps version from 3.4.1 to 3.5.0 -OLD_FILES+=usr/include/clang/3.4.1/__wmmintrin_aes.h -OLD_FILES+=usr/include/clang/3.4.1/__wmmintrin_pclmul.h -OLD_FILES+=usr/include/clang/3.4.1/altivec.h -OLD_FILES+=usr/include/clang/3.4.1/ammintrin.h -OLD_FILES+=usr/include/clang/3.4.1/arm_neon.h -OLD_FILES+=usr/include/clang/3.4.1/avx2intrin.h -OLD_FILES+=usr/include/clang/3.4.1/avxintrin.h -OLD_FILES+=usr/include/clang/3.4.1/bmi2intrin.h -OLD_FILES+=usr/include/clang/3.4.1/bmiintrin.h -OLD_FILES+=usr/include/clang/3.4.1/cpuid.h -OLD_FILES+=usr/include/clang/3.4.1/emmintrin.h -OLD_FILES+=usr/include/clang/3.4.1/f16cintrin.h -OLD_FILES+=usr/include/clang/3.4.1/fma4intrin.h -OLD_FILES+=usr/include/clang/3.4.1/fmaintrin.h -OLD_FILES+=usr/include/clang/3.4.1/immintrin.h -OLD_FILES+=usr/include/clang/3.4.1/lzcntintrin.h -OLD_FILES+=usr/include/clang/3.4.1/mm3dnow.h -OLD_FILES+=usr/include/clang/3.4.1/mm_malloc.h -OLD_FILES+=usr/include/clang/3.4.1/mmintrin.h -OLD_FILES+=usr/include/clang/3.4.1/module.map -OLD_FILES+=usr/include/clang/3.4.1/nmmintrin.h -OLD_FILES+=usr/include/clang/3.4.1/pmmintrin.h -OLD_FILES+=usr/include/clang/3.4.1/popcntintrin.h -OLD_FILES+=usr/include/clang/3.4.1/prfchwintrin.h -OLD_FILES+=usr/include/clang/3.4.1/rdseedintrin.h -OLD_FILES+=usr/include/clang/3.4.1/rtmintrin.h -OLD_FILES+=usr/include/clang/3.4.1/shaintrin.h -OLD_FILES+=usr/include/clang/3.4.1/smmintrin.h -OLD_FILES+=usr/include/clang/3.4.1/tbmintrin.h -OLD_FILES+=usr/include/clang/3.4.1/tmmintrin.h -OLD_FILES+=usr/include/clang/3.4.1/wmmintrin.h -OLD_FILES+=usr/include/clang/3.4.1/x86intrin.h -OLD_FILES+=usr/include/clang/3.4.1/xmmintrin.h -OLD_FILES+=usr/include/clang/3.4.1/xopintrin.h -OLD_DIRS+=usr/include/clang/3.4.1 -# 20141225: Remove gpib/ieee488 -OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h -OLD_FILES+=usr/include/dev/ieee488/tnt4882.h -OLD_FILES+=usr/include/dev/ieee488/ugpib.h -OLD_FILES+=usr/include/dev/ieee488/upd7210.h -OLD_DIRS+=usr/include/dev/ieee488 -OLD_FILES+=usr/include/gpib/gpib.h -OLD_DIRS+=usr/include/gpib -OLD_FILES+=usr/lib/libgpib.a -OLD_FILES+=usr/lib/libgpib_p.a -OLD_FILES+=usr/lib/libgpib.so -OLD_LIBS+=usr/lib/libgpib.so.3 -OLD_FILES+=usr/share/man/man3/gpib.3.gz -OLD_FILES+=usr/share/man/man3/ibclr.3.gz -OLD_FILES+=usr/share/man/man3/ibdev.3.gz -OLD_FILES+=usr/share/man/man3/ibdma.3.gz -OLD_FILES+=usr/share/man/man3/ibeos.3.gz -OLD_FILES+=usr/share/man/man3/ibeot.3.gz -OLD_FILES+=usr/share/man/man3/ibloc.3.gz -OLD_FILES+=usr/share/man/man3/ibonl.3.gz -OLD_FILES+=usr/share/man/man3/ibpad.3.gz -OLD_FILES+=usr/share/man/man3/ibrd.3.gz -OLD_FILES+=usr/share/man/man3/ibsad.3.gz -OLD_FILES+=usr/share/man/man3/ibsic.3.gz -OLD_FILES+=usr/share/man/man3/ibtmo.3.gz -OLD_FILES+=usr/share/man/man3/ibtrg.3.gz -OLD_FILES+=usr/share/man/man3/ibwrt.3.gz -OLD_FILES+=usr/share/man/man4/gpib.4.gz -OLD_FILES+=usr/share/man/man4/pcii.4.gz -OLD_FILES+=usr/share/man/man4/tnt4882.4.gz -# 20141224: libxo moved to /lib -MOVED_LIBS+=usr/lib/libxo.so.0 -# 20141223: remove in6_gif.h and in_gif.h -OLD_FILES+=usr/include/netinet/in_gif.h -OLD_FILES+=usr/include/netinet6/in6_gif.h -# 20141209: pw tests broken into a file per command -OLD_FILES+=usr/tests/usr.sbin/pw/pw_delete -OLD_FILES+=usr/tests/usr.sbin/pw/pw_modify -# 20141202: update to mandoc CVS 20141201 -OLD_FILES+=usr.bin/preconv -OLD_FILES+=usr/share/man/man1/preconv.1.gz -# 20141129: mrouted rc.d scripts removed from base -OLD_FILES+=etc/rc.d/mrouted -# 20141126: convert sbin/mdconfig/tests to ATF format tests -OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test -OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test -OLD_FILES+=usr/tests/sbin/mdconfig/run.pl -# 20141126: remove xform_ipip decapsulation fallback -OLD_FILES+=usr/include/netipsec/ipip_var.h -# 20141122: mandoc updated to 1.13.1 -OLD_FILES+=usr/share/mdocml/external.png -# 20141111: SF_KQUEUE code removed -OLD_FILES+=usr/include/sys/sf_base.h -OLD_FILES+=usr/include/sys/sf_sync.h -# 20141109: faith/faithd removal -OLD_FILES+=etc/rc.d/faith -OLD_FILES+=usr/share/man/man4/faith.4.gz -OLD_FILES+=usr/share/man/man4/if_faith.4.gz -OLD_FILES+=usr/sbin/faithd -OLD_FILES+=usr/share/man/man8/faithd.8.gz -# 20141107: overhaul if_gre(4) -OLD_FILES+=usr/include/netinet/ip_gre.h -# 20141102: postrandom obsoleted by new /dev/random code -OLD_FILES+=etc/rc.d/postrandom -# 20141031: initrandom obsoleted by new /dev/random code -OLD_FILES+=etc/rc.d/initrandom -# 20141030: atf 0.21 import -OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz -# 20141028: debug files accidentally installed as directory name -OLD_FILES+=usr/lib/debug/usr/lib/i18n -OLD_FILES+=usr/lib/debug/usr/lib/private -OLD_FILES+=usr/lib/debug/usr/lib32/i18n -OLD_FILES+=usr/lib/debug/usr/lib32/private -# 20141015: OpenSSL 1.0.1j import -OLD_FILES+=usr/share/openssl/man/man3/CMS_sign_add1_signer.3.gz -# 20141003: libproc version bump -OLD_LIBS+=usr/lib/libproc.so.2 -# 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed -OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz -OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz -# 20140917: hv_kvpd rc.d script removed in favor of devd configuration -OLD_FILES+=etc/rc.d/hv_kvpd -# 20140917: libnv was accidentally being installed to /usr/lib instead of /lib -MOVED_LIBS+=usr/lib/libnv.so.0 -# 20140829: rc.d/kerberos removed -OLD_FILES+=etc/rc.d/kerberos -# 20140814: libopie version bump -OLD_LIBS+=usr/lib/libopie.so.7 -# 20140811: otp-sha renamed to otp-sha1 -OLD_FILES+=usr/bin/otp-sha -OLD_FILES+=usr/share/man/man1/otp-sha.1.gz -# 20140807: Remove private lib files that should not be installed -OLD_FILES+=usr/lib/private/libatf-c.a -OLD_FILES+=usr/lib/private/libatf-c.so -OLD_FILES+=usr/lib/private/libatf-c_p.a -OLD_FILES+=usr/lib/private/libatf-c++.a -OLD_FILES+=usr/lib/private/libatf-c++.so -OLD_FILES+=usr/lib/private/libatf-c++_p.a -OLD_FILES+=usr/lib/private/libbsdstat.a -OLD_FILES+=usr/lib/private/libbsdstat.so -OLD_FILES+=usr/lib/private/libbsdstat_p.a -OLD_FILES+=usr/lib/private/libheimipcc.a -OLD_FILES+=usr/lib/private/libheimipcc.so -OLD_FILES+=usr/lib/private/libheimipcc_p.a -OLD_FILES+=usr/lib/private/libheimipcs.a -OLD_FILES+=usr/lib/private/libheimipcs.so -OLD_FILES+=usr/lib/private/libheimipcs_p.a -OLD_FILES+=usr/lib/private/libldns.a -OLD_FILES+=usr/lib/private/libldns.so -OLD_FILES+=usr/lib/private/libldns_p.a -OLD_FILES+=usr/lib/private/libssh.a -OLD_FILES+=usr/lib/private/libssh.so -OLD_FILES+=usr/lib/private/libssh_p.a -OLD_FILES+=usr/lib/private/libunbound.a -OLD_FILES+=usr/lib/private/libunbound.so -OLD_FILES+=usr/lib/private/libunbound_p.a -OLD_FILES+=usr/lib/private/libucl.a -OLD_FILES+=usr/lib/private/libucl.so -OLD_FILES+=usr/lib/private/libucl_p.a -# 20140803: Remove an obsolete man page -OLD_FILES+=usr/share/man/man9/pmap_change_wiring.9.gz -# 20140731 -OLD_FILES+=usr/share/man/man9/SYSCTL_ADD_OID.9.gz -# 20140728: libsbuf restored to old version -OLD_LIBS+=lib/libsbuf.so.7 -# 20140728: Remove an obsolete man page -OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz -OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz -OLD_FILES+=usr/share/man/man9/VOP_DESTROYVOBJECT.9.gz -# 20140723: renamed to PCBGROUP.9 -OLD_FILES+=usr/share/man/man9/PCBGROUPS.9.gz -# 20140722: browse_packages_ftp.sh removed -OLD_FILES+=usr/share/examples/bsdconfig/browse_packages_ftp.sh -# 20140718: Remove obsolete man pages -OLD_FILES+=usr/share/man/man9/zero_copy.9.gz -OLD_FILES+=usr/share/man/man9/zero_copy_sockets.9.gz -# 20140718: Remove an obsolete man page -OLD_FILES+=usr/share/man/man9/pmap_page_protect.9.gz -# 20140717: Remove an obsolete man page -OLD_FILES+=usr/share/man/man9/pmap_clear_reference.9.gz -# 20140716: Remove an incorrectly named man page -OLD_FILES+=usr/share/man/man9/pmap_ts_modified.9.gz -# 20140712: Removal of bsd.dtrace.mk -OLD_FILES+=usr/share/mk/bsd.dtrace.mk -# 20140705: turn libreadline into an internal lib -OLD_LIBS+=lib/libreadline.so.8 -OLD_FILES+=usr/lib/libreadline.a -OLD_FILES+=usr/lib/libreadline_p.a -OLD_FILES+=usr/lib/libreadline.so -OLD_FILES+=usr/lib/libhistory.a -OLD_FILES+=usr/lib/libhistory_p.a -OLD_FILES+=usr/lib/libhistory.so -OLD_LIBS+=usr/lib/libhistory.so.8 -OLD_FILES+=usr/include/readline/chardefs.h -OLD_FILES+=usr/include/readline/history.h -OLD_FILES+=usr/include/readline/keymaps.h -OLD_FILES+=usr/include/readline/readline.h -OLD_FILES+=usr/include/readline/tilde.h -OLD_FILES+=usr/include/readline/rlconf.h -OLD_FILES+=usr/include/readline/rlstdc.h -OLD_FILES+=usr/include/readline/rltypedefs.h -OLD_FILES+=usr/include/readline/rltypedefs.h -OLD_DIRS+=usr/include/readline -OLD_FILES+=usr/share/info/readline.info.gz -OLD_FILES+=usr/share/man/man3/readline.3.gz -OLD_FILES+=usr/share/man/man3/rlhistory.3.gz -# 20140625: csup removal -OLD_FILES+=usr/bin/csup -OLD_FILES+=usr/bin/cpasswd -OLD_FILES+=usr/share/man/man1/csup.1.gz -OLD_FILES+=usr/share/man/man1/cpasswd.1.gz -OLD_FILES+=usr/share/examples/cvsup/README -OLD_FILES+=usr/share/examples/cvsup/cvs-supfile -OLD_FILES+=usr/share/examples/cvsup/stable-supfile -OLD_FILES+=usr/share/examples/cvsup/standard-supfile -OLD_DIRS+=usr/share/examples/cvsup -# 20140614: send-pr removal -OLD_FILES+=usr/bin/sendbug -OLD_FILES+=usr/share/info/send-pr.info.gz -OLD_FILES+=usr/share/man/man1/send-pr.1.gz -OLD_FILES+=usr/share/man/man1/sendbug.1.gz -OLD_FILES+=etc/gnats/freefall -OLD_DIRS+=etc/gnats -# 20140512: new clang import which bumps version from 3.4 to 3.4.1 -OLD_FILES+=usr/include/clang/3.4/__wmmintrin_aes.h -OLD_FILES+=usr/include/clang/3.4/__wmmintrin_pclmul.h -OLD_FILES+=usr/include/clang/3.4/altivec.h -OLD_FILES+=usr/include/clang/3.4/ammintrin.h -OLD_FILES+=usr/include/clang/3.4/avx2intrin.h -OLD_FILES+=usr/include/clang/3.4/avxintrin.h -OLD_FILES+=usr/include/clang/3.4/bmi2intrin.h -OLD_FILES+=usr/include/clang/3.4/bmiintrin.h -OLD_FILES+=usr/include/clang/3.4/cpuid.h -OLD_FILES+=usr/include/clang/3.4/emmintrin.h -OLD_FILES+=usr/include/clang/3.4/f16cintrin.h -OLD_FILES+=usr/include/clang/3.4/fma4intrin.h -OLD_FILES+=usr/include/clang/3.4/fmaintrin.h -OLD_FILES+=usr/include/clang/3.4/immintrin.h -OLD_FILES+=usr/include/clang/3.4/lzcntintrin.h -OLD_FILES+=usr/include/clang/3.4/mm3dnow.h -OLD_FILES+=usr/include/clang/3.4/mm_malloc.h -OLD_FILES+=usr/include/clang/3.4/mmintrin.h -OLD_FILES+=usr/include/clang/3.4/module.map -OLD_FILES+=usr/include/clang/3.4/nmmintrin.h -OLD_FILES+=usr/include/clang/3.4/pmmintrin.h -OLD_FILES+=usr/include/clang/3.4/popcntintrin.h -OLD_FILES+=usr/include/clang/3.4/prfchwintrin.h -OLD_FILES+=usr/include/clang/3.4/rdseedintrin.h -OLD_FILES+=usr/include/clang/3.4/rtmintrin.h -OLD_FILES+=usr/include/clang/3.4/shaintrin.h -OLD_FILES+=usr/include/clang/3.4/smmintrin.h -OLD_FILES+=usr/include/clang/3.4/tbmintrin.h -OLD_FILES+=usr/include/clang/3.4/tmmintrin.h -OLD_FILES+=usr/include/clang/3.4/wmmintrin.h -OLD_FILES+=usr/include/clang/3.4/x86intrin.h -OLD_FILES+=usr/include/clang/3.4/xmmintrin.h -OLD_FILES+=usr/include/clang/3.4/xopintrin.h -OLD_FILES+=usr/include/clang/3.4/arm_neon.h -OLD_FILES+=usr/include/clang/3.4/module.map -OLD_DIRS+=usr/include/clang/3.4 -# 20140505: Bogusly installing src.opts.mk -OLD_FILES+=usr/share/mk/src.opts.mk -# 20140505: Reject PR kern/187551 -OLD_FILES+=usr/tests/sbin/ifconfig/fibs_test -# 20140502: Removal of lindev(4) -OLD_FILES+=usr/share/man/man4/lindev.4.gz -# 20140425 -OLD_FILES+=usr/lib/libssp_p.a -OLD_FILES+=usr/lib/libstand_p.a -# 20140314: AppleTalk -OLD_DIRS+=usr/include/netatalk -OLD_FILES+=usr/include/netatalk/aarp.h -OLD_FILES+=usr/include/netatalk/at.h -OLD_FILES+=usr/include/netatalk/at_extern.h -OLD_FILES+=usr/include/netatalk/at_var.h -OLD_FILES+=usr/include/netatalk/ddp.h -OLD_FILES+=usr/include/netatalk/ddp_pcb.h -OLD_FILES+=usr/include/netatalk/ddp_var.h -OLD_FILES+=usr/include/netatalk/endian.h -OLD_FILES+=usr/include/netatalk/phase2.h -# 20140314: Remove IPX/SPX -OLD_LIBS+=lib/libipx.so.5 -OLD_FILES+=usr/include/netipx/ipx.h -OLD_FILES+=usr/include/netipx/ipx_if.h -OLD_FILES+=usr/include/netipx/ipx_pcb.h -OLD_FILES+=usr/include/netipx/ipx_var.h -OLD_FILES+=usr/include/netipx/spx.h -OLD_FILES+=usr/include/netipx/spx_debug.h -OLD_FILES+=usr/include/netipx/spx_timer.h -OLD_FILES+=usr/include/netipx/spx_var.h -OLD_DIRS+=usr/include/netipx -OLD_FILES+=usr/lib/libipx.a -OLD_FILES+=usr/lib/libipx.so -OLD_FILES+=usr/lib/libipx_p.a -OLD_FILES+=usr/sbin/IPXrouted -OLD_FILES+=usr/share/man/man3/ipx.3.gz -OLD_FILES+=usr/share/man/man3/ipx_addr.3.gz -OLD_FILES+=usr/share/man/man3/ipx_ntoa.3.gz -OLD_FILES+=usr/share/man/man4/ef.4.gz -OLD_FILES+=usr/share/man/man4/if_ef.4.gz -OLD_FILES+=usr/share/man/man8/IPXrouted.8.gz -# 20140314: bsdconfig usermgmt rewrite -OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/userinput -# 20140307: bsdconfig groupmgmt rewrite -OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/groupinput -# 20140223: Remove libyaml -OLD_FILES+=usr/lib/private/libyaml.a -OLD_FILES+=usr/lib/private/libyaml.so -OLD_LIBS+=usr/lib/private/libyaml.so.1 -OLD_FILES+=usr/lib/private/libyaml_p.a -# 20140216: new clang import which bumps version from 3.3 to 3.4 -OLD_FILES+=usr/bin/llvm-prof -OLD_FILES+=usr/include/clang/3.3/__wmmintrin_aes.h -OLD_FILES+=usr/include/clang/3.3/__wmmintrin_pclmul.h -OLD_FILES+=usr/include/clang/3.3/altivec.h -OLD_FILES+=usr/include/clang/3.3/ammintrin.h -OLD_FILES+=usr/include/clang/3.3/avx2intrin.h -OLD_FILES+=usr/include/clang/3.3/avxintrin.h -OLD_FILES+=usr/include/clang/3.3/bmi2intrin.h -OLD_FILES+=usr/include/clang/3.3/bmiintrin.h -OLD_FILES+=usr/include/clang/3.3/cpuid.h -OLD_FILES+=usr/include/clang/3.3/emmintrin.h -OLD_FILES+=usr/include/clang/3.3/f16cintrin.h -OLD_FILES+=usr/include/clang/3.3/fma4intrin.h -OLD_FILES+=usr/include/clang/3.3/fmaintrin.h -OLD_FILES+=usr/include/clang/3.3/immintrin.h -OLD_FILES+=usr/include/clang/3.3/lzcntintrin.h -OLD_FILES+=usr/include/clang/3.3/mm3dnow.h -OLD_FILES+=usr/include/clang/3.3/mm_malloc.h -OLD_FILES+=usr/include/clang/3.3/mmintrin.h -OLD_FILES+=usr/include/clang/3.3/module.map -OLD_FILES+=usr/include/clang/3.3/nmmintrin.h -OLD_FILES+=usr/include/clang/3.3/pmmintrin.h -OLD_FILES+=usr/include/clang/3.3/popcntintrin.h -OLD_FILES+=usr/include/clang/3.3/prfchwintrin.h -OLD_FILES+=usr/include/clang/3.3/rdseedintrin.h -OLD_FILES+=usr/include/clang/3.3/rtmintrin.h -OLD_FILES+=usr/include/clang/3.3/smmintrin.h -OLD_FILES+=usr/include/clang/3.3/tmmintrin.h -OLD_FILES+=usr/include/clang/3.3/wmmintrin.h -OLD_FILES+=usr/include/clang/3.3/x86intrin.h -OLD_FILES+=usr/include/clang/3.3/xmmintrin.h -OLD_FILES+=usr/include/clang/3.3/xopintrin.h -OLD_FILES+=usr/share/man/man1/llvm-prof.1.gz -OLD_DIRS+=usr/include/clang/3.3 -# 20140216: nve(4) removed -OLD_FILES+=usr/share/man/man4/if_nve.4.gz -OLD_FILES+=usr/share/man/man4/nve.4.gz -# 20140205: Open Firmware device moved -OLD_FILES+=usr/include/dev/ofw/ofw_nexus.h -# 20140128: libelf and libdwarf import -OLD_LIBS+=usr/lib/libelf.so.1 -OLD_LIBS+=usr/lib/libdwarf.so.3 -# 20140123: apicvar header moved to x86 -OLD_FILES+=usr/include/machine/apicvar.h -# 20131215: libcam version bumped -OLD_LIBS+=lib/libcam.so.6 -# 20131202: libcapsicum and libcasper moved to /lib/ -MOVED_LIBS+=usr/lib/libcapsicum.so.0 -MOVED_LIBS+=usr/lib/libcasper.so.0 -# 20131109: extattr(2) mlinks fixed -OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz -OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz -# 20131107: example files removed -OLD_FILES+=usr/share/examples/libusb20/aux.c -OLD_FILES+=usr/share/examples/libusb20/aux.h -# 20131103: WITH_LIBICONV_COMPAT removal -OLD_FILES+=usr/include/_libiconv_compat.h -OLD_FILES+=usr/lib/libiconv.a -OLD_FILES+=usr/lib/libiconv.so -OLD_LIBS+=usr/lib/libiconv.so.3 -OLD_FILES+=usr/lib/libiconv_p.a -# 20131103: removal of utxrm(8), use 'utx rm' instead -OLD_FILES+=usr/sbin/utxrm -OLD_FILES+=usr/share/man/man8/utxrm.8.gz -# 20131031: pkg_install has been removed -OLD_FILES+=etc/periodic/daily/220.backup-pkgdb -OLD_FILES+=etc/periodic/daily/490.status-pkg-changes -OLD_FILES+=etc/periodic/security/460.chkportsum -OLD_FILES+=etc/periodic/weekly/400.status-pkg -OLD_FILES+=usr/sbin/pkg_add -OLD_FILES+=usr/sbin/pkg_create -OLD_FILES+=usr/sbin/pkg_delete -OLD_FILES+=usr/sbin/pkg_info -OLD_FILES+=usr/sbin/pkg_updating -OLD_FILES+=usr/sbin/pkg_version -OLD_FILES+=usr/share/man/man1/pkg_add.1.gz -OLD_FILES+=usr/share/man/man1/pkg_create.1.gz -OLD_FILES+=usr/share/man/man1/pkg_delete.1.gz -OLD_FILES+=usr/share/man/man1/pkg_info.1.gz -OLD_FILES+=usr/share/man/man1/pkg_updating.1.gz -OLD_FILES+=usr/share/man/man1/pkg_version.1.gz -# 20131030: /etc/keys moved to /usr/share/keys -OLD_DIRS+=etc/keys -OLD_DIRS+=etc/keys/pkg -OLD_DIRS+=etc/keys/pkg/revoked -OLD_DIRS+=etc/keys/pkg/trusted -OLD_FILES+=etc/keys/pkg/trusted/pkg.freebsd.org.2013102301 -# 20131028: ng_fec(4) removed -OLD_FILES+=usr/include/netgraph/ng_fec.h -OLD_FILES+=usr/share/man/man4/ng_fec.4.gz -# 20131027: header moved -OLD_FILES+=usr/include/net/pf_mtag.h -# 20131023: remove never used iscsi directory -OLD_DIRS+=usr/share/examples/iscsi -# 20131021: isf(4) removed -OLD_FILES+=usr/sbin/isfctl -OLD_FILES+=usr/share/man/man4/isf.4.gz -OLD_FILES+=usr/share/man/man8/isfctl.8.gz -# 20131014: libbsdyml becomes private -OLD_FILES+=usr/lib/libbsdyml.a -OLD_FILES+=usr/lib/libbsdyml.so -OLD_LIBS+=usr/lib/libbsdyml.so.0 -OLD_FILES+=usr/lib/libbsdyml_p.a -OLD_FILES+=usr/share/man/man3/libbsdyml.3.gz -OLD_FILES+=usr/include/bsdyml.h -# 20131013: Removal of the ATF tools -OLD_FILES+=etc/atf/FreeBSD.conf -OLD_FILES+=etc/atf/atf-run.hooks -OLD_FILES+=etc/atf/common.conf -OLD_FILES+=usr/bin/atf-config -OLD_FILES+=usr/bin/atf-report -OLD_FILES+=usr/bin/atf-run -OLD_FILES+=usr/bin/atf-version -OLD_FILES+=usr/share/atf/atf-run.hooks -OLD_FILES+=usr/share/examples/atf/atf-run.hooks -OLD_FILES+=usr/share/examples/atf/tests-results.css -OLD_FILES+=usr/share/man/man1/atf-config.1.gz -OLD_FILES+=usr/share/man/man1/atf-report.1.gz -OLD_FILES+=usr/share/man/man1/atf-run.1.gz -OLD_FILES+=usr/share/man/man1/atf-version.1.gz -OLD_FILES+=usr/share/man/man5/atf-formats.5.gz -OLD_FILES+=usr/share/xml/atf/tests-results.dtd -OLD_FILES+=usr/share/xsl/atf/tests-results.xsl -OLD_DIRS+=etc/atf -OLD_DIRS+=usr/share/examples/atf -OLD_DIRS+=usr/share/xml/atf -OLD_DIRS+=usr/share/xml -OLD_DIRS+=usr/share/xsl/atf -OLD_DIRS+=usr/share/xsl -# 20131009: freebsd-version moved from /libexec to /bin -OLD_FILES+=libexec/freebsd-version -# 20131001: ar and ranlib from binutils not used -OLD_FILES+=usr/bin/gnu-ar -OLD_FILES+=usr/bin/gnu-ranlib -OLD_FILES+=usr/share/man/man1/gnu-ar.1.gz -OLD_FILES+=usr/share/man/man1/gnu-ranlib.1.gz -# 20130930: BIND removed from base -OLD_FILES+=etc/mtree/BIND.chroot.dist -OLD_FILES+=etc/namedb -OLD_FILES+=etc/periodic/daily/470.status-named -OLD_FILES+=usr/bin/dig -OLD_FILES+=usr/bin/nslookup -OLD_FILES+=usr/bin/nsupdate -OLD_DIRS+=usr/include/lwres -OLD_FILES+=usr/include/lwres/context.h -OLD_FILES+=usr/include/lwres/int.h -OLD_FILES+=usr/include/lwres/ipv6.h -OLD_FILES+=usr/include/lwres/lang.h -OLD_FILES+=usr/include/lwres/list.h -OLD_FILES+=usr/include/lwres/lwbuffer.h -OLD_FILES+=usr/include/lwres/lwpacket.h -OLD_FILES+=usr/include/lwres/lwres.h -OLD_FILES+=usr/include/lwres/net.h -OLD_FILES+=usr/include/lwres/netdb.h -OLD_FILES+=usr/include/lwres/platform.h -OLD_FILES+=usr/include/lwres/result.h -OLD_FILES+=usr/include/lwres/string.h -OLD_FILES+=usr/include/lwres/version.h -OLD_FILES+=usr/lib/liblwres.a -OLD_FILES+=usr/lib/liblwres.so -OLD_LIBS+=usr/lib/liblwres.so.90 -OLD_FILES+=usr/lib/liblwres_p.a -OLD_FILES+=usr/sbin/arpaname -OLD_FILES+=usr/sbin/ddns-confgen -OLD_FILES+=usr/sbin/dnssec-dsfromkey -OLD_FILES+=usr/sbin/dnssec-keyfromlabel -OLD_FILES+=usr/sbin/dnssec-keygen -OLD_FILES+=usr/sbin/dnssec-revoke -OLD_FILES+=usr/sbin/dnssec-settime -OLD_FILES+=usr/sbin/dnssec-signzone -OLD_FILES+=usr/sbin/dnssec-verify -OLD_FILES+=usr/sbin/genrandom -OLD_FILES+=usr/sbin/isc-hmac-fixup -OLD_FILES+=usr/sbin/lwresd -OLD_FILES+=usr/sbin/named -OLD_FILES+=usr/sbin/named-checkconf -OLD_FILES+=usr/sbin/named-checkzone -OLD_FILES+=usr/sbin/named-compilezone -OLD_FILES+=usr/sbin/named-journalprint -OLD_FILES+=usr/sbin/named.reconfig -OLD_FILES+=usr/sbin/named.reload -OLD_FILES+=usr/sbin/nsec3hash -OLD_FILES+=usr/sbin/rndc -OLD_FILES+=usr/sbin/rndc-confgen -OLD_DIRS+=usr/share/doc/bind9 -OLD_FILES+=usr/share/doc/bind9/CHANGES -OLD_FILES+=usr/share/doc/bind9/COPYRIGHT -OLD_FILES+=usr/share/doc/bind9/FAQ -OLD_FILES+=usr/share/doc/bind9/HISTORY -OLD_FILES+=usr/share/doc/bind9/README -OLD_DIRS+=usr/share/doc/bind9/arm -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch01.html -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch02.html -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch03.html -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch04.html -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch05.html -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch06.html -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch07.html -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch08.html -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch09.html -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch10.html -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.html -OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.pdf -OLD_FILES+=usr/share/doc/bind9/arm/man.arpaname.html -OLD_FILES+=usr/share/doc/bind9/arm/man.ddns-confgen.html -OLD_FILES+=usr/share/doc/bind9/arm/man.dig.html -OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-dsfromkey.html -OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-keyfromlabel.html -OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-keygen.html -OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-revoke.html -OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-settime.html -OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-signzone.html -OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-verify.html -OLD_FILES+=usr/share/doc/bind9/arm/man.genrandom.html -OLD_FILES+=usr/share/doc/bind9/arm/man.host.html -OLD_FILES+=usr/share/doc/bind9/arm/man.isc-hmac-fixup.html -OLD_FILES+=usr/share/doc/bind9/arm/man.named-checkconf.html -OLD_FILES+=usr/share/doc/bind9/arm/man.named-checkzone.html -OLD_FILES+=usr/share/doc/bind9/arm/man.named-journalprint.html -OLD_FILES+=usr/share/doc/bind9/arm/man.named.html -OLD_FILES+=usr/share/doc/bind9/arm/man.nsec3hash.html -OLD_FILES+=usr/share/doc/bind9/arm/man.nsupdate.html -OLD_FILES+=usr/share/doc/bind9/arm/man.rndc-confgen.html -OLD_FILES+=usr/share/doc/bind9/arm/man.rndc.conf.html -OLD_FILES+=usr/share/doc/bind9/arm/man.rndc.html -OLD_DIRS+=usr/share/doc/bind9/misc -OLD_FILES+=usr/share/doc/bind9/misc/dnssec -OLD_FILES+=usr/share/doc/bind9/misc/format-options.pl -OLD_FILES+=usr/share/doc/bind9/misc/ipv6 -OLD_FILES+=usr/share/doc/bind9/misc/migration -OLD_FILES+=usr/share/doc/bind9/misc/migration-4to9 -OLD_FILES+=usr/share/doc/bind9/misc/options -OLD_FILES+=usr/share/doc/bind9/misc/rfc-compliance -OLD_FILES+=usr/share/doc/bind9/misc/roadmap -OLD_FILES+=usr/share/doc/bind9/misc/sdb -OLD_FILES+=usr/share/doc/bind9/misc/sort-options.pl -OLD_FILES+=usr/share/man/man1/arpaname.1.gz -OLD_FILES+=usr/share/man/man1/dig.1.gz -OLD_FILES+=usr/share/man/man1/nslookup.1.gz -OLD_FILES+=usr/share/man/man1/nsupdate.1.gz -OLD_FILES+=usr/share/man/man3/lwres.3.gz -OLD_FILES+=usr/share/man/man3/lwres_addr_parse.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_add.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_back.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_clear.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_first.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_forward.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_getmem.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_getuint16.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_getuint32.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_getuint8.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_init.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_invalidate.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_putmem.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_putuint16.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_putuint32.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_putuint8.3.gz -OLD_FILES+=usr/share/man/man3/lwres_buffer_subtract.3.gz -OLD_FILES+=usr/share/man/man3/lwres_conf_clear.3.gz -OLD_FILES+=usr/share/man/man3/lwres_conf_get.3.gz -OLD_FILES+=usr/share/man/man3/lwres_conf_init.3.gz -OLD_FILES+=usr/share/man/man3/lwres_conf_parse.3.gz -OLD_FILES+=usr/share/man/man3/lwres_conf_print.3.gz -OLD_FILES+=usr/share/man/man3/lwres_config.3.gz -OLD_FILES+=usr/share/man/man3/lwres_context.3.gz -OLD_FILES+=usr/share/man/man3/lwres_context_allocmem.3.gz -OLD_FILES+=usr/share/man/man3/lwres_context_create.3.gz -OLD_FILES+=usr/share/man/man3/lwres_context_destroy.3.gz -OLD_FILES+=usr/share/man/man3/lwres_context_freemem.3.gz -OLD_FILES+=usr/share/man/man3/lwres_context_initserial.3.gz -OLD_FILES+=usr/share/man/man3/lwres_context_nextserial.3.gz -OLD_FILES+=usr/share/man/man3/lwres_context_sendrecv.3.gz -OLD_FILES+=usr/share/man/man3/lwres_endhostent.3.gz -OLD_FILES+=usr/share/man/man3/lwres_endhostent_r.3.gz -OLD_FILES+=usr/share/man/man3/lwres_freeaddrinfo.3.gz -OLD_FILES+=usr/share/man/man3/lwres_freehostent.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gabn.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gabnrequest_free.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gabnrequest_parse.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gabnrequest_render.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gabnresponse_free.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gabnresponse_parse.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gabnresponse_render.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gai_strerror.3.gz -OLD_FILES+=usr/share/man/man3/lwres_getaddrinfo.3.gz -OLD_FILES+=usr/share/man/man3/lwres_getaddrsbyname.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gethostbyaddr.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gethostbyaddr_r.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gethostbyname.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gethostbyname2.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gethostbyname_r.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gethostent.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gethostent_r.3.gz -OLD_FILES+=usr/share/man/man3/lwres_getipnode.3.gz -OLD_FILES+=usr/share/man/man3/lwres_getipnodebyaddr.3.gz -OLD_FILES+=usr/share/man/man3/lwres_getipnodebyname.3.gz -OLD_FILES+=usr/share/man/man3/lwres_getnamebyaddr.3.gz -OLD_FILES+=usr/share/man/man3/lwres_getnameinfo.3.gz -OLD_FILES+=usr/share/man/man3/lwres_getrrsetbyname.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gnba.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gnbarequest_free.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gnbarequest_parse.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gnbarequest_render.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gnbaresponse_free.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gnbaresponse_parse.3.gz -OLD_FILES+=usr/share/man/man3/lwres_gnbaresponse_render.3.gz -OLD_FILES+=usr/share/man/man3/lwres_herror.3.gz -OLD_FILES+=usr/share/man/man3/lwres_hstrerror.3.gz -OLD_FILES+=usr/share/man/man3/lwres_inetntop.3.gz -OLD_FILES+=usr/share/man/man3/lwres_lwpacket_parseheader.3.gz -OLD_FILES+=usr/share/man/man3/lwres_lwpacket_renderheader.3.gz -OLD_FILES+=usr/share/man/man3/lwres_net_ntop.3.gz -OLD_FILES+=usr/share/man/man3/lwres_noop.3.gz -OLD_FILES+=usr/share/man/man3/lwres_nooprequest_free.3.gz -OLD_FILES+=usr/share/man/man3/lwres_nooprequest_parse.3.gz -OLD_FILES+=usr/share/man/man3/lwres_nooprequest_render.3.gz -OLD_FILES+=usr/share/man/man3/lwres_noopresponse_free.3.gz -OLD_FILES+=usr/share/man/man3/lwres_noopresponse_parse.3.gz -OLD_FILES+=usr/share/man/man3/lwres_noopresponse_render.3.gz -OLD_FILES+=usr/share/man/man3/lwres_packet.3.gz -OLD_FILES+=usr/share/man/man3/lwres_resutil.3.gz -OLD_FILES+=usr/share/man/man3/lwres_sethostent.3.gz -OLD_FILES+=usr/share/man/man3/lwres_sethostent_r.3.gz -OLD_FILES+=usr/share/man/man3/lwres_string_parse.3.gz -OLD_FILES+=usr/share/man/man5/named.conf.5.gz -OLD_FILES+=usr/share/man/man5/rndc.conf.5.gz -OLD_FILES+=usr/share/man/man8/ddns-confgen.8.gz -OLD_FILES+=usr/share/man/man8/dnssec-dsfromkey.8.gz -OLD_FILES+=usr/share/man/man8/dnssec-keyfromlabel.8.gz -OLD_FILES+=usr/share/man/man8/dnssec-keygen.8.gz -OLD_FILES+=usr/share/man/man8/dnssec-revoke.8.gz -OLD_FILES+=usr/share/man/man8/dnssec-settime.8.gz -OLD_FILES+=usr/share/man/man8/dnssec-signzone.8.gz -OLD_FILES+=usr/share/man/man8/dnssec-verify.8.gz -OLD_FILES+=usr/share/man/man8/genrandom.8.gz -OLD_FILES+=usr/share/man/man8/isc-hmac-fixup.8.gz -OLD_FILES+=usr/share/man/man8/lwresd.8.gz -OLD_FILES+=usr/share/man/man8/named-checkconf.8.gz -OLD_FILES+=usr/share/man/man8/named-checkzone.8.gz -OLD_FILES+=usr/share/man/man8/named-compilezone.8.gz -OLD_FILES+=usr/share/man/man8/named-journalprint.8.gz -OLD_FILES+=usr/share/man/man8/named.8.gz -OLD_FILES+=usr/share/man/man8/named.reconfig.8.gz -OLD_FILES+=usr/share/man/man8/named.reload.8.gz -OLD_FILES+=usr/share/man/man8/nsec3hash.8.gz -OLD_FILES+=usr/share/man/man8/rndc-confgen.8.gz -OLD_FILES+=usr/share/man/man8/rndc.8.gz -OLD_DIRS+=var/named/dev -OLD_DIRS+=var/named/etc -OLD_DIRS+=var/named/etc/namedb -OLD_FILES+=var/named/etc/namedb/PROTO.localhost-v6.rev -OLD_FILES+=var/named/etc/namedb/PROTO.localhost.rev -OLD_DIRS+=var/named/etc/namedb/dynamic -OLD_FILES+=var/named/etc/namedb/make-localhost -OLD_DIRS+=var/named/etc/namedb/master -OLD_FILES+=var/named/etc/namedb/master/empty.db -OLD_FILES+=var/named/etc/namedb/master/localhost-forward.db -OLD_FILES+=var/named/etc/namedb/master/localhost-reverse.db -#OLD_FILES+=var/named/etc/namedb/named.conf # intentionally left out -OLD_FILES+=var/named/etc/namedb/named.root -OLD_DIRS+=var/named/etc/namedb/working -OLD_DIRS+=var/named/etc/namedb/slave -OLD_DIRS+=var/named/var -OLD_DIRS+=var/named/var/dump -OLD_DIRS+=var/named/var/log -OLD_DIRS+=var/named/var/run -OLD_DIRS+=var/named/var/run/named -OLD_DIRS+=var/named/var/stats -OLD_DIRS+=var/run/named -# 20130923: example moved -OLD_FILES+=usr/share/examples/bsdconfig/browse_packages.sh -# 20130908: libssh becomes private -OLD_FILES+=usr/lib/libssh.a -OLD_FILES+=usr/lib/libssh.so -OLD_LIBS+=usr/lib/libssh.so.5 -OLD_FILES+=usr/lib/libssh_p.a -# 20130903: gnupatch is no more -OLD_FILES+=usr/bin/gnupatch -OLD_FILES+=usr/share/man/man1/gnupatch.1.gz -# 20130829: bsdpatch is patch unconditionally -OLD_FILES+=usr/bin/bsdpatch -OLD_FILES+=usr/share/man/man1/bsdpatch.1.gz -# 20130822: bind 9.9.3-P2 import -OLD_LIBS+=usr/lib/liblwres.so.80 -# 20130814: vm_page_busy(9) -OLD_FILES+=usr/share/man/man9/vm_page_flash.9.gz -OLD_FILES+=usr/share/man/man9/vm_page_io.9.gz -OLD_FILES+=usr/share/man/man9/vm_page_io_finish.9.gz -OLD_FILES+=usr/share/man/man9/vm_page_io_start.9.gz -OLD_FILES+=usr/share/man/man9/vm_page_wakeup.9.gz -# 20130710: libkvm version bump -OLD_LIBS+=lib/libkvm.so.5 -# 20130623: dialog update from 1.1 to 1.2 -OLD_LIBS+=usr/lib/libdialog.so.7 -# 20130616: vfs_mount.9 removed -OLD_FILES+=usr/share/man/man9/vfs_mount.9.gz -# 20130614: remove CVS from base -OLD_FILES+=usr/bin/cvs -OLD_FILES+=usr/bin/cvsbug -OLD_FILES+=usr/share/doc/psd/28.cvs/paper.ascii.gz -OLD_FILES+=usr/share/doc/psd/28.cvs/paper.ps.gz -OLD_DIRS+=usr/share/doc/psd/28.cvs -OLD_FILES+=usr/share/examples/cvs/contrib/README -OLD_FILES+=usr/share/examples/cvs/contrib/clmerge -OLD_FILES+=usr/share/examples/cvs/contrib/cln_hist -OLD_FILES+=usr/share/examples/cvs/contrib/commit_prep -OLD_FILES+=usr/share/examples/cvs/contrib/cvs2vendor -OLD_FILES+=usr/share/examples/cvs/contrib/cvs_acls -OLD_FILES+=usr/share/examples/cvs/contrib/cvscheck -OLD_FILES+=usr/share/examples/cvs/contrib/cvscheck.man -OLD_FILES+=usr/share/examples/cvs/contrib/cvshelp.man -OLD_FILES+=usr/share/examples/cvs/contrib/descend.man -OLD_FILES+=usr/share/examples/cvs/contrib/easy-import -OLD_FILES+=usr/share/examples/cvs/contrib/intro.doc -OLD_FILES+=usr/share/examples/cvs/contrib/log -OLD_FILES+=usr/share/examples/cvs/contrib/log_accum -OLD_FILES+=usr/share/examples/cvs/contrib/mfpipe -OLD_FILES+=usr/share/examples/cvs/contrib/rcs-to-cvs -OLD_FILES+=usr/share/examples/cvs/contrib/rcs2log -OLD_FILES+=usr/share/examples/cvs/contrib/rcslock -OLD_FILES+=usr/share/examples/cvs/contrib/sccs2rcs -OLD_DIRS+=usr/share/examples/cvs/contrib -OLD_DIRS+=usr/share/examples/cvs -OLD_FILES+=usr/share/info/cvs.info.gz -OLD_FILES+=usr/share/info/cvsclient.info.gz -OLD_FILES+=usr/share/man/man1/cvs.1.gz -OLD_FILES+=usr/share/man/man5/cvs.5.gz -OLD_FILES+=usr/share/man/man8/cvsbug.8.gz -# 20130607: WITH_DEBUG_FILES added -OLD_FILES+=lib/libufs.so.6.symbols -# 20130417: nfs fha moved from nfsserver to nfs -OLD_FILES+=usr/include/nfsserver/nfs_fha.h -# 20130411: new clang import which bumps version from 3.2 to 3.3 -OLD_FILES+=usr/include/clang/3.2/__wmmintrin_aes.h -OLD_FILES+=usr/include/clang/3.2/__wmmintrin_pclmul.h -OLD_FILES+=usr/include/clang/3.2/altivec.h -OLD_FILES+=usr/include/clang/3.2/ammintrin.h -OLD_FILES+=usr/include/clang/3.2/avx2intrin.h -OLD_FILES+=usr/include/clang/3.2/avxintrin.h -OLD_FILES+=usr/include/clang/3.2/bmi2intrin.h -OLD_FILES+=usr/include/clang/3.2/bmiintrin.h -OLD_FILES+=usr/include/clang/3.2/cpuid.h -OLD_FILES+=usr/include/clang/3.2/emmintrin.h -OLD_FILES+=usr/include/clang/3.2/f16cintrin.h -OLD_FILES+=usr/include/clang/3.2/fma4intrin.h -OLD_FILES+=usr/include/clang/3.2/fmaintrin.h -OLD_FILES+=usr/include/clang/3.2/immintrin.h -OLD_FILES+=usr/include/clang/3.2/lzcntintrin.h -OLD_FILES+=usr/include/clang/3.2/mm3dnow.h -OLD_FILES+=usr/include/clang/3.2/mm_malloc.h -OLD_FILES+=usr/include/clang/3.2/mmintrin.h -OLD_FILES+=usr/include/clang/3.2/module.map -OLD_FILES+=usr/include/clang/3.2/nmmintrin.h -OLD_FILES+=usr/include/clang/3.2/pmmintrin.h -OLD_FILES+=usr/include/clang/3.2/popcntintrin.h -OLD_FILES+=usr/include/clang/3.2/rtmintrin.h -OLD_FILES+=usr/include/clang/3.2/smmintrin.h -OLD_FILES+=usr/include/clang/3.2/tmmintrin.h -OLD_FILES+=usr/include/clang/3.2/wmmintrin.h -OLD_FILES+=usr/include/clang/3.2/x86intrin.h -OLD_FILES+=usr/include/clang/3.2/xmmintrin.h -OLD_FILES+=usr/include/clang/3.2/xopintrin.h -OLD_DIRS+=usr/include/clang/3.2 -# 20130404: legacy ATA stack removed -OLD_FILES+=etc/periodic/daily/405.status-ata-raid -OLD_FILES+=rescue/atacontrol -OLD_FILES+=sbin/atacontrol -OLD_FILES+=usr/share/man/man8/atacontrol.8.gz -OLD_FILES+=usr/share/man/man4/atapicam.4.gz -OLD_FILES+=usr/share/man/man4/ataraid.4.gz -OLD_FILES+=usr/sbin/burncd -OLD_FILES+=usr/share/man/man8/burncd.8.gz -# 20130316: vinum.4 removed -OLD_FILES+=usr/share/man/man4/vinum.4.gz -# 20130312: fortunes-o removed -OLD_FILES+=usr/share/games/fortune/fortunes-o -OLD_FILES+=usr/share/games/fortune/fortunes-o.dat -# 20130311: Ports are no more available via cvsup -OLD_FILES+=usr/share/examples/cvsup/ports-supfile -OLD_FILES+=usr/share/examples/cvsup/refuse -OLD_FILES+=usr/share/examples/cvsup/refuse.README -# 20130309: NWFS and NCP supports removed -OLD_FILES+=usr/bin/ncplist -OLD_FILES+=usr/bin/ncplogin -OLD_FILES+=usr/bin/ncplogout -OLD_FILES+=usr/include/fs/nwfs/nwfs.h -OLD_FILES+=usr/include/fs/nwfs/nwfs_mount.h -OLD_FILES+=usr/include/fs/nwfs/nwfs_node.h -OLD_FILES+=usr/include/fs/nwfs/nwfs_subr.h -OLD_DIRS+=usr/include/fs/nwfs -OLD_FILES+=usr/include/netncp/ncp.h -OLD_FILES+=usr/include/netncp/ncp_cfg.h -OLD_FILES+=usr/include/netncp/ncp_conn.h -OLD_FILES+=usr/include/netncp/ncp_file.h -OLD_FILES+=usr/include/netncp/ncp_lib.h -OLD_FILES+=usr/include/netncp/ncp_ncp.h -OLD_FILES+=usr/include/netncp/ncp_nls.h -OLD_FILES+=usr/include/netncp/ncp_rcfile.h -OLD_FILES+=usr/include/netncp/ncp_rq.h -OLD_FILES+=usr/include/netncp/ncp_sock.h -OLD_FILES+=usr/include/netncp/ncp_subr.h -OLD_FILES+=usr/include/netncp/ncp_user.h -OLD_FILES+=usr/include/netncp/ncpio.h -OLD_FILES+=usr/include/netncp/nwerror.h -OLD_DIRS+=usr/include/netncp -OLD_FILES+=usr/lib/libncp.a -OLD_FILES+=usr/lib/libncp.so -OLD_LIBS+=usr/lib/libncp.so.4 -OLD_FILES+=usr/lib/libncp_p.a -OLD_FILES+=usr/sbin/mount_nwfs -OLD_FILES+=usr/share/examples/nwclient/dot.nwfsrc -OLD_FILES+=usr/share/examples/nwclient/nwfs.sh.sample -OLD_DIRS+=usr/share/examples/nwclient -OLD_FILES+=usr/share/man/man1/ncplist.1.gz -OLD_FILES+=usr/share/man/man1/ncplogin.1.gz -OLD_FILES+=usr/share/man/man1/ncplogout.1.gz -OLD_FILES+=usr/share/man/man8/mount_nwfs.8.gz -# 20130302: NTFS support removed -OLD_FILES+=rescue/mount_ntfs -OLD_FILES+=sbin/mount_ntfs -OLD_FILES+=usr/include/fs/ntfs/ntfs.h -OLD_FILES+=usr/include/fs/ntfs/ntfs_compr.h -OLD_FILES+=usr/include/fs/ntfs/ntfs_ihash.h -OLD_FILES+=usr/include/fs/ntfs/ntfs_inode.h -OLD_FILES+=usr/include/fs/ntfs/ntfs_subr.h -OLD_FILES+=usr/include/fs/ntfs/ntfs_vfsops.h -OLD_FILES+=usr/include/fs/ntfs/ntfsmount.h -OLD_DIRS+=usr/include/fs/ntfs -OLD_FILES+=usr/share/man/man8/mount_ntfs.8.gz -# 20130302: PORTALFS support removed -OLD_FILES+=usr/include/fs/portalfs/portal.h -OLD_DIRS+=usr/include/fs/portalfs -OLD_FILES+=usr/sbin/mount_portalfs -OLD_FILES+=usr/share/examples/portal/README -OLD_FILES+=usr/share/examples/portal/portal.conf -OLD_DIRS+=usr/share/examples/portal -OLD_FILES+=usr/share/man/man8/mount_portalfs.8.gz -# 20130302: CODAFS support removed -OLD_FILES+=usr/share/man/man4/coda.4.gz -# 20130302: XFS support removed -OLD_FILES+=usr/share/man/man5/xfs.5.gz -# 20130302: Capsicum overhaul -OLD_FILES+=usr/share/man/man2/cap_getrights.2.gz -OLD_FILES+=usr/share/man/man2/cap_new.2.gz -# 20130213: OpenSSL 1.0.1e import -OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_verifyrecover.3.gz -OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_verifyrecover_init.3.gz -# 20130116: removed long unused directories for .1aout section manpages -OLD_FILES+=usr/share/man/en.ISO8859-1/man1aout -OLD_FILES+=usr/share/man/en.UTF-8/man1aout -OLD_DIRS+=usr/share/man/man1aout -OLD_DIRS+=usr/share/man/cat1aout -OLD_DIRS+=usr/share/man/en.ISO8859-1/cat1aout -OLD_DIRS+=usr/share/man/en.UTF-8/cat1aout -# 20130103: gnats-supfile removed -OLD_FILES+=usr/share/examples/cvsup/gnats-supfile -# 20121230: libdisk removed -OLD_FILES+=usr/share/man/man3/libdisk.3.gz usr/include/libdisk.h -OLD_FILES+=usr/lib/libdisk.a -# 20121230: remove wrongly created directories for auditdistd -OLD_DIRS+=var/dist -OLD_DIRS+=var/remote -# 20121022: remove harp, hfa and idt man page -OLD_FILES+=usr/share/man/man4/harp.4.gz -OLD_FILES+=usr/share/man/man4/hfa.4.gz -OLD_FILES+=usr/share/man/man4/idt.4.gz -OLD_FILES+=usr/share/man/man4/if_idt.4.gz -# 20121022: VFS_LOCK_GIANT elimination -OLD_FILES+=usr/share/man/man9/VFS_LOCK_GIANT.9.gz -OLD_FILES+=usr/share/man/man9/VFS_UNLOCK_GIANT.9.gz -# 20121004: remove incomplete unwind.h -OLD_FILES+=usr/include/clang/3.2/unwind.h -# 20120910: NetBSD compat shims removed -OLD_FILES+=usr/include/cam/scsi/scsi_low_pisa.h -OLD_FILES+=usr/include/sys/device_port.h -# 20120909: doc and www supfiles removed -OLD_FILES+=usr/share/examples/cvsup/doc-supfile -OLD_FILES+=usr/share/examples/cvsup/www-supfile -# 20120908: pf cleanup -OLD_FILES+=usr/include/net/if_pflow.h -# 20120816: new clang import which bumps version from 3.1 to 3.2 -OLD_FILES+=usr/bin/llvm-ld -OLD_FILES+=usr/bin/llvm-stub -OLD_FILES+=usr/include/clang/3.1/altivec.h -OLD_FILES+=usr/include/clang/3.1/avx2intrin.h -OLD_FILES+=usr/include/clang/3.1/avxintrin.h -OLD_FILES+=usr/include/clang/3.1/bmi2intrin.h -OLD_FILES+=usr/include/clang/3.1/bmiintrin.h -OLD_FILES+=usr/include/clang/3.1/cpuid.h -OLD_FILES+=usr/include/clang/3.1/emmintrin.h -OLD_FILES+=usr/include/clang/3.1/fma4intrin.h -OLD_FILES+=usr/include/clang/3.1/immintrin.h -OLD_FILES+=usr/include/clang/3.1/lzcntintrin.h -OLD_FILES+=usr/include/clang/3.1/mm3dnow.h -OLD_FILES+=usr/include/clang/3.1/mm_malloc.h -OLD_FILES+=usr/include/clang/3.1/mmintrin.h -OLD_FILES+=usr/include/clang/3.1/module.map -OLD_FILES+=usr/include/clang/3.1/nmmintrin.h -OLD_FILES+=usr/include/clang/3.1/pmmintrin.h -OLD_FILES+=usr/include/clang/3.1/popcntintrin.h -OLD_FILES+=usr/include/clang/3.1/smmintrin.h -OLD_FILES+=usr/include/clang/3.1/tmmintrin.h -OLD_FILES+=usr/include/clang/3.1/unwind.h -OLD_FILES+=usr/include/clang/3.1/wmmintrin.h -OLD_FILES+=usr/include/clang/3.1/x86intrin.h -OLD_FILES+=usr/include/clang/3.1/xmmintrin.h -OLD_DIRS+=usr/include/clang/3.1 -OLD_FILES+=usr/share/man/man1/llvm-ld.1.gz -# 20120712: OpenSSL 1.0.1c import -OLD_LIBS+=lib/libcrypto.so.6 -OLD_LIBS+=usr/lib/libssl.so.6 -OLD_FILES+=usr/include/openssl/aes_locl.h -OLD_FILES+=usr/include/openssl/bio_lcl.h -OLD_FILES+=usr/include/openssl/e_os.h -OLD_FILES+=usr/include/openssl/fips.h -OLD_FILES+=usr/include/openssl/fips_rand.h -OLD_FILES+=usr/include/openssl/pq_compat.h -OLD_FILES+=usr/include/openssl/tmdiff.h -OLD_FILES+=usr/include/openssl/ui_locl.h -OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_id_callback.3.gz -# 20120621: remove old man page -OLD_FILES+=usr/share/man/man8/vnconfig.8.gz -# 20120619: TOE support updated -OLD_FILES+=usr/include/netinet/toedev.h -# 20120613: auth.conf removed -OLD_FILES+=etc/auth.conf -OLD_FILES+=usr/share/examples/etc/auth.conf -OLD_FILES+=usr/share/man/man3/auth.3.gz -OLD_FILES+=usr/share/man/man3/auth_getval.3.gz -OLD_FILES+=usr/share/man/man5/auth.conf.5.gz -# 20120530: kde pam lives now in ports -OLD_FILES+=etc/pam.d/kde -# 20120521: byacc import -OLD_FILES+=usr/bin/yyfix -OLD_FILES+=usr/share/man/man1/yyfix.1.gz -# 20120505: new clang import installed a redundant internal header -OLD_FILES+=usr/include/clang/3.1/stdalign.h -# 20120428: MD2 removed from libmd -OLD_LIBS+=lib/libmd.so.5 -OLD_FILES+=usr/include/md2.h -OLD_FILES+=usr/share/man/man3/MD2Data.3.gz -OLD_FILES+=usr/share/man/man3/MD2End.3.gz -OLD_FILES+=usr/share/man/man3/MD2File.3.gz -OLD_FILES+=usr/share/man/man3/MD2FileChunk.3.gz -OLD_FILES+=usr/share/man/man3/MD2Final.3.gz -OLD_FILES+=usr/share/man/man3/MD2Init.3.gz -OLD_FILES+=usr/share/man/man3/MD2Update.3.gz -OLD_FILES+=usr/share/man/man3/md2.3.gz -# 20120425: libusb version bump (r234684) -OLD_LIBS+=usr/lib/libusb.so.2 -OLD_FILES+=usr/share/man/man3/libsub_get_active_config_descriptor.3.gz -# 20120415: new clang import which bumps version from 3.0 to 3.1 -OLD_FILES+=usr/include/clang/3.0/altivec.h -OLD_FILES+=usr/include/clang/3.0/avxintrin.h -OLD_FILES+=usr/include/clang/3.0/emmintrin.h -OLD_FILES+=usr/include/clang/3.0/immintrin.h -OLD_FILES+=usr/include/clang/3.0/mm3dnow.h -OLD_FILES+=usr/include/clang/3.0/mm_malloc.h -OLD_FILES+=usr/include/clang/3.0/mmintrin.h -OLD_FILES+=usr/include/clang/3.0/nmmintrin.h -OLD_FILES+=usr/include/clang/3.0/pmmintrin.h -OLD_FILES+=usr/include/clang/3.0/smmintrin.h -OLD_FILES+=usr/include/clang/3.0/tmmintrin.h -OLD_FILES+=usr/include/clang/3.0/wmmintrin.h -OLD_FILES+=usr/include/clang/3.0/x86intrin.h -OLD_FILES+=usr/include/clang/3.0/xmmintrin.h -OLD_DIRS+=usr/include/clang/3.0 -# 20120412: BIND 9.8.1 release notes removed -OLD_FILES+=usr/share/doc/bind9/RELEASE-NOTES-BIND-9.8.1.pdf -OLD_FILES+=usr/share/doc/bind9/RELEASE-NOTES-BIND-9.8.1.txt -OLD_FILES+=usr/share/doc/bind9/RELEASE-NOTES-BIND-9.8.1.html -OLD_FILES+=usr/share/doc/bind9/release-notes.css -# 20120330: legacy(4) moved to x86 -OLD_FILES+=usr/include/machine/legacyvar.h -# 20120324: MPI headers updated -OLD_FILES+=usr/include/dev/mpt/mpilib/mpi_inb.h -# 20120322: hwpmc_mips24k.h removed -OLD_FILES+=usr/include/dev/hwpmc/hwpmc_mips24k.h -# 20120322: Update heimdal to 1.5.1 -OLD_FILES+=usr/include/krb5-v4compat.h \ - usr/include/krb_err.h \ - usr/include/hdb-private.h \ - usr/share/man/man3/krb5_addresses.3.gz \ - usr/share/man/man3/krb5_cc_cursor.3.gz \ - usr/share/man/man3/krb5_cc_ops.3.gz \ - usr/share/man/man3/krb5_config.3.gz \ - usr/share/man/man3/krb5_config_get_int_default.3.gz \ - usr/share/man/man3/krb5_context.3.gz \ - usr/share/man/man3/krb5_data.3.gz \ - usr/share/man/man3/krb5_err.3.gz \ - usr/share/man/man3/krb5_errx.3.gz \ - usr/share/man/man3/krb5_keyblock.3.gz \ - usr/share/man/man3/krb5_keytab_entry.3.gz \ - usr/share/man/man3/krb5_kt_cursor.3.gz \ - usr/share/man/man3/krb5_kt_ops.3.gz \ - usr/share/man/man3/krb5_set_warn_dest.3.gz \ - usr/share/man/man3/krb5_verr.3.gz \ - usr/share/man/man3/krb5_verrx.3.gz \ - usr/share/man/man3/krb5_vwarnx.3.gz \ - usr/share/man/man3/krb5_warn.3.gz \ - usr/share/man/man3/krb5_warnx.3.gz -OLD_LIBS+=usr/lib/libasn1.so.10 \ - usr/lib/libhdb.so.10 \ - usr/lib/libheimntlm.so.10 \ - usr/lib/libhx509.so.10 \ - usr/lib/libkadm5clnt.so.10 \ - usr/lib/libkadm5srv.so.10 \ - usr/lib/libkafs5.so.10 \ - usr/lib/libkrb5.so.10 \ - usr/lib/libroken.so.10 -# 20120309: Remove fifofs header files -OLD_FILES+=usr/include/fs/fifofs/fifo.h -OLD_DIRS+=usr/include/fs/fifofs -# 20120304: xlocale cleanup -OLD_FILES+=usr/include/_xlocale_ctype.h -# 20120225: libarchive 3.0.3 -OLD_FILES+=usr/share/man/man3/archive_read_data_into_buffer.3.gz \ - usr/share/man/man3/archive_read_support_compression_all.3.gz \ - usr/share/man/man3/archive_read_support_compression_bzip2.3.gz \ - usr/share/man/man3/archive_read_support_compression_compress.3.gz \ - usr/share/man/man3/archive_read_support_compression_gzip.3.gz \ - usr/share/man/man3/archive_read_support_compression_lzma.3.gz \ - usr/share/man/man3/archive_read_support_compression_none.3.gz \ - usr/share/man/man3/archive_read_support_compression_program.3.gz \ - usr/share/man/man3/archive_read_support_compression_program_signature.3.gz \ - usr/share/man/man3/archive_read_support_compression_xz.3.gz \ - usr/share/man/man3/archive_write_set_callbacks.3.gz \ - usr/share/man/man3/archive_write_set_compression_bzip2.3.gz \ - usr/share/man/man3/archive_write_set_compression_compress.3.gz \ - usr/share/man/man3/archive_write_set_compression_gzip.3.gz \ - usr/share/man/man3/archive_write_set_compression_none.3.gz \ - usr/share/man/man3/archive_write_set_compression_program.3.gz -OLD_LIBS+=usr/lib/libarchive.so.5 -# 20120113: removal of wtmpcvt(1) -OLD_FILES+=usr/bin/wtmpcvt -OLD_FILES+=usr/share/man/man1/wtmpcvt.1.gz -# 20111214: eventtimers(7) moved to eventtimers(4) -OLD_FILES+=usr/share/man/man7/eventtimers.7.gz -# 20111125: amd(4) removed -OLD_FILES+=usr/share/man/man4/amd.4.gz -# 20111125: libodialog removed -OLD_FILES+=usr/lib/libodialog.a -OLD_FILES+=usr/lib/libodialog.so -OLD_LIBS+=usr/lib/libodialog.so.7 -OLD_FILES+=usr/lib/libodialog_p.a -# 20110930: sysinstall removed -OLD_FILES+=usr/sbin/sysinstall -OLD_FILES+=usr/share/man/man8/sysinstall.8.gz -OLD_FILES+=usr/lib/libftpio.a -OLD_FILES+=usr/lib/libftpio.so -OLD_LIBS+=usr/lib/libftpio.so.8 -OLD_FILES+=usr/lib/libftpio_p.a -OLD_FILES+=usr/include/ftpio.h -OLD_FILES+=usr/share/man/man3/ftpio.3.gz -# 20110915: rename congestion control manpages -OLD_FILES+=usr/share/man/man9/cc.9.gz -# 20110831: atomic page flags operations -OLD_FILES+=usr/share/man/man9/vm_page_flag.9.gz -OLD_FILES+=usr/share/man/man9/vm_page_flag_clear.9.gz -OLD_FILES+=usr/share/man/man9/vm_page_flag_set.9.gz -# 20110828: library version bump for 9.0 -OLD_LIBS+=lib/libcam.so.5 -OLD_LIBS+=lib/libpcap.so.7 -OLD_LIBS+=lib/libufs.so.5 -OLD_LIBS+=usr/lib/libbsnmp.so.5 -OLD_LIBS+=usr/lib/libdwarf.so.2 -OLD_LIBS+=usr/lib/libopie.so.6 -OLD_LIBS+=usr/lib/librtld_db.so.1 -OLD_LIBS+=usr/lib/libtacplus.so.4 -# 20110817: no more acd.4, ad.4, afd.4 and ast.4 -OLD_FILES+=usr/share/man/man4/acd.4.gz -OLD_FILES+=usr/share/man/man4/ad.4.gz -OLD_FILES+=usr/share/man/man4/afd.4.gz -OLD_FILES+=usr/share/man/man4/ast.4.gz -# 20110718: no longer useful in the age of rc.d -OLD_FILES+=usr/sbin/named.reconfig -OLD_FILES+=usr/sbin/named.reload -OLD_FILES+=usr/share/man/man8/named.reconfig.8.gz -OLD_FILES+=usr/share/man/man8/named.reload.8.gz -# 20110716: bind 9.8.0 import -OLD_LIBS+=usr/lib/liblwres.so.50 -OLD_FILES+=usr/share/doc/bind9/KNOWN-DEFECTS -OLD_FILES+=usr/share/doc/bind9/NSEC3-NOTES -OLD_FILES+=usr/share/doc/bind9/README.idnkit -OLD_FILES+=usr/share/doc/bind9/README.pkcs11 -# 20110709: vm_map_clean.9 -> vm_map_sync.9 -OLD_FILES+=usr/share/man/man9/vm_map_clean.9.gz -# 20110709: Catch up with removal of these functions -OLD_FILES+=usr/share/man/man9/vm_page_copy.9.gz -OLD_FILES+=usr/share/man/man9/vm_page_protect.9.gz -OLD_FILES+=usr/share/man/man9/vm_page_zero_fill.9.gz -# 20110707: script no longer needed by /etc/rc.d/nfsd -OLD_FILES+=etc/rc.d/nfsserver -# 20110705: files moved so both NFS clients can share them -OLD_FILES+=usr/include/nfsclient/krpc.h -OLD_FILES+=usr/include/nfsclient/nfsdiskless.h -# 20110705: the switch of default NFS client to the new one -OLD_FILES+=sbin/mount_newnfs -OLD_FILES+=usr/share/man/man8/mount_newnfs.8.gz -OLD_FILES+=usr/include/nfsclient/nfs_kdtrace.h -# 20110628: calendar.msk removed -OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.msk -# 20110517: libpkg removed -OLD_FILES+=usr/include/pkg.h -OLD_FILES+=usr/lib/libpkg.a -OLD_FILES+=usr/lib/libpkg.so -OLD_LIBS+=usr/lib/libpkg.so.0 -OLD_FILES+=usr/lib/libpkg_p.a -# 20110517: libsbuf version bump -OLD_LIBS+=lib/libsbuf.so.5 -# 20110502: new clang import which bumps version from 2.9 to 3.0 -OLD_FILES+=usr/include/clang/2.9/emmintrin.h -OLD_FILES+=usr/include/clang/2.9/mm_malloc.h -OLD_FILES+=usr/include/clang/2.9/mmintrin.h -OLD_FILES+=usr/include/clang/2.9/pmmintrin.h -OLD_FILES+=usr/include/clang/2.9/tmmintrin.h -OLD_FILES+=usr/include/clang/2.9/xmmintrin.h -OLD_DIRS+=usr/include/clang/2.9 -# 20110417: removal of Objective-C support -OLD_FILES+=usr/include/objc/encoding.h -OLD_FILES+=usr/include/objc/hash.h -OLD_FILES+=usr/include/objc/NXConstStr.h -OLD_FILES+=usr/include/objc/objc-api.h -OLD_FILES+=usr/include/objc/objc-decls.h -OLD_FILES+=usr/include/objc/objc-list.h -OLD_FILES+=usr/include/objc/objc.h -OLD_FILES+=usr/include/objc/Object.h -OLD_FILES+=usr/include/objc/Protocol.h -OLD_FILES+=usr/include/objc/runtime.h -OLD_FILES+=usr/include/objc/sarray.h -OLD_FILES+=usr/include/objc/thr.h -OLD_FILES+=usr/include/objc/typedstream.h -OLD_FILES+=usr/lib/libobjc.a -OLD_FILES+=usr/lib/libobjc.so -OLD_FILES+=usr/lib/libobjc_p.a -OLD_FILES+=usr/libexec/cc1obj -OLD_LIBS+=usr/lib/libobjc.so.4 -OLD_DIRS+=usr/include/objc -# 20110331: firmware.img created at build time -OLD_FILES+=usr/share/examples/kld/firmware/fwimage/firmware.img -# 20110224: sticky.8 -> sticky.7 -OLD_FILES+=usr/share/man/man8/sticky.8.gz -# 20110220: new clang import which bumps version from 2.8 to 2.9 -OLD_FILES+=usr/include/clang/2.8/emmintrin.h -OLD_FILES+=usr/include/clang/2.8/mm_malloc.h -OLD_FILES+=usr/include/clang/2.8/mmintrin.h -OLD_FILES+=usr/include/clang/2.8/pmmintrin.h -OLD_FILES+=usr/include/clang/2.8/tmmintrin.h -OLD_FILES+=usr/include/clang/2.8/xmmintrin.h -OLD_DIRS+=usr/include/clang/2.8 -# 20110119: netinet/sctp_cc_functions.h removed -OLD_FILES+=usr/include/netinet/sctp_cc_functions.h -# 20110119: Remove SYSCTL_*X* sysctl additions -OLD_FILES+=usr/share/man/man9/SYSCTL_XINT.9.gz \ - usr/share/man/man9/SYSCTL_XLONG.9.gz - -# 20110112: Update dialog to new version, rename old libdialog to libodialog, -# removing associated man pages and header files. -OLD_FILES+=usr/share/man/man3/draw_shadow.3.gz \ - usr/share/man/man3/draw_box.3.gz usr/share/man/man3/line_edit.3.gz \ - usr/share/man/man3/strheight.3.gz usr/share/man/man3/strwidth.3.gz \ - usr/share/man/man3/dialog_create_rc.3.gz \ - usr/share/man/man3/dialog_yesno.3.gz usr/share/man/man3/dialog_noyes.3.gz \ - usr/share/man/man3/dialog_prgbox.3.gz \ - usr/share/man/man3/dialog_textbox.3.gz usr/share/man/man3/dialog_menu.3.gz \ - usr/share/man/man3/dialog_checklist.3.gz \ - usr/share/man/man3/dialog_radiolist.3.gz \ - usr/share/man/man3/dialog_inputbox.3.gz \ - usr/share/man/man3/dialog_clear_norefresh.3.gz \ - usr/share/man/man3/dialog_clear.3.gz usr/share/man/man3/dialog_update.3.gz \ - usr/share/man/man3/dialog_fselect.3.gz \ - usr/share/man/man3/dialog_notify.3.gz \ - usr/share/man/man3/dialog_mesgbox.3.gz \ - usr/share/man/man3/dialog_gauge.3.gz usr/share/man/man3/init_dialog.3.gz \ - usr/share/man/man3/end_dialog.3.gz usr/share/man/man3/use_helpfile.3.gz \ - usr/share/man/man3/use_helpline.3.gz usr/share/man/man3/get_helpline.3.gz \ - usr/share/man/man3/restore_helpline.3.gz \ - usr/share/man/man3/dialog_msgbox.3.gz \ - usr/share/man/man3/dialog_ftree.3.gz usr/share/man/man3/dialog_tree.3.gz \ - usr/share/examples/dialog/README usr/share/examples/dialog/checklist \ - usr/share/examples/dialog/ftreebox usr/share/examples/dialog/infobox \ - usr/share/examples/dialog/inputbox usr/share/examples/dialog/menubox \ - usr/share/examples/dialog/msgbox usr/share/examples/dialog/prgbox \ - usr/share/examples/dialog/radiolist usr/share/examples/dialog/textbox \ - usr/share/examples/dialog/treebox usr/share/examples/dialog/yesno \ - usr/share/examples/libdialog/Makefile usr/share/examples/libdialog/check1.c\ - usr/share/examples/libdialog/check2.c usr/share/examples/libdialog/check3.c\ - usr/share/examples/libdialog/dselect.c \ - usr/share/examples/libdialog/fselect.c \ - usr/share/examples/libdialog/ftree1.c \ - usr/share/examples/libdialog/ftree1.test \ - usr/share/examples/libdialog/ftree2.c \ - usr/share/examples/libdialog/ftree2.test \ - usr/share/examples/libdialog/gauge.c usr/share/examples/libdialog/input1.c \ - usr/share/examples/libdialog/input2.c usr/share/examples/libdialog/menu1.c \ - usr/share/examples/libdialog/menu2.c usr/share/examples/libdialog/menu3.c \ - usr/share/examples/libdialog/msg.c usr/share/examples/libdialog/prgbox.c \ - usr/share/examples/libdialog/radio1.c usr/share/examples/libdialog/radio2.c\ - usr/share/examples/libdialog/radio3.c usr/share/examples/libdialog/text.c \ - usr/share/examples/libdialog/tree.c usr/share/examples/libdialog/yesno.c -OLD_DIRS+=usr/share/examples/libdialog usr/share/examples/dialog -# 20101114: Remove long-obsolete MAKEDEV.8 -OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz -# 20101112: vgonel(9) has gone to private API a while ago -OLD_FILES+=usr/share/man/man9/vgonel.9.gz -# 20101112: removed gasp.info -OLD_FILES+=usr/share/info/gasp.info.gz -# 20101109: machine/mutex.h removed -OLD_FILES+=usr/include/machine/mutex.h -# 20101109: headers moved from machine/ to x86/ -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/include/machine/mptable.h -.endif -# 20101101: headers moved from machine/ to x86/ -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/include/machine/apicreg.h -OLD_FILES+=usr/include/machine/mca.h -.endif -# 20101020: catch up with vm_page_sleep_if_busy rename -OLD_FILES+=usr/share/man/man9/vm_page_sleep_busy.9.gz -# 20101018: taskqueue(9) updates -OLD_FILES+=usr/share/man/man9/taskqueue_find.9.gz -# 20101011: removed subblock.h from liblzma -OLD_FILES+=usr/include/lzma/subblock.h -# 20101002: removed manpath.config -OLD_FILES+=etc/manpath.config -OLD_FILES+=usr/share/examples/etc/manpath.config -# 20100910: renamed sbuf_overflowed to sbuf_error -OLD_FILES+=usr/share/man/man9/sbuf_overflowed.9.gz -# 20100815: retired last traces of chooseproc(9) -OLD_FILES+=usr/share/man/man9/chooseproc.9.gz -# 20100806: removal of unused libcompat routines -OLD_FILES+=usr/share/man/man3/ascftime.3.gz -OLD_FILES+=usr/share/man/man3/cfree.3.gz -OLD_FILES+=usr/share/man/man3/cftime.3.gz -OLD_FILES+=usr/share/man/man3/getpw.3.gz -# 20100725: acpi_aiboost(4) removal -OLD_FILES+=usr/share/man/man4/acpi_aiboost.4.gz -# 20100724: nfsclient/nfs_lock.h moved to nfs/nfs_lock.h -OLD_FILES+=usr/include/nfsclient/nfs_lock.h -# 20100720: new clang import which bumps version from 2.0 to 2.8 -OLD_FILES+=usr/include/clang/2.0/emmintrin.h -OLD_FILES+=usr/include/clang/2.0/mm_malloc.h -OLD_FILES+=usr/include/clang/2.0/mmintrin.h -OLD_FILES+=usr/include/clang/2.0/pmmintrin.h -OLD_FILES+=usr/include/clang/2.0/tmmintrin.h -OLD_FILES+=usr/include/clang/2.0/xmmintrin.h -OLD_DIRS+=usr/include/clang/2.0 -# 20100706: removed pc-sysinstall's detect-vmware.sh -OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-vmware.sh -# 20100701: [powerpc] removed <machine/intr.h> -.if ${TARGET_ARCH} == "powerpc" -OLD_FILES+=usr/include/machine/intr.h -.endif -# 20100514: library version bump for versioned symbols for liblzma -OLD_LIBS+=usr/lib/liblzma.so.0 -# 20100511: move GCC-specific headers to /usr/include/gcc -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/include/emmintrin.h -OLD_FILES+=usr/include/mm_malloc.h -OLD_FILES+=usr/include/pmmintrin.h -OLD_FILES+=usr/include/xmmintrin.h -.endif -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "arm" -OLD_FILES+=usr/include/mmintrin.h -.endif -.if ${TARGET_ARCH} == "powerpc" -OLD_FILES+=usr/include/altivec.h -OLD_FILES+=usr/include/ppc-asm.h -OLD_FILES+=usr/include/spe.h -.endif -# 20100416: [mips] removed <machine/psl.h> -.if ${TARGET_ARCH} == "mips" -OLD_FILES+=usr/include/machine/psl.h -.endif -# 20100415: [mips] removed unused headers -.if ${TARGET_ARCH} == "mips" -OLD_FILES+=usr/include/machine/archtype.h -OLD_FILES+=usr/include/machine/segments.h -OLD_FILES+=usr/include/machine/rm7000.h -OLD_FILES+=usr/include/machine/defs.h -OLD_FILES+=usr/include/machine/queue.h -.endif -# 20100326: gcpio removal -OLD_FILES+=usr/bin/gcpio -OLD_FILES+=usr/share/info/cpio.info.gz -OLD_FILES+=usr/share/man/man1/gcpio.1.gz -# 20100322: libz update -OLD_LIBS+=lib/libz.so.5 -# 20100314: removal of regexp.h -OLD_FILES+=usr/include/regexp.h -OLD_FILES+=usr/share/man/man3/regexp.3.gz -OLD_FILES+=usr/share/man/man3/regsub.3.gz -# 20100303: actual removal of utmp.h -OLD_FILES+=usr/include/utmp.h -# 20100208: man pages moved -.if ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/share/man/man4/i386/alpm.4.gz -OLD_FILES+=usr/share/man/man4/i386/amdpm.4.gz -OLD_FILES+=usr/share/man/man4/i386/mcd.4.gz -OLD_FILES+=usr/share/man/man4/i386/padlock.4.gz -OLD_FILES+=usr/share/man/man4/i386/pcf.4.gz -OLD_FILES+=usr/share/man/man4/i386/scd.4.gz -OLD_FILES+=usr/share/man/man4/i386/viapm.4.gz -.endif -# 20100122: move BSDL bc/dc USD documents to /usr/share/doc/usd -OLD_FILES+=usr/share/doc/papers/bc.ascii.gz -OLD_FILES+=usr/share/doc/papers/dc.ascii.gz -# 20100120: replacing GNU bc/dc with BSDL versions -OLD_FILES+=usr/share/examples/bc/ckbook.b -OLD_FILES+=usr/share/examples/bc/pi.b -OLD_FILES+=usr/share/examples/bc/primes.b -OLD_FILES+=usr/share/examples/bc/twins.b -OLD_FILES+=usr/share/info/dc.info.gz -OLD_DIRS+=usr/share/examples/bc -# 20100114: removal of ttyslot(3) -OLD_FILES+=usr/share/man/man3/ttyslot.3.gz -# 20100113: remove utmp.h, replace it by utmpx.h -OLD_FILES+=usr/share/man/man3/login.3.gz -OLD_FILES+=usr/share/man/man3/logout.3.gz -OLD_FILES+=usr/share/man/man3/logwtmp.3.gz -OLD_FILES+=usr/share/man/man3/ulog_endutxent.3.gz -OLD_FILES+=usr/share/man/man3/ulog_getutxent.3.gz -OLD_FILES+=usr/share/man/man3/ulog_getutxline.3.gz -OLD_FILES+=usr/share/man/man3/ulog_getutxuser.3.gz -OLD_FILES+=usr/share/man/man3/ulog_pututxline.3.gz -OLD_FILES+=usr/share/man/man3/ulog_setutxent.3.gz -OLD_FILES+=usr/share/man/man3/ulog_setutxfile.3.gz -OLD_FILES+=usr/share/man/man5/lastlog.5.gz -OLD_FILES+=usr/share/man/man5/utmp.5.gz -OLD_FILES+=usr/share/man/man5/wtmp.5.gz -OLD_LIBS+=lib/libutil.so.8 -# 20100105: new userland semaphore implementation -OLD_FILES+=usr/include/sys/semaphore.h -# 20100103: ntptrace(8) removed -OLD_FILES+=usr/sbin/ntptrace -OLD_FILES+=usr/share/man/man8/ntptrace.8.gz -# 20091229: remove no longer relevant examples -OLD_FILES+=usr/share/examples/pppd/auth-down.sample -OLD_FILES+=usr/share/examples/pppd/auth-up.sample -OLD_FILES+=usr/share/examples/pppd/chap-secrets.sample -OLD_FILES+=usr/share/examples/pppd/chat.sh.sample -OLD_FILES+=usr/share/examples/pppd/ip-down.sample -OLD_FILES+=usr/share/examples/pppd/ip-up.sample -OLD_FILES+=usr/share/examples/pppd/options.sample -OLD_FILES+=usr/share/examples/pppd/pap-secrets.sample -OLD_FILES+=usr/share/examples/pppd/ppp.deny.sample -OLD_FILES+=usr/share/examples/pppd/ppp.shells.sample -OLD_DIRS+=usr/share/examples/pppd -OLD_FILES+=usr/share/examples/slattach/unit-command.sh -OLD_DIRS+=usr/share/examples/slattach -OLD_FILES+=usr/share/examples/sliplogin/slip.hosts -OLD_FILES+=usr/share/examples/sliplogin/slip.login -OLD_FILES+=usr/share/examples/sliplogin/slip.logout -OLD_FILES+=usr/share/examples/sliplogin/slip.slparms -OLD_DIRS+=usr/share/examples/sliplogin -OLD_FILES+=usr/share/examples/startslip/sldown.sh -OLD_FILES+=usr/share/examples/startslip/slip.sh -OLD_FILES+=usr/share/examples/startslip/slup.sh -OLD_DIRS+=usr/share/examples/startslip -# 20091202: unify rc.firewall and rc.firewall6 -OLD_FILES+=etc/rc.d/ip6fw -OLD_FILES+=etc/rc.firewall6 -OLD_FILES+=usr/share/examples/etc/rc.firewall6 -# 20091117: removal of rc.early(8) link -OLD_FILES+=usr/share/man/man8/rc.early.8.gz -# 20091027: pselect.3 implemented as syscall -OLD_FILES+=usr/share/man/man3/pselect.3.gz -# 20091005: fusword.9 and susword.9 removed -OLD_FILES+=usr/share/man/man9/fusword.9.gz -OLD_FILES+=usr/share/man/man9/susword.9.gz -# 20090909: vesa and dpms promoted to be i386/amd64 common -OLD_FILES+=usr/include/machine/pc/vesa.h -OLD_FILES+=usr/share/man/man4/i386/dpms.4.gz -# 20090904: remove lukemftpd -OLD_FILES+=usr/libexec/lukemftpd -OLD_FILES+=usr/share/man/man5/ftpd.conf.5.gz -OLD_FILES+=usr/share/man/man5/ftpusers.5.gz -OLD_FILES+=usr/share/man/man8/lukemftpd.8.gz -# 20090902: BSD.{x11,x11-4}.dist are dead and BSD.local.dist lives in ports/ -OLD_FILES+=etc/mtree/BSD.local.dist -OLD_FILES+=etc/mtree/BSD.x11.dist -OLD_FILES+=etc/mtree/BSD.x11-4.dist -# 20090812: net80211 documentation overhaul -OLD_FILES+=usr/share/man/man9/ieee80211_add_rates.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_add_xrates.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_alloc_node.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_attach.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_begin_scan.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_cfgget.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_cfgset.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_chan2ieee.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_chan2mode.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_create_ibss.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_crypto_attach.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_crypto_detach.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_decap.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_dump_pkt.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_dup_bss.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_encap.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_end_scan.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_find_node.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_fix_rate.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_free_allnodes.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_ieee2mhz.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_ioctl.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_lookup_node.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_media2rate.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_media_change.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_media_init.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_media_status.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_mhz2ieee.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_next_scan.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_node_attach.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_node_detach.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_node_lateattach.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_print_essid.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_proto_attach.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_proto_detach.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_rate2media.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_recv_mgmt.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_send_mgmt.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_setmode.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_timeout_nodes.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_watchdog.9.gz -OLD_FILES+=usr/share/man/man9/ieee80211_wep_crypt.9.gz -# 20090801: vimage.h removed in favour of vnet.h -OLD_FILES+=usr/include/sys/vimage.h -# 20101208: libbsnmp was moved to usr/lib -MOVED_LIBS+=lib/libbsnmp.so.5 -# 20090719: library version bump for 8.0 -OLD_LIBS+=lib/libalias.so.6 -OLD_LIBS+=lib/libavl.so.1 -OLD_LIBS+=lib/libbegemot.so.3 -OLD_LIBS+=lib/libbsdxml.so.3 -OLD_LIBS+=lib/libbsnmp.so.4 -OLD_LIBS+=lib/libcam.so.4 -OLD_LIBS+=lib/libcrypt.so.4 -OLD_LIBS+=lib/libcrypto.so.5 -OLD_LIBS+=lib/libctf.so.1 -OLD_LIBS+=lib/libdevstat.so.6 -OLD_LIBS+=lib/libdtrace.so.1 -OLD_LIBS+=lib/libedit.so.6 -OLD_LIBS+=lib/libgeom.so.4 -OLD_LIBS+=lib/libipsec.so.3 -OLD_LIBS+=lib/libipx.so.4 -OLD_LIBS+=lib/libkiconv.so.3 -OLD_LIBS+=lib/libkvm.so.4 -OLD_LIBS+=lib/libmd.so.4 -OLD_LIBS+=lib/libncurses.so.7 -OLD_LIBS+=lib/libncursesw.so.7 -OLD_LIBS+=lib/libnvpair.so.1 -OLD_LIBS+=lib/libpcap.so.6 -OLD_LIBS+=lib/libreadline.so.7 -OLD_LIBS+=lib/libsbuf.so.4 -OLD_LIBS+=lib/libufs.so.4 -OLD_LIBS+=lib/libumem.so.1 -OLD_LIBS+=lib/libutil.so.7 -OLD_LIBS+=lib/libuutil.so.1 -OLD_LIBS+=lib/libz.so.4 -OLD_LIBS+=lib/libzfs.so.1 -OLD_LIBS+=lib/libzpool.so.1 -OLD_LIBS+=usr/lib/libarchive.so.4 -OLD_LIBS+=usr/lib/libauditd.so.4 -OLD_LIBS+=usr/lib/libbluetooth.so.3 -OLD_LIBS+=usr/lib/libbsm.so.2 -OLD_LIBS+=usr/lib/libbz2.so.3 -OLD_LIBS+=usr/lib/libcalendar.so.4 -OLD_LIBS+=usr/lib/libcom_err.so.4 -OLD_LIBS+=usr/lib/libdevinfo.so.4 -OLD_LIBS+=usr/lib/libdialog.so.6 -OLD_LIBS+=usr/lib/libdwarf.so.1 -OLD_LIBS+=usr/lib/libfetch.so.5 -OLD_LIBS+=usr/lib/libform.so.4 -OLD_LIBS+=usr/lib/libformw.so.4 -OLD_LIBS+=usr/lib/libftpio.so.7 -OLD_LIBS+=usr/lib/libgnuregex.so.4 -OLD_LIBS+=usr/lib/libgpib.so.2 -OLD_LIBS+=usr/lib/libhistory.so.7 -OLD_LIBS+=usr/lib/libmagic.so.3 -OLD_LIBS+=usr/lib/libmemstat.so.2 -OLD_LIBS+=usr/lib/libmenu.so.4 -OLD_LIBS+=usr/lib/libmenuw.so.4 -OLD_LIBS+=usr/lib/libmilter.so.4 -OLD_LIBS+=usr/lib/libncp.so.3 -OLD_LIBS+=usr/lib/libnetgraph.so.3 -OLD_LIBS+=usr/lib/libngatm.so.3 -OLD_LIBS+=usr/lib/libobjc.so.3 -OLD_LIBS+=usr/lib/libopie.so.5 -OLD_LIBS+=usr/lib/libpam.so.4 -OLD_LIBS+=usr/lib/libpanel.so.4 -OLD_LIBS+=usr/lib/libpanelw.so.4 -OLD_LIBS+=usr/lib/libpmc.so.4 -OLD_LIBS+=usr/lib/libproc.so.1 -OLD_LIBS+=usr/lib/libradius.so.3 -OLD_LIBS+=usr/lib/librpcsvc.so.4 -OLD_LIBS+=usr/lib/libsdp.so.3 -OLD_LIBS+=usr/lib/libsmb.so.3 -OLD_LIBS+=usr/lib/libssh.so.4 -OLD_LIBS+=usr/lib/libssl.so.5 -OLD_LIBS+=usr/lib/libtacplus.so.3 -OLD_LIBS+=usr/lib/libugidfw.so.3 -OLD_LIBS+=usr/lib/libusb.so.1 -OLD_LIBS+=usr/lib/libusbhid.so.3 -OLD_LIBS+=usr/lib/libvgl.so.5 -OLD_LIBS+=usr/lib/libwrap.so.5 -OLD_LIBS+=usr/lib/libypclnt.so.3 -OLD_LIBS+=usr/lib/pam_chroot.so.4 -OLD_LIBS+=usr/lib/pam_deny.so.4 -OLD_LIBS+=usr/lib/pam_echo.so.4 -OLD_LIBS+=usr/lib/pam_exec.so.4 -OLD_LIBS+=usr/lib/pam_ftpusers.so.4 -OLD_LIBS+=usr/lib/pam_group.so.4 -OLD_LIBS+=usr/lib/pam_guest.so.4 -OLD_LIBS+=usr/lib/pam_krb5.so.4 -OLD_LIBS+=usr/lib/pam_ksu.so.4 -OLD_LIBS+=usr/lib/pam_lastlog.so.4 -OLD_LIBS+=usr/lib/pam_login_access.so.4 -OLD_LIBS+=usr/lib/pam_nologin.so.4 -OLD_LIBS+=usr/lib/pam_opie.so.4 -OLD_LIBS+=usr/lib/pam_opieaccess.so.4 -OLD_LIBS+=usr/lib/pam_passwdqc.so.4 -OLD_LIBS+=usr/lib/pam_permit.so.4 -OLD_LIBS+=usr/lib/pam_radius.so.4 -OLD_LIBS+=usr/lib/pam_rhosts.so.4 -OLD_LIBS+=usr/lib/pam_rootok.so.4 -OLD_LIBS+=usr/lib/pam_securetty.so.4 -OLD_LIBS+=usr/lib/pam_self.so.4 -OLD_LIBS+=usr/lib/pam_ssh.so.4 -OLD_LIBS+=usr/lib/pam_tacplus.so.4 -OLD_LIBS+=usr/lib/pam_unix.so.4 -OLD_LIBS+=usr/lib/snmp_atm.so.5 -OLD_LIBS+=usr/lib/snmp_bridge.so.5 -OLD_LIBS+=usr/lib/snmp_hostres.so.5 -OLD_LIBS+=usr/lib/snmp_mibII.so.5 -OLD_LIBS+=usr/lib/snmp_netgraph.so.5 -OLD_LIBS+=usr/lib/snmp_pf.so.5 -# 20090718: the gdm pam.d file is no longer required -OLD_FILES+=etc/pam.d/gdm -# 20090714: net_add_domain(9) renamed to domain_add(9) -OLD_FILES+=usr/share/man/man9/net_add_domain.9.gz -# 20090713: vimage container structs removed -OLD_FILES+=usr/include/netinet/vinet.h -OLD_FILES+=usr/include/netinet6/vinet6.h -OLD_FILES+=usr/include/netipsec/vipsec.h -# 20090712: ieee80211.4 -> net80211.4 -OLD_FILES+=usr/share/man/man4/ieee80211.4.gz -# 20090711: typo fixed, kproc_resume,.9 -> kproc_resume.9 -OLD_FILES+=usr/share/man/man9/kproc_resume,.9.gz -# 20090709: msgctl.3 msgget.3 msgrcv.3 msgsnd.3 manual pages moved -OLD_FILES+=usr/share/man/man3/msgctl.3.gz -OLD_FILES+=usr/share/man/man3/msgget.3.gz -OLD_FILES+=usr/share/man/man3/msgrcv.3.gz -OLD_FILES+=usr/share/man/man3/msgsnd.3.gz -# 20090630: old kernel RPC implementation removal -OLD_FILES+=usr/include/nfs/rpcv2.h -# 20090624: update usbdi(9) -OLD_FILES+=usr/share/man/man9/usbd_abort_default_pipe.9.gz -OLD_FILES+=usr/share/man/man9/usbd_abort_pipe.9.gz -OLD_FILES+=usr/share/man/man9/usbd_alloc_buffer.9.gz -OLD_FILES+=usr/share/man/man9/usbd_alloc_xfer.9.gz -OLD_FILES+=usr/share/man/man9/usbd_clear_endpoint_stall.9.gz -OLD_FILES+=usr/share/man/man9/usbd_clear_endpoint_stall_async.9.gz -OLD_FILES+=usr/share/man/man9/usbd_clear_endpoint_toggle.9.gz -OLD_FILES+=usr/share/man/man9/usbd_close_pipe.9.gz -OLD_FILES+=usr/share/man/man9/usbd_device2interface_handle.9.gz -OLD_FILES+=usr/share/man/man9/usbd_do_request_async.9.gz -OLD_FILES+=usr/share/man/man9/usbd_do_request_flags_pipe.9.gz -OLD_FILES+=usr/share/man/man9/usbd_endpoint_count.9.gz -OLD_FILES+=usr/share/man/man9/usbd_find_edesc.9.gz -OLD_FILES+=usr/share/man/man9/usbd_find_idesc.9.gz -OLD_FILES+=usr/share/man/man9/usbd_free_buffer.9.gz -OLD_FILES+=usr/share/man/man9/usbd_free_xfer.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_buffer.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_config.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_config_desc.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_config_desc_full.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_config_descriptor.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_device_descriptor.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_endpoint_descriptor.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_interface_altindex.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_interface_descriptor.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_no_alts.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_quirks.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_speed.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_string.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_string_desc.9.gz -OLD_FILES+=usr/share/man/man9/usbd_get_xfer_status.9.gz -OLD_FILES+=usr/share/man/man9/usbd_interface2device_handle.9.gz -OLD_FILES+=usr/share/man/man9/usbd_interface2endpoint_descriptor.9.gz -OLD_FILES+=usr/share/man/man9/usbd_interface_count.9.gz -OLD_FILES+=usr/share/man/man9/usbd_open_pipe.9.gz -OLD_FILES+=usr/share/man/man9/usbd_open_pipe_intr.9.gz -OLD_FILES+=usr/share/man/man9/usbd_pipe2device_handle.9.gz -OLD_FILES+=usr/share/man/man9/usbd_set_config_index.9.gz -OLD_FILES+=usr/share/man/man9/usbd_set_config_no.9.gz -OLD_FILES+=usr/share/man/man9/usbd_set_interface.9.gz -OLD_FILES+=usr/share/man/man9/usbd_setup_default_xfer.9.gz -OLD_FILES+=usr/share/man/man9/usbd_setup_isoc_xfer.9.gz -OLD_FILES+=usr/share/man/man9/usbd_setup_xfer.9.gz -OLD_FILES+=usr/share/man/man9/usbd_sync_transfer.9.gz -OLD_FILES+=usr/share/man/man9/usbd_transfer.9.gz -OLD_FILES+=usr/share/man/man9/usb_find_desc.9.gz -# 20090623: number of headers needed for a usb driver reduced -OLD_FILES+=usr/include/dev/usb/usb_defs.h -OLD_FILES+=usr/include/dev/usb/usb_error.h -OLD_FILES+=usr/include/dev/usb/usb_handle_request.h -OLD_FILES+=usr/include/dev/usb/usb_hid.h -OLD_FILES+=usr/include/dev/usb/usb_lookup.h -OLD_FILES+=usr/include/dev/usb/usb_mfunc.h -OLD_FILES+=usr/include/dev/usb/usb_parse.h -OLD_FILES+=usr/include/dev/usb/usb_revision.h -# 20090609: devclass_add_driver is no longer public -OLD_FILES+=usr/share/man/man9/devclass_add_driver.9.gz -OLD_FILES+=usr/share/man/man9/devclass_delete_driver.9.gz -OLD_FILES+=usr/share/man/man9/devclass_find_driver.9.gz -# 20090605: removal of clists -OLD_FILES+=usr/include/sys/clist.h -# 20090602: removal of window(1) -OLD_FILES+=usr/bin/window -OLD_FILES+=usr/share/man/man1/window.1.gz -# 20090531: bind 9.6.1rc1 import -OLD_LIBS+=usr/lib/liblwres.so.30 -# 20090530: removal of early.sh -OLD_FILES+=etc/rc.d/early.sh -# 20090527: renaming of S{LIST,TAILQ}_REMOVE_NEXT() to _REMOVE_AFTER() -OLD_FILES+=usr/share/man/man3/SLIST_REMOVE_NEXT.3.gz -OLD_FILES+=usr/share/man/man3/STAILQ_REMOVE_NEXT.3.gz -# 20090527: removal of legacy USB stack -OLD_FILES+=usr/include/legacy/dev/usb/dsbr100io.h -OLD_FILES+=usr/include/legacy/dev/usb/ehcireg.h -OLD_FILES+=usr/include/legacy/dev/usb/ehcivar.h -OLD_FILES+=usr/include/legacy/dev/usb/hid.h -OLD_FILES+=usr/include/legacy/dev/usb/if_urtwreg.h -OLD_FILES+=usr/include/legacy/dev/usb/if_urtwvar.h -OLD_FILES+=usr/include/legacy/dev/usb/ohcireg.h -OLD_FILES+=usr/include/legacy/dev/usb/ohcivar.h -OLD_FILES+=usr/include/legacy/dev/usb/rio500_usb.h -OLD_FILES+=usr/include/legacy/dev/usb/rt2573_ucode.h -OLD_FILES+=usr/include/legacy/dev/usb/sl811hsreg.h -OLD_FILES+=usr/include/legacy/dev/usb/sl811hsvar.h -OLD_FILES+=usr/include/legacy/dev/usb/ubser.h -OLD_FILES+=usr/include/legacy/dev/usb/ucomvar.h -OLD_FILES+=usr/include/legacy/dev/usb/udbp.h -OLD_FILES+=usr/include/legacy/dev/usb/uftdireg.h -OLD_FILES+=usr/include/legacy/dev/usb/ugraphire_rdesc.h -OLD_FILES+=usr/include/legacy/dev/usb/uhcireg.h -OLD_FILES+=usr/include/legacy/dev/usb/uhcivar.h -OLD_FILES+=usr/include/legacy/dev/usb/usb.h -OLD_FILES+=usr/include/legacy/dev/usb/usb_mem.h -OLD_FILES+=usr/include/legacy/dev/usb/usb_port.h -OLD_FILES+=usr/include/legacy/dev/usb/usb_quirks.h -OLD_FILES+=usr/include/legacy/dev/usb/usbcdc.h -OLD_FILES+=usr/include/legacy/dev/usb/usbdi.h -OLD_FILES+=usr/include/legacy/dev/usb/usbdi_util.h -OLD_FILES+=usr/include/legacy/dev/usb/usbdivar.h -OLD_FILES+=usr/include/legacy/dev/usb/usbhid.h -OLD_FILES+=usr/include/legacy/dev/usb/uxb360gp_rdesc.h -OLD_DIRS+=usr/include/legacy/dev/usb -OLD_DIRS+=usr/include/legacy/dev -OLD_DIRS+=usr/include/legacy -# 20090526: removal of makekey(8) -OLD_FILES+=usr/libexec/makekey -OLD_FILES+=usr/share/man/man8/makekey.8.gz -# 20090522: removal of University of Michigan NFSv4 client -OLD_FILES+=etc/rc.d/idmapd -OLD_FILES+=sbin/idmapd -OLD_FILES+=sbin/mount_nfs4 -OLD_FILES+=usr/share/man/man8/idmapd.8.gz -OLD_FILES+=usr/share/man/man8/mount_nfs4.8.gz -# 20090513: removal of legacy versions of USB network interface drivers -OLD_FILES+=usr/include/legacy/dev/usb/if_upgtvar.h -OLD_FILES+=usr/include/legacy/dev/usb/usb_ethersubr.h -# 20090417: removal of legacy versions of USB network interface drivers -OLD_FILES+=usr/include/legacy/dev/usb/if_auereg.h -OLD_FILES+=usr/include/legacy/dev/usb/if_axereg.h -OLD_FILES+=usr/include/legacy/dev/usb/if_cdcereg.h -OLD_FILES+=usr/include/legacy/dev/usb/if_cuereg.h -OLD_FILES+=usr/include/legacy/dev/usb/if_kuereg.h -OLD_FILES+=usr/include/legacy/dev/usb/if_ruereg.h -OLD_FILES+=usr/include/legacy/dev/usb/if_rumreg.h -OLD_FILES+=usr/include/legacy/dev/usb/if_rumvar.h -OLD_FILES+=usr/include/legacy/dev/usb/if_udavreg.h -OLD_FILES+=usr/include/legacy/dev/usb/if_uralreg.h -OLD_FILES+=usr/include/legacy/dev/usb/if_uralvar.h -OLD_FILES+=usr/include/legacy/dev/usb/if_zydfw.h -OLD_FILES+=usr/include/legacy/dev/usb/if_zydreg.h -OLD_FILES+=usr/include/legacy/dev/usb/kue_fw.h -# 20090416: removal of ar(4), ray(4), sr(4), raycontrol(8) -OLD_FILES+=usr/sbin/raycontrol -OLD_FILES+=usr/share/man/man4/i386/ar.4.gz -OLD_FILES+=usr/share/man/man4/i386/ray.4.gz -OLD_FILES+=usr/share/man/man4/i386/sr.4.gz -OLD_FILES+=usr/share/man/man8/raycontrol.8.gz -# 20090410: VOP_LEASE.9 removed -OLD_FILES+=usr/share/man/man9/VOP_LEASE.9.gz -# 20090406: usb_sw_transfer.h removed -OLD_FILES+=usr/include/dev/usb/usb_sw_transfer.h -# 20090405: removal of if_ppp(4) and if_sl(4) -OLD_FILES+=sbin/slattach rescue/slattach -OLD_FILES+=sbin/startslip rescue/startslip -OLD_FILES+=usr/include/net/if_ppp.h -OLD_FILES+=usr/include/net/if_pppvar.h -OLD_FILES+=usr/include/net/if_slvar.h -OLD_FILES+=usr/include/net/ppp_comp.h -OLD_FILES+=usr/include/net/slip.h -OLD_FILES+=usr/sbin/sliplogin -OLD_FILES+=usr/sbin/slstat -OLD_FILES+=usr/sbin/pppd -OLD_FILES+=usr/sbin/pppstats -OLD_FILES+=usr/share/man/man1/startslip.1.gz -OLD_FILES+=usr/share/man/man4/if_ppp.4.gz -OLD_FILES+=usr/share/man/man4/if_sl.4.gz -OLD_FILES+=usr/share/man/man4/ppp.4.gz -OLD_FILES+=usr/share/man/man4/sl.4.gz -OLD_FILES+=usr/share/man/man8/pppd.8.gz -OLD_FILES+=usr/share/man/man8/pppstats.8.gz -OLD_FILES+=usr/share/man/man8/slattach.8.gz -OLD_FILES+=usr/share/man/man8/slip.8.gz -OLD_FILES+=usr/share/man/man8/sliplogin.8.gz -OLD_FILES+=usr/share/man/man8/slstat.8.gz -# 20090321: libpcap upgraded to 1.0.0 -OLD_LIBS+=lib/libpcap.so.5 -# 20090319: uscanner(4) has been removed -OLD_FILES+=usr/share/man/man4/uscanner.4.gz -# 20090313: k8temp(4) renamed to amdtemp(4) -OLD_FILES+=usr/share/man/man4/k8temp.4.gz -# 20090308: libusb.so.1 renamed -OLD_LIBS+=usr/lib/libusb20.so.1 -OLD_FILES+=usr/lib/libusb20.a -OLD_FILES+=usr/lib/libusb20.so -OLD_FILES+=usr/lib/libusb20_p.a -OLD_FILES+=usr/include/libusb20_compat01.h -OLD_FILES+=usr/include/libusb20_compat10.h -# 20090226: libmp(3) functions renamed -OLD_LIBS+=usr/lib/libmp.so.6 -# 20090223: changeover of USB stacks -OLD_FILES+=usr/include/dev/usb2/include/ufm2_ioctl.h -OLD_FILES+=usr/include/dev/usb2/include/urio2_ioctl.h -OLD_FILES+=usr/include/dev/usb2/include/usb2_cdc.h -OLD_FILES+=usr/include/dev/usb2/include/usb2_defs.h -OLD_FILES+=usr/include/dev/usb2/include/usb2_devid.h -OLD_FILES+=usr/include/dev/usb2/include/usb2_devtable.h -OLD_FILES+=usr/include/dev/usb2/include/usb2_endian.h -OLD_FILES+=usr/include/dev/usb2/include/usb2_error.h -OLD_FILES+=usr/include/dev/usb2/include/usb2_hid.h -OLD_FILES+=usr/include/dev/usb2/include/usb2_ioctl.h -OLD_FILES+=usr/include/dev/usb2/include/usb2_mfunc.h -OLD_FILES+=usr/include/dev/usb2/include/usb2_revision.h -OLD_FILES+=usr/include/dev/usb2/include/usb2_standard.h -OLD_DIRS+=usr/include/dev/usb2/include -OLD_DIRS+=usr/include/dev/usb2 -OLD_FILES+=usr/include/dev/usb/dsbr100io.h -OLD_FILES+=usr/include/dev/usb/ehcireg.h -OLD_FILES+=usr/include/dev/usb/ehcivar.h -OLD_FILES+=usr/include/dev/usb/hid.h -OLD_FILES+=usr/include/dev/usb/if_auereg.h -OLD_FILES+=usr/include/dev/usb/if_axereg.h -OLD_FILES+=usr/include/dev/usb/if_cdcereg.h -OLD_FILES+=usr/include/dev/usb/if_cuereg.h -OLD_FILES+=usr/include/dev/usb/if_kuereg.h -OLD_FILES+=usr/include/dev/usb/if_ruereg.h -OLD_FILES+=usr/include/dev/usb/if_rumreg.h -OLD_FILES+=usr/include/dev/usb/if_rumvar.h -OLD_FILES+=usr/include/dev/usb/if_udavreg.h -OLD_FILES+=usr/include/dev/usb/if_upgtvar.h -OLD_FILES+=usr/include/dev/usb/if_uralreg.h -OLD_FILES+=usr/include/dev/usb/if_uralvar.h -OLD_FILES+=usr/include/dev/usb/if_urtwreg.h -OLD_FILES+=usr/include/dev/usb/if_urtwvar.h -OLD_FILES+=usr/include/dev/usb/if_zydfw.h -OLD_FILES+=usr/include/dev/usb/if_zydreg.h -OLD_FILES+=usr/include/dev/usb/kue_fw.h -OLD_FILES+=usr/include/dev/usb/ohcireg.h -OLD_FILES+=usr/include/dev/usb/ohcivar.h -OLD_FILES+=usr/include/dev/usb/rio500_usb.h -OLD_FILES+=usr/include/dev/usb/rt2573_ucode.h -OLD_FILES+=usr/include/dev/usb/sl811hsreg.h -OLD_FILES+=usr/include/dev/usb/sl811hsvar.h -OLD_FILES+=usr/include/dev/usb/ubser.h -OLD_FILES+=usr/include/dev/usb/ucomvar.h -OLD_FILES+=usr/include/dev/usb/udbp.h -OLD_FILES+=usr/include/dev/usb/uftdireg.h -OLD_FILES+=usr/include/dev/usb/ugraphire_rdesc.h -OLD_FILES+=usr/include/dev/usb/uhcireg.h -OLD_FILES+=usr/include/dev/usb/uhcivar.h -OLD_FILES+=usr/include/dev/usb/usb_ethersubr.h -OLD_FILES+=usr/include/dev/usb/usb_mem.h -OLD_FILES+=usr/include/dev/usb/usb_port.h -OLD_FILES+=usr/include/dev/usb/usb_quirks.h -OLD_FILES+=usr/include/dev/usb/usbcdc.h -OLD_FILES+=usr/include/dev/usb/usbdivar.h -OLD_FILES+=usr/include/dev/usb/uxb360gp_rdesc.h -OLD_FILES+=usr/sbin/usbdevs -OLD_FILES+=usr/share/man/man8/usbdevs.8.gz -# 20090203: removal of pccard header files -OLD_FILES+=usr/include/pccard/cardinfo.h -OLD_FILES+=usr/include/pccard/cis.h -OLD_DIRS+=usr/include/pccard -# 20090203: adding_user.8 moved to adding_user.7 -OLD_FILES+=usr/share/man/man8/adding_user.8.gz -# 20090102: file 4.26 import -OLD_FILES+=usr/share/misc/magic.mime -OLD_FILES+=usr/share/misc/magic.mime.mgc -# 20081223: bind 9.4.3 import, nsupdate.8 moved to nsupdate.1 -OLD_FILES+=usr/share/man/man8/nsupdate.8.gz -# 20081223: ipprotosw.h removed -OLD_FILES+=usr/include/netinet/ipprotosw.h -# 20081123: vfs_mountedon.9 removed -OLD_FILES+=usr/share/man/man9/vfs_mountedon.9.gz -# 20081023: FREE.9 and MALLOC.9 removed -OLD_FILES+=usr/share/man/man9/FREE.9.gz -OLD_FILES+=usr/share/man/man9/MALLOC.9.gz -# 20080928: removal of inaccurate device_ids(9) manual page -OLD_FILES+=usr/share/man/man9/device_ids.9.gz -OLD_FILES+=usr/share/man/man9/major.9.gz -OLD_FILES+=usr/share/man/man9/minor.9.gz -OLD_FILES+=usr/share/man/man9/umajor.9.gz -OLD_FILES+=usr/share/man/man9/uminor.9.gz -# 20080917: removal of manpage for axed kernel primitive suser(9) -OLD_FILES+=usr/share/man/man9/suser.9.gz -OLD_FILES+=usr/share/man/man9/suser_cred.9.gz -# 20080913: pax removed from rescue -OLD_FILES+=rescue/pax -# 20080823: removal of unneeded pt_chown, to implement grantpt(3) -OLD_FILES+=usr/libexec/pt_chown -# 20080822: ntp 4.2.4p5 import -OLD_FILES+=usr/share/doc/ntp/driver23.html -OLD_FILES+=usr/share/doc/ntp/driver24.html -# 20080821: several man pages moved from man4.i386 to man4 -.if ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/share/man/man4/i386/acpi_aiboost.4.gz -OLD_FILES+=usr/share/man/man4/i386/acpi_asus.4.gz -OLD_FILES+=usr/share/man/man4/i386/acpi_fujitsu.4.gz -OLD_FILES+=usr/share/man/man4/i386/acpi_ibm.4.gz -OLD_FILES+=usr/share/man/man4/i386/acpi_panasonic.4.gz -OLD_FILES+=usr/share/man/man4/i386/acpi_sony.4.gz -OLD_FILES+=usr/share/man/man4/i386/acpi_toshiba.4.gz -OLD_FILES+=usr/share/man/man4/i386/ichwd.4.gz -OLD_FILES+=usr/share/man/man4/i386/if_ndis.4.gz -OLD_FILES+=usr/share/man/man4/i386/io.4.gz -OLD_FILES+=usr/share/man/man4/i386/linux.4.gz -OLD_FILES+=usr/share/man/man4/i386/ndis.4.gz -.endif -# 20080820: MPSAFE TTY layer integrated -OLD_FILES+=usr/include/sys/linedisc.h -OLD_FILES+=usr/share/man/man3/posix_openpt.3.gz -# 20080725: sgtty.h removed -OLD_FILES+=usr/include/sgtty.h -# 20080706: bsdlabel(8) removed on powerpc -.if ${TARGET_ARCH} == "powerpc" -OLD_FILES+=sbin/bsdlabel -OLD_FILES+=usr/share/man/man8/bsdlabel.8.gz -.endif -# 20080704: sbsh(4) removed -OLD_FILES+=usr/share/man/man4/if_sbsh.4.gz -OLD_FILES+=usr/share/man/man4/sbsh.4.gz -# 20080704: cnw(4) removed -OLD_FILES+=usr/share/man/man4/if_cnw.4.gz -OLD_FILES+=usr/share/man/man4/cnw.4.gz -# 20080704: oltr(4) removed -.if ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/share/man/man4/i386/if_oltr.4.gz -OLD_FILES+=usr/share/man/man4/i386/oltr.4.gz -.endif -# 20080704: arl(4) removed -.if ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/sbin/arlcontrol -OLD_FILES+=usr/share/man/man4/i386/arl.4.gz -OLD_FILES+=usr/share/man/man8/arlcontrol.8.gz -.endif -# 20080703: sunlabel only for sparc64 -.if ${TARGET_ARCH} != "sparc64" -OLD_FILES+=sbin/sunlabel -OLD_FILES+=usr/share/man/man8/sunlabel.8.gz -.endif -# 20080701: wpa_supplicant.conf moved to share/examples/etc/ -OLD_FILES+=usr/share/examples/wpa_supplicant/wpa_supplicant.conf -OLD_DIRS+=usr/share/examples/wpa_supplicant -# 20080614: pecoff image activator removed -.if ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/include/machine/pecoff_machdep.h -.endif -# 20080614: sgtty removed -OLD_FILES+=usr/include/sys/ttychars.h -OLD_FILES+=usr/include/sys/ttydev.h -OLD_FILES+=usr/share/man/man3/gtty.3.gz -OLD_FILES+=usr/share/man/man3/stty.3.gz -# 20080609: gpt(8) removed -OLD_FILES+=sbin/gpt -OLD_FILES+=usr/share/man/man8/gpt.8.gz -# 20080525: I4B removed -OLD_FILES+=etc/isdn/answer -OLD_FILES+=etc/isdn/isdntel -OLD_FILES+=etc/isdn/record -OLD_FILES+=etc/isdn/tell -OLD_FILES+=etc/isdn/tell-record -OLD_FILES+=etc/isdn/unknown_incoming -OLD_FILES+=etc/isdn/holidays.D -OLD_FILES+=etc/isdn/isdnd.rates.A -OLD_FILES+=etc/isdn/isdnd.rates.D -OLD_FILES+=etc/isdn/isdnd.rates.F -OLD_FILES+=etc/isdn/isdnd.rates.L -OLD_FILES+=etc/isdn/isdnd.rates.UK.BT -OLD_FILES+=etc/isdn/isdnd.rc.sample -OLD_FILES+=etc/isdn/isdntel.alias.sample -OLD_DIRS+=etc/isdn -OLD_FILES+=etc/rc.d/isdnd -OLD_FILES+=usr/include/i4b/i4b_cause.h -OLD_FILES+=usr/include/i4b/i4b_debug.h -OLD_FILES+=usr/include/i4b/i4b_ioctl.h -OLD_FILES+=usr/include/i4b/i4b_rbch_ioctl.h -OLD_FILES+=usr/include/i4b/i4b_tel_ioctl.h -OLD_FILES+=usr/include/i4b/i4b_trace.h -OLD_DIRS+=usr/include/i4b -OLD_FILES+=usr/sbin/dtmfdecode -OLD_FILES+=usr/sbin/g711conv -OLD_FILES+=usr/sbin/isdnd -OLD_FILES+=usr/sbin/isdndebug -OLD_FILES+=usr/sbin/isdndecode -OLD_FILES+=usr/sbin/isdnmonitor -OLD_FILES+=usr/sbin/isdnphone -OLD_FILES+=usr/sbin/isdntel -OLD_FILES+=usr/sbin/isdntelctl -OLD_FILES+=usr/sbin/isdntrace -OLD_FILES+=usr/share/isdn/0.al -OLD_FILES+=usr/share/isdn/1.al -OLD_FILES+=usr/share/isdn/2.al -OLD_FILES+=usr/share/isdn/3.al -OLD_FILES+=usr/share/isdn/4.al -OLD_FILES+=usr/share/isdn/5.al -OLD_FILES+=usr/share/isdn/6.al -OLD_FILES+=usr/share/isdn/7.al -OLD_FILES+=usr/share/isdn/8.al -OLD_FILES+=usr/share/isdn/9.al -OLD_FILES+=usr/share/isdn/beep.al -OLD_FILES+=usr/share/isdn/msg.al -OLD_DIRS+=usr/share/isdn -OLD_FILES+=usr/share/man/man1/dtmfdecode.1.gz -OLD_FILES+=usr/share/man/man1/g711conv.1.gz -OLD_FILES+=usr/share/man/man4/i4b.4.gz -OLD_FILES+=usr/share/man/man4/i4bcapi.4.gz -OLD_FILES+=usr/share/man/man4/i4bctl.4.gz -OLD_FILES+=usr/share/man/man4/i4bing.4.gz -OLD_FILES+=usr/share/man/man4/i4bipr.4.gz -OLD_FILES+=usr/share/man/man4/i4bisppp.4.gz -OLD_FILES+=usr/share/man/man4/i4bq921.4.gz -OLD_FILES+=usr/share/man/man4/i4bq931.4.gz -OLD_FILES+=usr/share/man/man4/i4brbch.4.gz -OLD_FILES+=usr/share/man/man4/i4btel.4.gz -OLD_FILES+=usr/share/man/man4/i4btrc.4.gz -OLD_FILES+=usr/share/man/man4/iavc.4.gz -OLD_FILES+=usr/share/man/man4/isic.4.gz -OLD_FILES+=usr/share/man/man4/ifpi.4.gz -OLD_FILES+=usr/share/man/man4/ifpi2.4.gz -OLD_FILES+=usr/share/man/man4/ifpnp.4.gz -OLD_FILES+=usr/share/man/man4/ihfc.4.gz -OLD_FILES+=usr/share/man/man4/itjc.4.gz -OLD_FILES+=usr/share/man/man4/iwic.4.gz -OLD_FILES+=usr/share/man/man5/isdnd.rc.5.gz -OLD_FILES+=usr/share/man/man5/isdnd.rates.5.gz -OLD_FILES+=usr/share/man/man5/isdnd.acct.5.gz -OLD_FILES+=usr/share/man/man8/isdnd.8.gz -OLD_FILES+=usr/share/man/man8/isdndebug.8.gz -OLD_FILES+=usr/share/man/man8/isdndecode.8.gz -OLD_FILES+=usr/share/man/man8/isdnmonitor.8.gz -OLD_FILES+=usr/share/man/man8/isdnphone.8.gz -OLD_FILES+=usr/share/man/man8/isdntel.8.gz -OLD_FILES+=usr/share/man/man8/isdntelctl.8.gz -OLD_FILES+=usr/share/man/man8/isdntrace.8.gz -OLD_FILES+=usr/share/examples/isdn/contrib/README -OLD_FILES+=usr/share/examples/isdn/contrib/anleitung.ppp -OLD_FILES+=usr/share/examples/isdn/contrib/answer.c -OLD_FILES+=usr/share/examples/isdn/contrib/answer.sh -OLD_FILES+=usr/share/examples/isdn/contrib/convert.sh -OLD_FILES+=usr/share/examples/isdn/contrib/hplay.c -OLD_FILES+=usr/share/examples/isdn/contrib/i4b-ppp-newbie.txt -OLD_FILES+=usr/share/examples/isdn/contrib/isdnctl -OLD_FILES+=usr/share/examples/isdn/contrib/isdnd_acct -OLD_FILES+=usr/share/examples/isdn/contrib/isdnd_acct.pl -OLD_FILES+=usr/share/examples/isdn/contrib/isdntelmux.c -OLD_FILES+=usr/share/examples/isdn/contrib/mrtg-isp0.sh -OLD_FILES+=usr/share/examples/isdn/i4brunppp/Makefile -OLD_FILES+=usr/share/examples/isdn/i4brunppp/README -OLD_FILES+=usr/share/examples/isdn/i4brunppp/i4brunppp-isdnd.rc -OLD_FILES+=usr/share/examples/isdn/i4brunppp/i4brunppp.8 -OLD_FILES+=usr/share/examples/isdn/i4brunppp/i4brunppp.c -OLD_FILES+=usr/share/examples/isdn/v21/Makefile -OLD_FILES+=usr/share/examples/isdn/v21/README -OLD_FILES+=usr/share/examples/isdn/v21/v21modem.c -OLD_FILES+=usr/share/examples/isdn/FAQ -OLD_FILES+=usr/share/examples/isdn/KERNEL -OLD_FILES+=usr/share/examples/isdn/Overview -OLD_FILES+=usr/share/examples/isdn/README -OLD_FILES+=usr/share/examples/isdn/ROADMAP -OLD_FILES+=usr/share/examples/isdn/ReleaseNotes -OLD_FILES+=usr/share/examples/isdn/Resources -OLD_FILES+=usr/share/examples/isdn/SupportedCards -OLD_FILES+=usr/share/examples/isdn/ThankYou -OLD_DIRS+=usr/share/examples/isdn/contrib -OLD_DIRS+=usr/share/examples/isdn/i4brunppp -OLD_DIRS+=usr/share/examples/isdn/v21 -OLD_DIRS+=usr/share/examples/isdn -OLD_FILES+=usr/share/examples/ppp/isdnd.rc -OLD_FILES+=usr/share/examples/ppp/ppp.conf.isdn -# 20080525: ng_atmpif removed -OLD_FILES+=usr/include/netgraph/atm/ng_atmpif.h -OLD_FILES+=usr/share/man/man4/ng_atmpif.4.gz -# 20080522: pmap_addr_hint removed -OLD_FILES+=usr/share/man/man9/pmap_addr_hint.9.gz -# 20080517: ipsec_osdep.h removed -OLD_FILES+=usr/include/netipsec/ipsec_osdep.h -# 20080507: heimdal 1.1 import -OLD_LIBS+=usr/lib/libasn1.so.9 -OLD_LIBS+=usr/lib/libgssapi.so.9 -OLD_LIBS+=usr/lib/libgssapi_krb5.so.9 -OLD_LIBS+=usr/lib/libhdb.so.9 -OLD_LIBS+=usr/lib/libkadm5clnt.so.9 -OLD_LIBS+=usr/lib/libkadm5srv.so.9 -OLD_LIBS+=usr/lib/libkafs5.so.9 -OLD_LIBS+=usr/lib/libkrb5.so.9 -OLD_LIBS+=usr/lib/libroken.so.9 -# 20080420: Symbol card support dropped -OLD_FILES+=usr/include/dev/wi/spectrum24t_cf.h -# 20080420: awi removal -OLD_FILES+=usr/share/man/man4/awi.4.gz -OLD_FILES+=usr/share/man/man4/if_awi.4.gz -# 20080331: pkg_sign has been removed -OLD_FILES+=usr/sbin/pkg_check -OLD_FILES+=usr/sbin/pkg_sign -OLD_FILES+=usr/share/man/man1/pkg_check.1.gz -OLD_FILES+=usr/share/man/man1/pkg_sign.1.gz -# 20080314: stack_print(9) mlink fixed -OLD_FILES+=usr/share/man/man9/stack_printf.9.gz -# 20080312: libkse removal -OLD_FILES+=usr/include/sys/kse.h -OLD_FILES+=usr/lib/libkse.so -OLD_LIBS+=usr/lib/libkse.so.3 -OLD_FILES+=usr/share/man/man2/kse.2.gz -OLD_FILES+=usr/share/man/man2/kse_create.2.gz -OLD_FILES+=usr/share/man/man2/kse_exit.2.gz -OLD_FILES+=usr/share/man/man2/kse_release.2.gz -OLD_FILES+=usr/share/man/man2/kse_switchin.2.gz -OLD_FILES+=usr/share/man/man2/kse_thr_interrupt.2.gz -OLD_FILES+=usr/share/man/man2/kse_wakeup.2.gz -# 20080225: bsdar/bsdranlib rename to ar/ranlib -OLD_FILES+=usr/bin/bsdar -OLD_FILES+=usr/bin/bsdranlib -OLD_FILES+=usr/share/man/man1/bsdar.1.gz -OLD_FILES+=usr/share/man/man1/bsdranlib.1.gz -# 20080220: geom_lvm rename to geom_linux_lvm -OLD_FILES+=usr/share/man/man4/geom_lvm.4.gz -# 20080126: oldcard.4 removal -OLD_FILES+=usr/share/man/man4/card.4.gz -OLD_FILES+=usr/share/man/man4/oldcard.4.gz -# 20080122: Removed from the tree -OLD_FILES+=usr/share/man/man9/BUF_REFCNT.9.gz -# 20080108: Moved to section 2 -OLD_FILES+=usr/share/man/man3/shm_open.3.gz -OLD_FILES+=usr/share/man/man3/shm_unlink.3.gz -# 20071207: Merged with fortunes-o.real -OLD_FILES+=usr/share/games/fortune/fortunes2-o -OLD_FILES+=usr/share/games/fortune/fortunes2-o.dat -# 20071201: Removal of XRPU driver -OLD_FILES+=usr/include/sys/xrpuio.h -# 20071129: Disabled static versions of libkse by default -OLD_FILES+=usr/lib/libkse.a -OLD_FILES+=usr/lib/libkse_p.a -OLD_FILES+=usr/lib/libkse_pic.a -# 20071129: Removed a Solaris compatibility header -OLD_FILES+=usr/include/sys/_elf_solaris.h -# 20071125: Renamed to pmc_get_msr() -OLD_FILES+=usr/share/man/man3/pmc_x86_get_msr.3.gz -# 20071108: Removed very crunch OLDCARD support file -OLD_FILES+=etc/defaults/pccard.conf -# 20071025: rc.d/nfslocking superseded by rc.d/lockd and rc.d/statd -OLD_FILES+=etc/rc.d/nfslocking -# 20070930: rename of cached to nscd -OLD_FILES+=etc/cached.conf -OLD_FILES+=etc/rc.d/cached -OLD_FILES+=usr/sbin/cached -OLD_FILES+=usr/share/man/man5/cached.conf.5.gz -OLD_FILES+=usr/share/man/man8/cached.8.gz -# 20070807: removal of PowerPC specific header file -.if ${TARGET_ARCH} == "powerpc" -OLD_FILES+=usr/include/machine/interruptvar.h -.endif -# 20070801: fast_ipsec.4 gone -OLD_FILES+=usr/share/man/man4/fast_ipsec.4.gz -# 20070715: netatm temporarily disconnected (removed 20080525) -OLD_FILES+=rescue/atm -OLD_FILES+=rescue/fore_dnld -OLD_FILES+=rescue/ilmid -OLD_FILES+=sbin/atm -OLD_FILES+=sbin/fore_dnld -OLD_FILES+=sbin/ilmid -OLD_FILES+=usr/include/libatm.h -OLD_FILES+=usr/include/netatm/atm.h -OLD_FILES+=usr/include/netatm/atm_cm.h -OLD_FILES+=usr/include/netatm/atm_if.h -OLD_FILES+=usr/include/netatm/atm_ioctl.h -OLD_FILES+=usr/include/netatm/atm_pcb.h -OLD_FILES+=usr/include/netatm/atm_sap.h -OLD_FILES+=usr/include/netatm/atm_sigmgr.h -OLD_FILES+=usr/include/netatm/atm_stack.h -OLD_FILES+=usr/include/netatm/atm_sys.h -OLD_FILES+=usr/include/netatm/atm_var.h -OLD_FILES+=usr/include/netatm/atm_vc.h -OLD_FILES+=usr/include/netatm/ipatm/ipatm.h -OLD_FILES+=usr/include/netatm/ipatm/ipatm_serv.h -OLD_FILES+=usr/include/netatm/ipatm/ipatm_var.h -OLD_FILES+=usr/include/netatm/port.h -OLD_FILES+=usr/include/netatm/queue.h -OLD_FILES+=usr/include/netatm/sigpvc/sigpvc_var.h -OLD_FILES+=usr/include/netatm/spans/spans_cls.h -OLD_FILES+=usr/include/netatm/spans/spans_kxdr.h -OLD_FILES+=usr/include/netatm/spans/spans_var.h -OLD_FILES+=usr/include/netatm/uni/sscf_uni.h -OLD_FILES+=usr/include/netatm/uni/sscf_uni_var.h -OLD_FILES+=usr/include/netatm/uni/sscop.h -OLD_FILES+=usr/include/netatm/uni/sscop_misc.h -OLD_FILES+=usr/include/netatm/uni/sscop_pdu.h -OLD_FILES+=usr/include/netatm/uni/sscop_var.h -OLD_FILES+=usr/include/netatm/uni/uni.h -OLD_FILES+=usr/include/netatm/uni/uniip_var.h -OLD_FILES+=usr/include/netatm/uni/unisig.h -OLD_FILES+=usr/include/netatm/uni/unisig_decode.h -OLD_FILES+=usr/include/netatm/uni/unisig_mbuf.h -OLD_FILES+=usr/include/netatm/uni/unisig_msg.h -OLD_FILES+=usr/include/netatm/uni/unisig_print.h -OLD_FILES+=usr/include/netatm/uni/unisig_var.h -OLD_FILES+=usr/lib/libatm.a -OLD_FILES+=usr/lib/libatm_p.a -OLD_FILES+=usr/sbin/atmarpd -OLD_FILES+=usr/sbin/scspd -OLD_FILES+=usr/share/man/en.ISO8859-1/man8/atm.8.gz -OLD_FILES+=usr/share/man/en.ISO8859-1/man8/atmarpd.8.gz -OLD_FILES+=usr/share/man/en.ISO8859-1/man8/fore_dnld.8.gz -OLD_FILES+=usr/share/man/en.ISO8859-1/man8/ilmid.8.gz -OLD_FILES+=usr/share/man/en.ISO8859-1/man8/scspd.8.gz -OLD_FILES+=usr/share/man/man8/atm.8.gz -OLD_FILES+=usr/share/man/man8/atmarpd.8.gz -OLD_FILES+=usr/share/man/man8/fore_dnld.8.gz -OLD_FILES+=usr/share/man/man8/ilmid.8.gz -OLD_FILES+=usr/share/man/man8/scspd.8.gz -OLD_FILES+=usr/share/examples/atm/NOTES -OLD_FILES+=usr/share/examples/atm/README -OLD_FILES+=usr/share/examples/atm/Startup -OLD_FILES+=usr/share/examples/atm/atm-config.sh -OLD_FILES+=usr/share/examples/atm/atm-sockets.txt -OLD_FILES+=usr/share/examples/atm/cpcs-design.txt -OLD_FILES+=usr/share/examples/atm/fore-microcode.txt -OLD_FILES+=usr/share/examples/atm/sscf-design.txt -OLD_FILES+=usr/share/examples/atm/sscop-design.txt -OLD_LIBS+=lib/libatm.so.5 -OLD_FILES+=usr/lib/libatm.so -OLD_DIRS+=usr/include/netatm/sigpvc -OLD_DIRS+=usr/include/netatm/spans -OLD_DIRS+=usr/include/netatm/ipatm -OLD_DIRS+=usr/include/netatm/uni -OLD_DIRS+=usr/include/netatm -OLD_DIRS+=usr/share/examples/atm -# 20070705: I4B headers repo-copied to include/i4b/ -.if ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/include/machine/i4b_cause.h -OLD_FILES+=usr/include/machine/i4b_debug.h -OLD_FILES+=usr/include/machine/i4b_ioctl.h -OLD_FILES+=usr/include/machine/i4b_rbch_ioctl.h -OLD_FILES+=usr/include/machine/i4b_tel_ioctl.h -OLD_FILES+=usr/include/machine/i4b_trace.h -.endif -# 20070703: pf 4.1 import -OLD_FILES+=usr/libexec/ftp-proxy -# 20070701: KAME IPSec removal -OLD_FILES+=usr/include/netinet6/ah.h -OLD_FILES+=usr/include/netinet6/ah6.h -OLD_FILES+=usr/include/netinet6/ah_aesxcbcmac.h -OLD_FILES+=usr/include/netinet6/esp.h -OLD_FILES+=usr/include/netinet6/esp6.h -OLD_FILES+=usr/include/netinet6/esp_aesctr.h -OLD_FILES+=usr/include/netinet6/esp_camellia.h -OLD_FILES+=usr/include/netinet6/esp_rijndael.h -OLD_FILES+=usr/include/netinet6/ipsec.h -OLD_FILES+=usr/include/netinet6/ipsec6.h -OLD_FILES+=usr/include/netinet6/ipcomp.h -OLD_FILES+=usr/include/netinet6/ipcomp6.h -OLD_FILES+=usr/include/netkey/key.h -OLD_FILES+=usr/include/netkey/key_debug.h -OLD_FILES+=usr/include/netkey/key_var.h -OLD_FILES+=usr/include/netkey/keydb.h -OLD_FILES+=usr/include/netkey/keysock.h -OLD_DIRS+=usr/include/netkey -# 20070701: remove wicontrol -OLD_FILES+=usr/sbin/wicontrol -OLD_FILES+=usr/share/man/man8/wicontrol.8.gz -# 20070625: umapfs removal -OLD_FILES+=rescue/mount_umapfs -OLD_FILES+=sbin/mount_umapfs -OLD_FILES+=usr/include/fs/umapfs/umap.h -OLD_FILES+=usr/share/man/man8/mount_umapfs.8.gz -OLD_DIRS+=usr/include/fs/umapfs -# 20070618: Removal of the PROTO.localhost* files -OLD_FILES+=etc/namedb/PROTO.localhost-v6.rev -OLD_FILES+=etc/namedb/PROTO.localhost.rev -OLD_FILES+=etc/namedb/make-localhost -# 20070618: shared library version bump -OLD_LIBS+=lib/libalias.so.5 -OLD_LIBS+=lib/libbsnmp.so.3 -OLD_LIBS+=lib/libncurses.so.6 -OLD_LIBS+=lib/libncursesw.so.6 -OLD_LIBS+=lib/libreadline.so.6 -OLD_LIBS+=usr/lib/libdialog.so.5 -OLD_LIBS+=usr/lib/libgnuregex.so.3 -OLD_LIBS+=usr/lib/libhistory.so.6 -OLD_LIBS+=usr/lib/libpam.so.3 -OLD_LIBS+=usr/lib/libssh.so.3 -OLD_LIBS+=usr/lib/pam_chroot.so.3 -OLD_LIBS+=usr/lib/pam_deny.so.3 -OLD_LIBS+=usr/lib/pam_echo.so.3 -OLD_LIBS+=usr/lib/pam_exec.so.3 -OLD_LIBS+=usr/lib/pam_ftpusers.so.3 -OLD_LIBS+=usr/lib/pam_group.so.3 -OLD_LIBS+=usr/lib/pam_guest.so.3 -OLD_LIBS+=usr/lib/pam_krb5.so.3 -OLD_LIBS+=usr/lib/pam_ksu.so.3 -OLD_LIBS+=usr/lib/pam_lastlog.so.3 -OLD_LIBS+=usr/lib/pam_login_access.so.3 -OLD_LIBS+=usr/lib/pam_nologin.so.3 -OLD_LIBS+=usr/lib/pam_opie.so.3 -OLD_LIBS+=usr/lib/pam_opieaccess.so.3 -OLD_LIBS+=usr/lib/pam_passwdqc.so.3 -OLD_LIBS+=usr/lib/pam_permit.so.3 -OLD_LIBS+=usr/lib/pam_radius.so.3 -OLD_LIBS+=usr/lib/pam_rhosts.so.3 -OLD_LIBS+=usr/lib/pam_rootok.so.3 -OLD_LIBS+=usr/lib/pam_securetty.so.3 -OLD_LIBS+=usr/lib/pam_self.so.3 -OLD_LIBS+=usr/lib/pam_ssh.so.3 -OLD_LIBS+=usr/lib/pam_tacplus.so.3 -OLD_LIBS+=usr/lib/pam_unix.so.3 -OLD_LIBS+=usr/lib/snmp_atm.so.4 -OLD_LIBS+=usr/lib/snmp_bridge.so.4 -OLD_LIBS+=usr/lib/snmp_hostres.so.4 -OLD_LIBS+=usr/lib/snmp_mibII.so.4 -OLD_LIBS+=usr/lib/snmp_netgraph.so.4 -OLD_LIBS+=usr/lib/snmp_pf.so.4 -# 20070613: IPX over IP tunnel removal -OLD_FILES+=usr/include/netipx/ipx_ip.h -# 20070605: sched_core removal -OLD_FILES+=usr/share/man/man4/sched_core.4.gz -# 20070603: BIND 9.4.1 import -OLD_LIBS+=usr/lib/liblwres.so.10 -# 20070521: shared library version bump -OLD_LIBS+=lib/libatm.so.4 -OLD_LIBS+=lib/libbegemot.so.2 -OLD_LIBS+=lib/libbsdxml.so.2 -OLD_LIBS+=lib/libcam.so.3 -OLD_LIBS+=lib/libcrypt.so.3 -OLD_LIBS+=lib/libdevstat.so.5 -OLD_LIBS+=lib/libedit.so.5 -OLD_LIBS+=lib/libgeom.so.3 -OLD_LIBS+=lib/libipsec.so.2 -OLD_LIBS+=lib/libipx.so.3 -OLD_LIBS+=lib/libkiconv.so.2 -OLD_LIBS+=lib/libkse.so.2 -OLD_LIBS+=lib/libkvm.so.3 -OLD_LIBS+=lib/libm.so.4 -OLD_LIBS+=lib/libmd.so.3 -OLD_LIBS+=lib/libpcap.so.4 -OLD_LIBS+=lib/libpthread.so.2 -OLD_LIBS+=lib/libsbuf.so.3 -OLD_LIBS+=lib/libthr.so.2 -OLD_LIBS+=lib/libufs.so.3 -OLD_LIBS+=lib/libutil.so.6 -OLD_LIBS+=lib/libz.so.3 -OLD_LIBS+=usr/lib/libbluetooth.so.2 -OLD_LIBS+=usr/lib/libbsm.so.1 -OLD_LIBS+=usr/lib/libbz2.so.2 -OLD_LIBS+=usr/lib/libcalendar.so.3 -OLD_LIBS+=usr/lib/libcom_err.so.3 -OLD_LIBS+=usr/lib/libdevinfo.so.3 -OLD_LIBS+=usr/lib/libfetch.so.4 -OLD_LIBS+=usr/lib/libform.so.3 -OLD_LIBS+=usr/lib/libformw.so.3 -OLD_LIBS+=usr/lib/libftpio.so.6 -OLD_LIBS+=usr/lib/libgpib.so.1 -OLD_LIBS+=usr/lib/libkse.so.2 -OLD_LIBS+=usr/lib/libmagic.so.2 -OLD_LIBS+=usr/lib/libmemstat.so.1 -OLD_LIBS+=usr/lib/libmenu.so.3 -OLD_LIBS+=usr/lib/libmenuw.so.3 -OLD_LIBS+=usr/lib/libmilter.so.3 -OLD_LIBS+=usr/lib/libmp.so.5 -OLD_LIBS+=usr/lib/libncp.so.2 -OLD_LIBS+=usr/lib/libnetgraph.so.2 -OLD_LIBS+=usr/lib/libngatm.so.2 -OLD_LIBS+=usr/lib/libopie.so.4 -OLD_LIBS+=usr/lib/libpanel.so.3 -OLD_LIBS+=usr/lib/libpanelw.so.3 -OLD_LIBS+=usr/lib/libpmc.so.3 -OLD_LIBS+=usr/lib/libradius.so.2 -OLD_LIBS+=usr/lib/librpcsvc.so.3 -OLD_LIBS+=usr/lib/libsdp.so.2 -OLD_LIBS+=usr/lib/libsmb.so.2 -OLD_LIBS+=usr/lib/libstdc++.so.5 -OLD_LIBS+=usr/lib/libtacplus.so.2 -OLD_LIBS+=usr/lib/libthr.so.2 -OLD_LIBS+=usr/lib/libthread_db.so.2 -OLD_LIBS+=usr/lib/libugidfw.so.2 -OLD_LIBS+=usr/lib/libusbhid.so.2 -OLD_LIBS+=usr/lib/libvgl.so.4 -OLD_LIBS+=usr/lib/libwrap.so.4 -OLD_LIBS+=usr/lib/libypclnt.so.2 -OLD_LIBS+=usr/lib/snmp_bridge.so.3 -OLD_LIBS+=usr/lib/snmp_hostres.so.3 -# 20070519: GCC 4.2 -OLD_FILES+=usr/bin/f77 -OLD_FILES+=usr/bin/protoize -OLD_FILES+=usr/include/g2c.h -OLD_FILES+=usr/libexec/f771 -OLD_FILES+=usr/share/info/g77.info.gz -OLD_FILES+=usr/share/man/man1/f77.1.gz -OLD_FILES+=usr/include/c++/3.4/algorithm -OLD_FILES+=usr/include/c++/3.4/backward/algo.h -OLD_FILES+=usr/include/c++/3.4/backward/algobase.h -OLD_FILES+=usr/include/c++/3.4/backward/alloc.h -OLD_FILES+=usr/include/c++/3.4/backward/backward_warning.h -OLD_FILES+=usr/include/c++/3.4/backward/bvector.h -OLD_FILES+=usr/include/c++/3.4/backward/complex.h -OLD_FILES+=usr/include/c++/3.4/backward/defalloc.h -OLD_FILES+=usr/include/c++/3.4/backward/deque.h -OLD_FILES+=usr/include/c++/3.4/backward/fstream.h -OLD_FILES+=usr/include/c++/3.4/backward/function.h -OLD_FILES+=usr/include/c++/3.4/backward/hash_map.h -OLD_FILES+=usr/include/c++/3.4/backward/hash_set.h -OLD_FILES+=usr/include/c++/3.4/backward/hashtable.h -OLD_FILES+=usr/include/c++/3.4/backward/heap.h -OLD_FILES+=usr/include/c++/3.4/backward/iomanip.h -OLD_FILES+=usr/include/c++/3.4/backward/iostream.h -OLD_FILES+=usr/include/c++/3.4/backward/istream.h -OLD_FILES+=usr/include/c++/3.4/backward/iterator.h -OLD_FILES+=usr/include/c++/3.4/backward/list.h -OLD_FILES+=usr/include/c++/3.4/backward/map.h -OLD_FILES+=usr/include/c++/3.4/backward/multimap.h -OLD_FILES+=usr/include/c++/3.4/backward/multiset.h -OLD_FILES+=usr/include/c++/3.4/backward/new.h -OLD_FILES+=usr/include/c++/3.4/backward/ostream.h -OLD_FILES+=usr/include/c++/3.4/backward/pair.h -OLD_FILES+=usr/include/c++/3.4/backward/queue.h -OLD_FILES+=usr/include/c++/3.4/backward/rope.h -OLD_FILES+=usr/include/c++/3.4/backward/set.h -OLD_FILES+=usr/include/c++/3.4/backward/slist.h -OLD_FILES+=usr/include/c++/3.4/backward/stack.h -OLD_FILES+=usr/include/c++/3.4/backward/stream.h -OLD_FILES+=usr/include/c++/3.4/backward/streambuf.h -OLD_FILES+=usr/include/c++/3.4/backward/strstream -OLD_FILES+=usr/include/c++/3.4/backward/tempbuf.h -OLD_FILES+=usr/include/c++/3.4/backward/tree.h -OLD_FILES+=usr/include/c++/3.4/backward/vector.h -OLD_FILES+=usr/include/c++/3.4/bits/allocator.h -OLD_FILES+=usr/include/c++/3.4/bits/atomic_word.h -OLD_FILES+=usr/include/c++/3.4/bits/atomicity.h -OLD_FILES+=usr/include/c++/3.4/bits/basic_file.h -OLD_FILES+=usr/include/c++/3.4/bits/basic_ios.h -OLD_FILES+=usr/include/c++/3.4/bits/basic_ios.tcc -OLD_FILES+=usr/include/c++/3.4/bits/basic_string.h -OLD_FILES+=usr/include/c++/3.4/bits/basic_string.tcc -OLD_FILES+=usr/include/c++/3.4/bits/boost_concept_check.h -OLD_FILES+=usr/include/c++/3.4/bits/c++allocator.h -OLD_FILES+=usr/include/c++/3.4/bits/c++config.h -OLD_FILES+=usr/include/c++/3.4/bits/c++io.h -OLD_FILES+=usr/include/c++/3.4/bits/c++locale.h -OLD_FILES+=usr/include/c++/3.4/bits/c++locale_internal.h -OLD_FILES+=usr/include/c++/3.4/bits/char_traits.h -OLD_FILES+=usr/include/c++/3.4/bits/cmath.tcc -OLD_FILES+=usr/include/c++/3.4/bits/codecvt.h -OLD_FILES+=usr/include/c++/3.4/bits/codecvt_specializations.h -OLD_FILES+=usr/include/c++/3.4/bits/concept_check.h -OLD_FILES+=usr/include/c++/3.4/bits/concurrence.h -OLD_FILES+=usr/include/c++/3.4/bits/cpp_type_traits.h -OLD_FILES+=usr/include/c++/3.4/bits/ctype_base.h -OLD_FILES+=usr/include/c++/3.4/bits/ctype_inline.h -OLD_FILES+=usr/include/c++/3.4/bits/ctype_noninline.h -OLD_FILES+=usr/include/c++/3.4/bits/deque.tcc -OLD_FILES+=usr/include/c++/3.4/bits/fstream.tcc -OLD_FILES+=usr/include/c++/3.4/bits/functexcept.h -OLD_FILES+=usr/include/c++/3.4/bits/gslice.h -OLD_FILES+=usr/include/c++/3.4/bits/gslice_array.h -OLD_FILES+=usr/include/c++/3.4/bits/gthr-default.h -OLD_FILES+=usr/include/c++/3.4/bits/gthr-posix.h -OLD_FILES+=usr/include/c++/3.4/bits/gthr-single.h -OLD_FILES+=usr/include/c++/3.4/bits/gthr.h -OLD_FILES+=usr/include/c++/3.4/bits/indirect_array.h -OLD_FILES+=usr/include/c++/3.4/bits/ios_base.h -OLD_FILES+=usr/include/c++/3.4/bits/istream.tcc -OLD_FILES+=usr/include/c++/3.4/bits/list.tcc -OLD_FILES+=usr/include/c++/3.4/bits/locale_classes.h -OLD_FILES+=usr/include/c++/3.4/bits/locale_facets.h -OLD_FILES+=usr/include/c++/3.4/bits/locale_facets.tcc -OLD_FILES+=usr/include/c++/3.4/bits/localefwd.h -OLD_FILES+=usr/include/c++/3.4/bits/mask_array.h -OLD_FILES+=usr/include/c++/3.4/bits/messages_members.h -OLD_FILES+=usr/include/c++/3.4/bits/os_defines.h -OLD_FILES+=usr/include/c++/3.4/bits/ostream.tcc -OLD_FILES+=usr/include/c++/3.4/bits/postypes.h -OLD_FILES+=usr/include/c++/3.4/bits/slice_array.h -OLD_FILES+=usr/include/c++/3.4/bits/sstream.tcc -OLD_FILES+=usr/include/c++/3.4/bits/stl_algo.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_algobase.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_bvector.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_construct.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_deque.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_function.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_heap.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_iterator.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_iterator_base_funcs.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_iterator_base_types.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_list.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_map.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_multimap.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_multiset.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_numeric.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_pair.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_queue.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_raw_storage_iter.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_relops.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_set.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_stack.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_tempbuf.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_threads.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_tree.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_uninitialized.h -OLD_FILES+=usr/include/c++/3.4/bits/stl_vector.h -OLD_FILES+=usr/include/c++/3.4/bits/stream_iterator.h -OLD_FILES+=usr/include/c++/3.4/bits/streambuf.tcc -OLD_FILES+=usr/include/c++/3.4/bits/streambuf_iterator.h -OLD_FILES+=usr/include/c++/3.4/bits/stringfwd.h -OLD_FILES+=usr/include/c++/3.4/bits/time_members.h -OLD_FILES+=usr/include/c++/3.4/bits/type_traits.h -OLD_FILES+=usr/include/c++/3.4/bits/valarray_after.h -OLD_FILES+=usr/include/c++/3.4/bits/valarray_array.h -OLD_FILES+=usr/include/c++/3.4/bits/valarray_array.tcc -OLD_FILES+=usr/include/c++/3.4/bits/valarray_before.h -OLD_FILES+=usr/include/c++/3.4/bits/vector.tcc -OLD_FILES+=usr/include/c++/3.4/bitset -OLD_FILES+=usr/include/c++/3.4/cassert -OLD_FILES+=usr/include/c++/3.4/cctype -OLD_FILES+=usr/include/c++/3.4/cerrno -OLD_FILES+=usr/include/c++/3.4/cfloat -OLD_FILES+=usr/include/c++/3.4/ciso646 -OLD_FILES+=usr/include/c++/3.4/climits -OLD_FILES+=usr/include/c++/3.4/clocale -OLD_FILES+=usr/include/c++/3.4/cmath -OLD_FILES+=usr/include/c++/3.4/complex -OLD_FILES+=usr/include/c++/3.4/csetjmp -OLD_FILES+=usr/include/c++/3.4/csignal -OLD_FILES+=usr/include/c++/3.4/cstdarg -OLD_FILES+=usr/include/c++/3.4/cstddef -OLD_FILES+=usr/include/c++/3.4/cstdio -OLD_FILES+=usr/include/c++/3.4/cstdlib -OLD_FILES+=usr/include/c++/3.4/cstring -OLD_FILES+=usr/include/c++/3.4/ctime -OLD_FILES+=usr/include/c++/3.4/cwchar -OLD_FILES+=usr/include/c++/3.4/cwctype -OLD_FILES+=usr/include/c++/3.4/cxxabi.h -OLD_FILES+=usr/include/c++/3.4/debug/bitset -OLD_FILES+=usr/include/c++/3.4/debug/debug.h -OLD_FILES+=usr/include/c++/3.4/debug/deque -OLD_FILES+=usr/include/c++/3.4/debug/formatter.h -OLD_FILES+=usr/include/c++/3.4/debug/hash_map -OLD_FILES+=usr/include/c++/3.4/debug/hash_map.h -OLD_FILES+=usr/include/c++/3.4/debug/hash_multimap.h -OLD_FILES+=usr/include/c++/3.4/debug/hash_multiset.h -OLD_FILES+=usr/include/c++/3.4/debug/hash_set -OLD_FILES+=usr/include/c++/3.4/debug/hash_set.h -OLD_FILES+=usr/include/c++/3.4/debug/list -OLD_FILES+=usr/include/c++/3.4/debug/map -OLD_FILES+=usr/include/c++/3.4/debug/map.h -OLD_FILES+=usr/include/c++/3.4/debug/multimap.h -OLD_FILES+=usr/include/c++/3.4/debug/multiset.h -OLD_FILES+=usr/include/c++/3.4/debug/safe_base.h -OLD_FILES+=usr/include/c++/3.4/debug/safe_iterator.h -OLD_FILES+=usr/include/c++/3.4/debug/safe_iterator.tcc -OLD_FILES+=usr/include/c++/3.4/debug/safe_sequence.h -OLD_FILES+=usr/include/c++/3.4/debug/set -OLD_FILES+=usr/include/c++/3.4/debug/set.h -OLD_FILES+=usr/include/c++/3.4/debug/string -OLD_FILES+=usr/include/c++/3.4/debug/vector -OLD_FILES+=usr/include/c++/3.4/deque -OLD_FILES+=usr/include/c++/3.4/exception -OLD_FILES+=usr/include/c++/3.4/exception_defines.h -OLD_FILES+=usr/include/c++/3.4/ext/algorithm -OLD_FILES+=usr/include/c++/3.4/ext/bitmap_allocator.h -OLD_FILES+=usr/include/c++/3.4/ext/debug_allocator.h -OLD_FILES+=usr/include/c++/3.4/ext/enc_filebuf.h -OLD_FILES+=usr/include/c++/3.4/ext/functional -OLD_FILES+=usr/include/c++/3.4/ext/hash_fun.h -OLD_FILES+=usr/include/c++/3.4/ext/hash_map -OLD_FILES+=usr/include/c++/3.4/ext/hash_set -OLD_FILES+=usr/include/c++/3.4/ext/hashtable.h -OLD_FILES+=usr/include/c++/3.4/ext/iterator -OLD_FILES+=usr/include/c++/3.4/ext/malloc_allocator.h -OLD_FILES+=usr/include/c++/3.4/ext/memory -OLD_FILES+=usr/include/c++/3.4/ext/mt_allocator.h -OLD_FILES+=usr/include/c++/3.4/ext/new_allocator.h -OLD_FILES+=usr/include/c++/3.4/ext/numeric -OLD_FILES+=usr/include/c++/3.4/ext/pod_char_traits.h -OLD_FILES+=usr/include/c++/3.4/ext/pool_allocator.h -OLD_FILES+=usr/include/c++/3.4/ext/rb_tree -OLD_FILES+=usr/include/c++/3.4/ext/rope -OLD_FILES+=usr/include/c++/3.4/ext/ropeimpl.h -OLD_FILES+=usr/include/c++/3.4/ext/slist -OLD_FILES+=usr/include/c++/3.4/ext/stdio_filebuf.h -OLD_FILES+=usr/include/c++/3.4/ext/stdio_sync_filebuf.h -OLD_FILES+=usr/include/c++/3.4/fstream -OLD_FILES+=usr/include/c++/3.4/functional -OLD_FILES+=usr/include/c++/3.4/iomanip -OLD_FILES+=usr/include/c++/3.4/ios -OLD_FILES+=usr/include/c++/3.4/iosfwd -OLD_FILES+=usr/include/c++/3.4/iostream -OLD_FILES+=usr/include/c++/3.4/istream -OLD_FILES+=usr/include/c++/3.4/iterator -OLD_FILES+=usr/include/c++/3.4/limits -OLD_FILES+=usr/include/c++/3.4/list -OLD_FILES+=usr/include/c++/3.4/locale -OLD_FILES+=usr/include/c++/3.4/map -OLD_FILES+=usr/include/c++/3.4/memory -OLD_FILES+=usr/include/c++/3.4/new -OLD_FILES+=usr/include/c++/3.4/numeric -OLD_FILES+=usr/include/c++/3.4/ostream -OLD_FILES+=usr/include/c++/3.4/queue -OLD_FILES+=usr/include/c++/3.4/set -OLD_FILES+=usr/include/c++/3.4/sstream -OLD_FILES+=usr/include/c++/3.4/stack -OLD_FILES+=usr/include/c++/3.4/stdexcept -OLD_FILES+=usr/include/c++/3.4/streambuf -OLD_FILES+=usr/include/c++/3.4/string -OLD_FILES+=usr/include/c++/3.4/typeinfo -OLD_FILES+=usr/include/c++/3.4/utility -OLD_FILES+=usr/include/c++/3.4/valarray -OLD_FILES+=usr/include/c++/3.4/vector -OLD_DIRS+=usr/include/c++/3.4/backward -OLD_DIRS+=usr/include/c++/3.4/bits -OLD_DIRS+=usr/include/c++/3.4/debug -OLD_DIRS+=usr/include/c++/3.4/ext -OLD_DIRS+=usr/include/c++/3.4 -# 20070510: zpool/zfs moved to /sbin -OLD_FILES+=usr/sbin/zfs -OLD_FILES+=usr/sbin/zpool -# 20070423: rc.bluetooth (examples) removed -OLD_FILES+=usr/share/examples/netgraph/bluetooth/rc.bluetooth -OLD_DIRS+=usr/share/examples/netgraph/bluetooth -# 20070421: worm.4 removed -OLD_FILES+=usr/share/man/man4/worm.4.gz -# 20070417: trunk(4) renamed to lagg(4) -OLD_FILES+=usr/include/net/if_trunk.h -# 20070409: uuidgen moved to /bin/ -OLD_FILES+=usr/bin/uuidgen -# 20070328: bzip2 1.0.4 -OLD_FILES+=usr/share/info/bzip2.info.gz -# 20070303: libarchive 2.0 -OLD_LIBS+=usr/lib/libarchive.so.3 -# 20070301: remove addr2ascii and ascii2addr -OLD_FILES+=usr/share/man/man3/addr2ascii.3.gz -OLD_FILES+=usr/share/man/man3/ascii2addr.3.gz -# 20070225: vm_page_unmanage() removed -OLD_FILES+=usr/share/man/man9/vm_page_unmanage.9.gz -# 20070216: VFS_VPTOFH(9) -> VOP_VPTOFH(9) -OLD_FILES+=usr/share/man/man9/VFS_VPTOFH.9.gz -# 20070212: kame.4 removed -OLD_FILES+=usr/share/man/man4/kame.4.gz -# 20070201: remove libmytinfo link -OLD_FILES+=usr/lib/libmytinfo.a -OLD_FILES+=usr/lib/libmytinfo.so -OLD_FILES+=usr/lib/libmytinfo_p.a -OLD_FILES+=usr/lib/libmytinfow.a -OLD_FILES+=usr/lib/libmytinfow.so -OLD_FILES+=usr/lib/libmytinfow_p.a -# 20070128: remove vnconfig -OLD_FILES+=usr/sbin/vnconfig -# 20070127: remove bpf_compat.h -OLD_FILES+=usr/include/net/bpf_compat.h -# 20070125: objformat bites the dust -OLD_FILES+=usr/bin/objformat -OLD_FILES+=usr/share/man/man1/objformat.1.gz -OLD_FILES+=usr/include/objformat.h -OLD_FILES+=usr/share/man/man3/getobjformat.3.gz -# 20061008: rename *.so.4 libalias modules to *.so and move to /lib -# This uses MOVED_LIBS because the new files are libraries even though -# the old files to remove are symlinks -MOVED_LIBS+=usr/lib/libalias_cuseeme.so -MOVED_LIBS+=usr/lib/libalias_dummy.so -MOVED_LIBS+=usr/lib/libalias_ftp.so -MOVED_LIBS+=usr/lib/libalias_irc.so -MOVED_LIBS+=usr/lib/libalias_nbt.so -MOVED_LIBS+=usr/lib/libalias_pptp.so -MOVED_LIBS+=usr/lib/libalias_skinny.so -MOVED_LIBS+=usr/lib/libalias_smedia.so -OLD_LIBS+=lib/libalias_cuseeme.so.4 -OLD_LIBS+=lib/libalias_dummy.so.4 -OLD_LIBS+=lib/libalias_ftp.so.4 -OLD_LIBS+=lib/libalias_irc.so.4 -OLD_LIBS+=lib/libalias_nbt.so.4 -OLD_LIBS+=lib/libalias_pptp.so.4 -OLD_LIBS+=lib/libalias_skinny.so.4 -OLD_LIBS+=lib/libalias_smedia.so.4 -# 20061126: remove old man page -OLD_FILES+=usr/share/man/man3/archive_read_set_bytes_per_block.3.gz -# 20061125: remove old man page -OLD_FILES+=usr/share/man/man9/devsw.9.gz -# 20061122: remove obsolete mount programs -OLD_FILES+=sbin/mount_devfs -OLD_FILES+=sbin/mount_ext2fs -OLD_FILES+=sbin/mount_fdescfs -OLD_FILES+=sbin/mount_linprocfs -OLD_FILES+=sbin/mount_procfs -OLD_FILES+=sbin/mount_std -OLD_FILES+=rescue/mount_devfs -OLD_FILES+=rescue/mount_ext2fs -OLD_FILES+=rescue/mount_fdescfs -OLD_FILES+=rescue/mount_linprocfs -OLD_FILES+=rescue/mount_procfs -OLD_FILES+=rescue/mount_std -OLD_FILES+=usr/share/man/man8/mount_devfs.8.gz -OLD_FILES+=usr/share/man/man8/mount_ext2fs.8.gz -OLD_FILES+=usr/share/man/man8/mount_fdescfs.8.gz -OLD_FILES+=usr/share/man/man8/mount_linprocfs.8.gz -OLD_FILES+=usr/share/man/man8/mount_procfs.8.gz -OLD_FILES+=usr/share/man/man8/mount_std.8.gz -# 20061116: uhidev.4 removed -OLD_FILES+=usr/share/man/man4/uhidev.4.gz -# 20061106: archive_write_prepare.3 removed -OLD_FILES+=usr/share/man/man3/archive_write_prepare.3.gz -# 20061018: pccardc removed -OLD_FILES+=usr/sbin/pccardc usr/share/man/man8/pccardc.8.gz -# 20060930: demangle.h from contrib/libstdc++/include/ext/ -OLD_FILES+=usr/include/c++/3.4/ext/demangle.h -# 20060929: mrouted removed -OLD_FILES+=usr/sbin/map-mbone -OLD_FILES+=usr/sbin/mrinfo -OLD_FILES+=usr/sbin/mrouted -OLD_FILES+=usr/sbin/mtrace -OLD_FILES+=usr/share/man/man8/map-mbone.8.gz -OLD_FILES+=usr/share/man/man8/mrinfo.8.gz -OLD_FILES+=usr/share/man/man8/mrouted.8.gz -OLD_FILES+=usr/share/man/man8/mtrace.8.gz -# 20060924: tcpslice removed -OLD_FILES+=usr/sbin/tcpslice -OLD_FILES+=usr/share/man/man1/tcpslice.1.gz -# 20060829: kvmdb cleanup script removed -OLD_FILES+=etc/periodic/weekly/120.clean-kvmdb -# 20060822: ramdisk{,-own} have been replaced by mdconfig{,2} -OLD_FILES+=etc/rc.d/ramdisk -OLD_FILES+=etc/rc.d/ramdisk-own -# 20060729: OpenSSL 0.9.7e -> 0.9.8b upgrade -OLD_FILES+=usr/include/openssl/eng_int.h -OLD_FILES+=usr/include/openssl/hw_4758_cca_err.h -OLD_FILES+=usr/include/openssl/hw_aep_err.h -OLD_FILES+=usr/include/openssl/hw_atalla_err.h -OLD_FILES+=usr/include/openssl/hw_cswift_err.h -OLD_FILES+=usr/include/openssl/hw_ncipher_err.h -OLD_FILES+=usr/include/openssl/hw_nuron_err.h -OLD_FILES+=usr/include/openssl/hw_sureware_err.h -OLD_FILES+=usr/include/openssl/hw_ubsec_err.h -# 20060713: mount_linsysfs(8) never existed in 7.x -OLD_FILES+=sbin/mount_linsysfs -OLD_FILES+=usr/share/man/man8/mount_linsysfs.8.gz -# 20060704: KAME compat file net_osdep.h removed -OLD_FILES+=usr/include/net/net_osdep.h -# 20060605: man page links removed by OpenBSM 1.0 alpha 6 import -OLD_FILES+=usr/share/man/man3/au_to_socket.3.gz -OLD_FILES+=usr/share/man/man3/au_to_socket_ex_128.3.gz -OLD_FILES+=usr/share/man/man3/au_to_socket_ex_32.3.gz -# 20060517: pcvt removed -OLD_FILES+=usr/share/pcvt/README.FIRST -OLD_FILES+=usr/share/pcvt/Etc/xmodmap-german -OLD_FILES+=usr/share/pcvt/Etc/pcvt.sh -OLD_FILES+=usr/share/pcvt/Etc/pcvt.el -OLD_FILES+=usr/share/pcvt/Etc/Terminfo -OLD_FILES+=usr/share/pcvt/Etc/Termcap -OLD_DIRS+=usr/share/pcvt/Etc -OLD_FILES+=usr/share/pcvt/Doc/NotesAndHints -OLD_FILES+=usr/share/pcvt/Doc/Keyboard.VT -OLD_FILES+=usr/share/pcvt/Doc/Keyboard.HP -OLD_FILES+=usr/share/pcvt/Doc/EscapeSequences -OLD_FILES+=usr/share/pcvt/Doc/Charsets -OLD_FILES+=usr/share/pcvt/Doc/CharGen -OLD_FILES+=usr/share/pcvt/Doc/Bibliography -OLD_FILES+=usr/share/pcvt/Doc/Acknowledgements -OLD_DIRS+=usr/share/pcvt/Doc -OLD_DIRS+=usr/share/pcvt -OLD_FILES+=usr/share/misc/pcvtfonts/vt220l.816 -OLD_FILES+=usr/share/misc/pcvtfonts/vt220l.814 -OLD_FILES+=usr/share/misc/pcvtfonts/vt220l.810 -OLD_FILES+=usr/share/misc/pcvtfonts/vt220l.808 -OLD_FILES+=usr/share/misc/pcvtfonts/vt220h.816 -OLD_FILES+=usr/share/misc/pcvtfonts/vt220h.814 -OLD_FILES+=usr/share/misc/pcvtfonts/vt220h.810 -OLD_FILES+=usr/share/misc/pcvtfonts/vt220h.808 -OLD_DIRS+=usr/share/misc/pcvtfonts -OLD_FILES+=usr/share/misc/keycap.pcvt -OLD_FILES+=usr/share/man/man8/ispcvt.8.gz -OLD_FILES+=usr/share/man/man5/keycap.5.gz -OLD_FILES+=usr/share/man/man4/pcvt.4.gz -OLD_FILES+=usr/share/man/man3/kgetstr.3.gz -OLD_FILES+=usr/share/man/man3/kgetnum.3.gz -OLD_FILES+=usr/share/man/man3/kgetflag.3.gz -OLD_FILES+=usr/share/man/man3/kgetent.3.gz -OLD_FILES+=usr/share/man/man3/keycap.3.gz -OLD_FILES+=usr/share/man/man1/vt220keys.1.gz -OLD_FILES+=usr/share/man/man1/scon.1.gz -OLD_FILES+=usr/share/man/man1/loadfont.1.gz -OLD_FILES+=usr/share/man/man1/kcon.1.gz -OLD_FILES+=usr/share/man/man1/fontedit.1.gz -OLD_FILES+=usr/share/man/man1/cursor.1.gz -OLD_FILES+=usr/sbin/vt220keys -OLD_FILES+=usr/sbin/scon -OLD_FILES+=usr/sbin/loadfont -OLD_FILES+=usr/sbin/kcon -OLD_FILES+=usr/sbin/ispcvt -OLD_FILES+=usr/sbin/fontedit -OLD_FILES+=usr/sbin/cursor -OLD_FILES+=usr/lib/libkeycap_p.a -OLD_FILES+=usr/lib/libkeycap.a -OLD_FILES+=usr/include/machine/pcvt_ioctl.h -# 20060514: lnc(4) replaced by le(4) -OLD_FILES+=usr/share/man/man4/i386/lnc.4.gz -# 20060512: remove ip6fw -OLD_FILES+=etc/periodic/security/600.ip6fwdenied -OLD_FILES+=etc/periodic/security/650.ip6fwlimit -OLD_FILES+=sbin/ip6fw -OLD_FILES+=usr/include/netinet6/ip6_fw.h -OLD_FILES+=usr/share/man/man8/ip6fw.8.gz -# 20060424: sab(4) removed -OLD_FILES+=usr/share/man/man4/sab.4.gz -# 20060328: remove redundant rc.d script -OLD_FILES+=etc/rc.d/ike -# 20060127: revert libdisk to static-only -OLD_FILES+=usr/lib/libdisk.so -# 20060115: sys/pccard includes cleanup -OLD_FILES+=usr/include/pccard/driver.h -OLD_FILES+=usr/include/pccard/i82365.h -OLD_FILES+=usr/include/pccard/meciareg.h -OLD_FILES+=usr/include/pccard/pccard_nbk.h -OLD_FILES+=usr/include/pccard/pcic_pci.h -OLD_FILES+=usr/include/pccard/pcicvar.h -OLD_FILES+=usr/include/pccard/slot.h -# 20051215: rescue/nextboot.sh renamed to rescue/nextboot -OLD_FILES+=rescue/nextboot.sh -# 20051214: usbd(8) removed -OLD_FILES+=etc/rc.d/usbd -OLD_FILES+=etc/usbd.conf -OLD_FILES+=usr/sbin/usbd -OLD_FILES+=usr/share/man/man8/usbd.8.gz -# 20051029: rc.d/ppp-user renamed to rc.d/ppp for convenience -OLD_FILES+=etc/rc.d/ppp-user -# 20051012: setkey(8) moved to /sbin/ -OLD_FILES+=usr/sbin/setkey -# 20050930: pccardd(8) removed -OLD_FILES+=usr/sbin/pccardd -OLD_FILES+=usr/share/man/man5/pccard.conf.5.gz -OLD_FILES+=usr/share/man/man8/pccardd.8.gz -# 20050927: bridge(4) replaced by if_bridge(4) -OLD_FILES+=usr/include/net/bridge.h -# 20050831: not implemented -OLD_FILES+=usr/share/man/man3/getino.3.gz -OLD_FILES+=usr/share/man/man3/putino.3.gz -# 20050825: T/TCP retired several months ago -OLD_FILES+=usr/share/man/man4/ttcp.4.gz -# 20050805 tn3270 retired long ago -OLD_FILES+=usr/share/misc/map3270 -# 20050801: too old to be interesting here -OLD_FILES+=usr/share/doc/papers/px.ps.gz -# 20050721: moved to ports -OLD_FILES+=usr/sbin/vttest -OLD_FILES+=usr/share/man/man1/vttest.1.gz -# 20050617: wpa man pages moved to section 8 -OLD_FILES+=usr/share/man/man1/hostapd.1.gz -OLD_FILES+=usr/share/man/man1/hostapd_cli.1.gz -OLD_FILES+=usr/share/man/man1/wpa_cli.1.gz -OLD_FILES+=usr/share/man/man1/wpa_supplicant.1.gz -# 20050610: rexecd (insecure by design) -OLD_FILES+=etc/pam.d/rexecd -OLD_FILES+=usr/share/man/man8/rexecd.8.gz -OLD_FILES+=usr/libexec/rexecd -# 20050606: OpenBSD dhclient replaces ISC one -OLD_FILES+=bin/omshell -OLD_FILES+=sbin/omshell -OLD_FILES+=usr/share/man/man1/omshell.1.gz -OLD_FILES+=usr/share/man/man5/dhcp-eval.5.gz -# 200504XX: ipf tools moved from /usr to / -OLD_FILES+=rescue/ipfs -OLD_FILES+=rescue/ipfstat -OLD_FILES+=rescue/ipmon -OLD_FILES+=rescue/ipnat -OLD_FILES+=usr/sbin/ipftest -OLD_FILES+=usr/sbin/ipresend -OLD_FILES+=usr/sbin/ipsend -OLD_FILES+=usr/sbin/iptest -OLD_FILES+=usr/share/man/man1/ipnat.1.gz -OLD_FILES+=usr/share/man/man1/ipsend.1.gz -OLD_FILES+=usr/share/man/man1/iptest.1.gz -OLD_FILES+=usr/share/man/man5/ipsend.5.gz -# 200503XX: bsdtar takes over gtar -OLD_FILES+=usr/bin/gtar -OLD_FILES+=usr/share/man/man1/gtar.1.gz -# 200503XX -OLD_FILES+=usr/share/man/man3/exp10.3.gz -OLD_FILES+=usr/share/man/man3/exp10f.3.gz -OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz -# 20050324: updated release infrastructure -OLD_FILES+=usr/share/man/man5/drivers.conf.5.gz -# 20050317: removed from BIND 9 distribution -OLD_FILES+=usr/share/doc/bind9/KNOWN_DEFECTS -# 2005XXXX: -OLD_FILES+=sbin/mount_autofs -OLD_FILES+=usr/lib/libautofs.a -OLD_FILES+=usr/lib/libautofs.so -OLD_FILES+=usr/share/man/man8/mount_autofs.8.gz -# 20050203: Merged with fortunes -OLD_FILES+=usr/share/games/fortune/fortunes2 -OLD_FILES+=usr/share/games/fortune/fortunes2.dat -# 200501XX: -OLD_FILES+=usr/libexec/getNAME -# 200411XX: gvinum replaces vinum -OLD_FILES+=bin/vinum -OLD_FILES+=rescue/vinum -OLD_FILES+=sbin/vinum -OLD_FILES+=usr/share/man/man8/vinum.8.gz -# 200411XX: libxpg4 removal -OLD_FILES+=usr/lib/libxpg4.a -OLD_FILES+=usr/lib/libxpg4.so -OLD_FILES+=usr/lib/libxpg4_p.a -# 20041109: replaced by em(4) -OLD_FILES+=usr/share/man/man4/gx.4.gz -OLD_FILES+=usr/share/man/man4/if_gx.4.gz -# 20041017: rune interface removed -OLD_FILES+=usr/include/rune.h -OLD_FILES+=usr/share/man/man3/fgetrune.3.gz -OLD_FILES+=usr/share/man/man3/fputrune.3.gz -OLD_FILES+=usr/share/man/man3/fungetrune.3.gz -OLD_FILES+=usr/share/man/man3/mbrrune.3.gz -OLD_FILES+=usr/share/man/man3/mbrune.3.gz -OLD_FILES+=usr/share/man/man3/rune.3.gz -OLD_FILES+=usr/share/man/man3/setinvalidrune.3.gz -OLD_FILES+=usr/share/man/man3/sgetrune.3.gz -OLD_FILES+=usr/share/man/man3/sputrune.3.gz -# 20040925: bind9 import -OLD_FILES+=usr/bin/dnskeygen -OLD_FILES+=usr/bin/dnsquery -OLD_FILES+=usr/lib/libisc.a -OLD_FILES+=usr/lib/libisc.so -OLD_FILES+=usr/lib/libisc_p.a -OLD_FILES+=usr/libexec/named-xfer -OLD_FILES+=usr/sbin/named.restart -OLD_FILES+=usr/sbin/ndc -OLD_FILES+=usr/sbin/nslookup -OLD_FILES+=usr/sbin/nsupdate -OLD_FILES+=usr/share/doc/bind/html/acl.html -OLD_FILES+=usr/share/doc/bind/html/address_list.html -OLD_FILES+=usr/share/doc/bind/html/comments.html -OLD_FILES+=usr/share/doc/bind/html/config.html -OLD_FILES+=usr/share/doc/bind/html/controls.html -OLD_FILES+=usr/share/doc/bind/html/docdef.html -OLD_FILES+=usr/share/doc/bind/html/example.html -OLD_FILES+=usr/share/doc/bind/html/include.html -OLD_FILES+=usr/share/doc/bind/html/index.html -OLD_FILES+=usr/share/doc/bind/html/key.html -OLD_FILES+=usr/share/doc/bind/html/logging.html -OLD_FILES+=usr/share/doc/bind/html/master.html -OLD_FILES+=usr/share/doc/bind/html/options.html -OLD_FILES+=usr/share/doc/bind/html/server.html -OLD_FILES+=usr/share/doc/bind/html/trusted-keys.html -OLD_FILES+=usr/share/doc/bind/html/zone.html -OLD_FILES+=usr/share/doc/bind/misc/DynamicUpdate -OLD_FILES+=usr/share/doc/bind/misc/FAQ.1of2 -OLD_FILES+=usr/share/doc/bind/misc/FAQ.2of2 -OLD_FILES+=usr/share/doc/bind/misc/rfc2317-notes.txt -OLD_FILES+=usr/share/doc/bind/misc/style.txt -OLD_FILES+=usr/share/man/man1/dnskeygen.1.gz -OLD_FILES+=usr/share/man/man1/dnsquery.1.gz -OLD_FILES+=usr/share/man/man8/named-bootconf.8.gz -OLD_FILES+=usr/share/man/man8/named-xfer.8.gz -OLD_FILES+=usr/share/man/man8/named.restart.8.gz -OLD_FILES+=usr/share/man/man8/ndc.8.gz -OLD_FILES+=usr/share/man/man8/nslookup.8.gz -# 200409XX -OLD_FILES+=usr/share/man/man3/ENSURE.3.gz -OLD_FILES+=usr/share/man/man3/ENSURE_ERR.3.gz -OLD_FILES+=usr/share/man/man3/INSIST.3.gz -OLD_FILES+=usr/share/man/man3/INSIST_ERR.3.gz -OLD_FILES+=usr/share/man/man3/INVARIANT.3.gz -OLD_FILES+=usr/share/man/man3/INVARIANT_ERR.3.gz -OLD_FILES+=usr/share/man/man3/REQUIRE.3.gz -OLD_FILES+=usr/share/man/man3/REQUIRE_ERR.3.gz -OLD_FILES+=usr/share/man/man3/assertion_type_to_text.3.gz -OLD_FILES+=usr/share/man/man3/assertions.3.gz -OLD_FILES+=usr/share/man/man3/bitncmp.3.gz -OLD_FILES+=usr/share/man/man3/evAddTime.3.gz -OLD_FILES+=usr/share/man/man3/evCancelConn.3.gz -OLD_FILES+=usr/share/man/man3/evCancelRW.3.gz -OLD_FILES+=usr/share/man/man3/evClearIdleTimer.3.gz -OLD_FILES+=usr/share/man/man3/evClearTimer.3.gz -OLD_FILES+=usr/share/man/man3/evCmpTime.3.gz -OLD_FILES+=usr/share/man/man3/evConnFunc.3.gz -OLD_FILES+=usr/share/man/man3/evConnect.3.gz -OLD_FILES+=usr/share/man/man3/evConsIovec.3.gz -OLD_FILES+=usr/share/man/man3/evConsTime.3.gz -OLD_FILES+=usr/share/man/man3/evCreate.3.gz -OLD_FILES+=usr/share/man/man3/evDefer.3.gz -OLD_FILES+=usr/share/man/man3/evDeselectFD.3.gz -OLD_FILES+=usr/share/man/man3/evDestroy.3.gz -OLD_FILES+=usr/share/man/man3/evDispatch.3.gz -OLD_FILES+=usr/share/man/man3/evDo.3.gz -OLD_FILES+=usr/share/man/man3/evDrop.3.gz -OLD_FILES+=usr/share/man/man3/evFileFunc.3.gz -OLD_FILES+=usr/share/man/man3/evGetNext.3.gz -OLD_FILES+=usr/share/man/man3/evHold.3.gz -OLD_FILES+=usr/share/man/man3/evInitID.3.gz -OLD_FILES+=usr/share/man/man3/evLastEventTime.3.gz -OLD_FILES+=usr/share/man/man3/evListen.3.gz -OLD_FILES+=usr/share/man/man3/evMainLoop.3.gz -OLD_FILES+=usr/share/man/man3/evNowTime.3.gz -OLD_FILES+=usr/share/man/man3/evPrintf.3.gz -OLD_FILES+=usr/share/man/man3/evRead.3.gz -OLD_FILES+=usr/share/man/man3/evResetTimer.3.gz -OLD_FILES+=usr/share/man/man3/evSelectFD.3.gz -OLD_FILES+=usr/share/man/man3/evSetDebug.3.gz -OLD_FILES+=usr/share/man/man3/evSetIdleTimer.3.gz -OLD_FILES+=usr/share/man/man3/evSetTimer.3.gz -OLD_FILES+=usr/share/man/man3/evStreamFunc.3.gz -OLD_FILES+=usr/share/man/man3/evSubTime.3.gz -OLD_FILES+=usr/share/man/man3/evTestID.3.gz -OLD_FILES+=usr/share/man/man3/evTimeRW.3.gz -OLD_FILES+=usr/share/man/man3/evTimeSpec.3.gz -OLD_FILES+=usr/share/man/man3/evTimeVal.3.gz -OLD_FILES+=usr/share/man/man3/evTimerFunc.3.gz -OLD_FILES+=usr/share/man/man3/evTouchIdleTimer.3.gz -OLD_FILES+=usr/share/man/man3/evTryAccept.3.gz -OLD_FILES+=usr/share/man/man3/evUnhold.3.gz -OLD_FILES+=usr/share/man/man3/evUntimeRW.3.gz -OLD_FILES+=usr/share/man/man3/evUnwait.3.gz -OLD_FILES+=usr/share/man/man3/evWaitFor.3.gz -OLD_FILES+=usr/share/man/man3/evWaitFunc.3.gz -OLD_FILES+=usr/share/man/man3/evWrite.3.gz -OLD_FILES+=usr/share/man/man3/eventlib.3.gz -OLD_FILES+=usr/share/man/man3/heap.3.gz -OLD_FILES+=usr/share/man/man3/heap_decreased.3.gz -OLD_FILES+=usr/share/man/man3/heap_delete.3.gz -OLD_FILES+=usr/share/man/man3/heap_element.3.gz -OLD_FILES+=usr/share/man/man3/heap_for_each.3.gz -OLD_FILES+=usr/share/man/man3/heap_free.3.gz -OLD_FILES+=usr/share/man/man3/heap_increased.3.gz -OLD_FILES+=usr/share/man/man3/heap_insert.3.gz -OLD_FILES+=usr/share/man/man3/heap_new.3.gz -OLD_FILES+=usr/share/man/man3/log_add_channel.3.gz -OLD_FILES+=usr/share/man/man3/log_category_is_active.3.gz -OLD_FILES+=usr/share/man/man3/log_close_stream.3.gz -OLD_FILES+=usr/share/man/man3/log_dec_references.3.gz -OLD_FILES+=usr/share/man/man3/log_free_channel.3.gz -OLD_FILES+=usr/share/man/man3/log_free_context.3.gz -OLD_FILES+=usr/share/man/man3/log_get_filename.3.gz -OLD_FILES+=usr/share/man/man3/log_get_stream.3.gz -OLD_FILES+=usr/share/man/man3/log_inc_references.3.gz -OLD_FILES+=usr/share/man/man3/log_new_context.3.gz -OLD_FILES+=usr/share/man/man3/log_new_file_channel.3.gz -OLD_FILES+=usr/share/man/man3/log_new_null_channel.3.gz -OLD_FILES+=usr/share/man/man3/log_new_syslog_channel.3.gz -OLD_FILES+=usr/share/man/man3/log_open_stream.3.gz -OLD_FILES+=usr/share/man/man3/log_option.3.gz -OLD_FILES+=usr/share/man/man3/log_remove_channel.3.gz -OLD_FILES+=usr/share/man/man3/log_set_file_owner.3.gz -OLD_FILES+=usr/share/man/man3/log_vwrite.3.gz -OLD_FILES+=usr/share/man/man3/log_write.3.gz -OLD_FILES+=usr/share/man/man3/logging.3.gz -OLD_FILES+=usr/share/man/man3/memcluster.3.gz -OLD_FILES+=usr/share/man/man3/memget.3.gz -OLD_FILES+=usr/share/man/man3/memput.3.gz -OLD_FILES+=usr/share/man/man3/memstats.3.gz -OLD_FILES+=usr/share/man/man3/set_assertion_failure_callback.3. -OLD_FILES+=usr/share/man/man3/sigwait.3.gz -OLD_FILES+=usr/share/man/man3/tree_add.3.gz -OLD_FILES+=usr/share/man/man3/tree_delete.3.gz -OLD_FILES+=usr/share/man/man3/tree_init.3.gz -OLD_FILES+=usr/share/man/man3/tree_mung.3.gz -OLD_FILES+=usr/share/man/man3/tree_srch.3.gz -OLD_FILES+=usr/share/man/man3/tree_trav.3.gz -# 2004XXYY: OS internal libs, no ports use them, no need to use OLD_LIBS -OLD_LIBS+=lib/geom/geom_concat.so.1 -OLD_LIBS+=lib/geom/geom_label.so.1 -OLD_LIBS+=lib/geom/geom_nop.so.1 -OLD_LIBS+=lib/geom/geom_stripe.so.1 -# 20040728: GCC 3.4.2 -OLD_DIRS+=usr/include/c++/3.3 -OLD_FILES+=usr/include/c++/3.3/FlexLexer.h -OLD_FILES+=usr/include/c++/3.3/algorithm -OLD_FILES+=usr/include/c++/3.3/backward/algo.h -OLD_FILES+=usr/include/c++/3.3/backward/algobase.h -OLD_FILES+=usr/include/c++/3.3/backward/alloc.h -OLD_FILES+=usr/include/c++/3.3/backward/backward_warning.h -OLD_FILES+=usr/include/c++/3.3/backward/bvector.h -OLD_FILES+=usr/include/c++/3.3/backward/complex.h -OLD_FILES+=usr/include/c++/3.3/backward/defalloc.h -OLD_FILES+=usr/include/c++/3.3/backward/deque.h -OLD_FILES+=usr/include/c++/3.3/backward/fstream.h -OLD_FILES+=usr/include/c++/3.3/backward/function.h -OLD_FILES+=usr/include/c++/3.3/backward/hash_map.h -OLD_FILES+=usr/include/c++/3.3/backward/hash_set.h -OLD_FILES+=usr/include/c++/3.3/backward/hashtable.h -OLD_FILES+=usr/include/c++/3.3/backward/heap.h -OLD_FILES+=usr/include/c++/3.3/backward/iomanip.h -OLD_FILES+=usr/include/c++/3.3/backward/iostream.h -OLD_FILES+=usr/include/c++/3.3/backward/istream.h -OLD_FILES+=usr/include/c++/3.3/backward/iterator.h -OLD_FILES+=usr/include/c++/3.3/backward/list.h -OLD_FILES+=usr/include/c++/3.3/backward/map.h -OLD_FILES+=usr/include/c++/3.3/backward/multimap.h -OLD_FILES+=usr/include/c++/3.3/backward/multiset.h -OLD_FILES+=usr/include/c++/3.3/backward/new.h -OLD_FILES+=usr/include/c++/3.3/backward/ostream.h -OLD_FILES+=usr/include/c++/3.3/backward/pair.h -OLD_FILES+=usr/include/c++/3.3/backward/queue.h -OLD_FILES+=usr/include/c++/3.3/backward/rope.h -OLD_FILES+=usr/include/c++/3.3/backward/set.h -OLD_FILES+=usr/include/c++/3.3/backward/slist.h -OLD_FILES+=usr/include/c++/3.3/backward/stack.h -OLD_FILES+=usr/include/c++/3.3/backward/stream.h -OLD_FILES+=usr/include/c++/3.3/backward/streambuf.h -OLD_FILES+=usr/include/c++/3.3/backward/strstream -OLD_FILES+=usr/include/c++/3.3/backward/strstream.h -OLD_FILES+=usr/include/c++/3.3/backward/tempbuf.h -OLD_FILES+=usr/include/c++/3.3/backward/tree.h -OLD_FILES+=usr/include/c++/3.3/backward/vector.h -OLD_DIRS+=usr/include/c++/3.3/backward -OLD_FILES+=usr/include/c++/3.3/bits/atomicity.h -OLD_FILES+=usr/include/c++/3.3/bits/basic_file.h -OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.h -OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.tcc -OLD_FILES+=usr/include/c++/3.3/bits/basic_string.h -OLD_FILES+=usr/include/c++/3.3/bits/basic_string.tcc -OLD_FILES+=usr/include/c++/3.3/bits/boost_concept_check.h -OLD_FILES+=usr/include/c++/3.3/bits/c++config.h -OLD_FILES+=usr/include/c++/3.3/bits/c++io.h -OLD_FILES+=usr/include/c++/3.3/bits/c++locale.h -OLD_FILES+=usr/include/c++/3.3/bits/c++locale_internal.h -OLD_FILES+=usr/include/c++/3.3/bits/char_traits.h -OLD_FILES+=usr/include/c++/3.3/bits/cmath.tcc -OLD_FILES+=usr/include/c++/3.3/bits/codecvt.h -OLD_FILES+=usr/include/c++/3.3/bits/codecvt_specializations.h -OLD_FILES+=usr/include/c++/3.3/bits/concept_check.h -OLD_FILES+=usr/include/c++/3.3/bits/cpp_type_traits.h -OLD_FILES+=usr/include/c++/3.3/bits/ctype_base.h -OLD_FILES+=usr/include/c++/3.3/bits/ctype_inline.h -OLD_FILES+=usr/include/c++/3.3/bits/ctype_noninline.h -OLD_FILES+=usr/include/c++/3.3/bits/deque.tcc -OLD_FILES+=usr/include/c++/3.3/bits/fpos.h -OLD_FILES+=usr/include/c++/3.3/bits/fstream.tcc -OLD_FILES+=usr/include/c++/3.3/bits/functexcept.h -OLD_FILES+=usr/include/c++/3.3/bits/generic_shadow.h -OLD_FILES+=usr/include/c++/3.3/bits/gslice.h -OLD_FILES+=usr/include/c++/3.3/bits/gslice_array.h -OLD_FILES+=usr/include/c++/3.3/bits/gthr-default.h -OLD_FILES+=usr/include/c++/3.3/bits/gthr-posix.h -OLD_FILES+=usr/include/c++/3.3/bits/gthr-single.h -OLD_FILES+=usr/include/c++/3.3/bits/gthr.h -OLD_FILES+=usr/include/c++/3.3/bits/indirect_array.h -OLD_FILES+=usr/include/c++/3.3/bits/ios_base.h -OLD_FILES+=usr/include/c++/3.3/bits/istream.tcc -OLD_FILES+=usr/include/c++/3.3/bits/list.tcc -OLD_FILES+=usr/include/c++/3.3/bits/locale_classes.h -OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.h -OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.tcc -OLD_FILES+=usr/include/c++/3.3/bits/localefwd.h -OLD_FILES+=usr/include/c++/3.3/bits/mask_array.h -OLD_FILES+=usr/include/c++/3.3/bits/messages_members.h -OLD_FILES+=usr/include/c++/3.3/bits/os_defines.h -OLD_FILES+=usr/include/c++/3.3/bits/ostream.tcc -OLD_FILES+=usr/include/c++/3.3/bits/pthread_allocimpl.h -OLD_FILES+=usr/include/c++/3.3/bits/slice.h -OLD_FILES+=usr/include/c++/3.3/bits/slice_array.h -OLD_FILES+=usr/include/c++/3.3/bits/sstream.tcc -OLD_FILES+=usr/include/c++/3.3/bits/stl_algo.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_algobase.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_alloc.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_bvector.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_construct.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_deque.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_function.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_heap.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_funcs.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_types.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_list.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_map.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_multimap.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_multiset.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_numeric.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_pair.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_pthread_alloc.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_queue.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_raw_storage_iter.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_relops.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_set.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_stack.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_tempbuf.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_threads.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_tree.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_uninitialized.h -OLD_FILES+=usr/include/c++/3.3/bits/stl_vector.h -OLD_FILES+=usr/include/c++/3.3/bits/stream_iterator.h -OLD_FILES+=usr/include/c++/3.3/bits/streambuf.tcc -OLD_FILES+=usr/include/c++/3.3/bits/streambuf_iterator.h -OLD_FILES+=usr/include/c++/3.3/bits/stringfwd.h -OLD_FILES+=usr/include/c++/3.3/bits/time_members.h -OLD_FILES+=usr/include/c++/3.3/bits/type_traits.h -OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.h -OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.tcc -OLD_FILES+=usr/include/c++/3.3/bits/valarray_meta.h -OLD_FILES+=usr/include/c++/3.3/bits/vector.tcc -OLD_DIRS+=usr/include/c++/3.3/bits -OLD_FILES+=usr/include/c++/3.3/bitset -OLD_FILES+=usr/include/c++/3.3/cassert -OLD_FILES+=usr/include/c++/3.3/cctype -OLD_FILES+=usr/include/c++/3.3/cerrno -OLD_FILES+=usr/include/c++/3.3/cfloat -OLD_FILES+=usr/include/c++/3.3/ciso646 -OLD_FILES+=usr/include/c++/3.3/climits -OLD_FILES+=usr/include/c++/3.3/clocale -OLD_FILES+=usr/include/c++/3.3/cmath -OLD_FILES+=usr/include/c++/3.3/complex -OLD_FILES+=usr/include/c++/3.3/csetjmp -OLD_FILES+=usr/include/c++/3.3/csignal -OLD_FILES+=usr/include/c++/3.3/cstdarg -OLD_FILES+=usr/include/c++/3.3/cstddef -OLD_FILES+=usr/include/c++/3.3/cstdio -OLD_FILES+=usr/include/c++/3.3/cstdlib -OLD_FILES+=usr/include/c++/3.3/cstring -OLD_FILES+=usr/include/c++/3.3/ctime -OLD_FILES+=usr/include/c++/3.3/cwchar -OLD_FILES+=usr/include/c++/3.3/cwctype -OLD_FILES+=usr/include/c++/3.3/cxxabi.h -OLD_FILES+=usr/include/c++/3.3/deque -OLD_FILES+=usr/include/c++/3.3/exception -OLD_FILES+=usr/include/c++/3.3/exception_defines.h -OLD_FILES+=usr/include/c++/3.3/ext/algorithm -OLD_FILES+=usr/include/c++/3.3/ext/enc_filebuf.h -OLD_FILES+=usr/include/c++/3.3/ext/functional -OLD_FILES+=usr/include/c++/3.3/ext/hash_map -OLD_FILES+=usr/include/c++/3.3/ext/hash_set -OLD_FILES+=usr/include/c++/3.3/ext/iterator -OLD_FILES+=usr/include/c++/3.3/ext/memory -OLD_FILES+=usr/include/c++/3.3/ext/numeric -OLD_FILES+=usr/include/c++/3.3/ext/rb_tree -OLD_FILES+=usr/include/c++/3.3/ext/rope -OLD_FILES+=usr/include/c++/3.3/ext/ropeimpl.h -OLD_FILES+=usr/include/c++/3.3/ext/slist -OLD_FILES+=usr/include/c++/3.3/ext/stdio_filebuf.h -OLD_FILES+=usr/include/c++/3.3/ext/stl_hash_fun.h -OLD_FILES+=usr/include/c++/3.3/ext/stl_hashtable.h -OLD_FILES+=usr/include/c++/3.3/ext/stl_rope.h -OLD_DIRS+=usr/include/c++/3.3/ext -OLD_FILES+=usr/include/c++/3.3/fstream -OLD_FILES+=usr/include/c++/3.3/functional -OLD_FILES+=usr/include/c++/3.3/iomanip -OLD_FILES+=usr/include/c++/3.3/ios -OLD_FILES+=usr/include/c++/3.3/iosfwd -OLD_FILES+=usr/include/c++/3.3/iostream -OLD_FILES+=usr/include/c++/3.3/istream -OLD_FILES+=usr/include/c++/3.3/iterator -OLD_FILES+=usr/include/c++/3.3/limits -OLD_FILES+=usr/include/c++/3.3/list -OLD_FILES+=usr/include/c++/3.3/locale -OLD_FILES+=usr/include/c++/3.3/map -OLD_FILES+=usr/include/c++/3.3/memory -OLD_FILES+=usr/include/c++/3.3/new -OLD_FILES+=usr/include/c++/3.3/numeric -OLD_FILES+=usr/include/c++/3.3/ostream -OLD_FILES+=usr/include/c++/3.3/queue -OLD_FILES+=usr/include/c++/3.3/set -OLD_FILES+=usr/include/c++/3.3/sstream -OLD_FILES+=usr/include/c++/3.3/stack -OLD_FILES+=usr/include/c++/3.3/stdexcept -OLD_FILES+=usr/include/c++/3.3/streambuf -OLD_FILES+=usr/include/c++/3.3/string -OLD_FILES+=usr/include/c++/3.3/typeinfo -OLD_FILES+=usr/include/c++/3.3/utility -OLD_FILES+=usr/include/c++/3.3/valarray -OLD_FILES+=usr/include/c++/3.3/vector -# 20040713: fla(4) removed -OLD_FILES+=usr/share/man/man4/fla.4.gz -# 200407XX -OLD_FILES+=usr/sbin/kernbb -OLD_FILES+=usr/sbin/ntp-genkeys -OLD_FILES+=usr/sbin/ntptimeset -OLD_FILES+=usr/share/man/man8/kernbb.8.gz -OLD_FILES+=usr/share/man/man8/ntp-genkeys.8.gz -# 20040627: usbdevs.h and usbdevs_data.h removal -OLD_FILES+=usr/include/dev/usb/usbdevs.h -OLD_FILES+=usr/include/dev/usb/usbdevs_data.h -# 200406XX -OLD_FILES+=usr/bin/gasp -OLD_FILES+=usr/bin/gdbreplay -OLD_FILES+=usr/share/man/man1/gasp.1.gz -OLD_FILES+=sbin/mountd -OLD_FILES+=sbin/mount_fdesc -OLD_FILES+=sbin/mount_umap -OLD_FILES+=sbin/mount_union -OLD_FILES+=sbin/mount_msdos -OLD_FILES+=sbin/mount_null -OLD_FILES+=sbin/mount_kernfs -# 200405XX: arl -OLD_FILES+=usr/sbin/arlconfig -OLD_FILES+=usr/share/man/man8/arlconfig.8.gz -# 200403XX -OLD_FILES+=bin/raidctl -OLD_FILES+=sbin/raidctl -OLD_FILES+=usr/bin/sasc -OLD_FILES+=usr/sbin/sgsc -OLD_FILES+=usr/sbin/stlload -OLD_FILES+=usr/sbin/stlstats -OLD_FILES+=usr/share/man/man1/sasc.1.gz -OLD_FILES+=usr/share/man/man1/sgsc.1.gz -OLD_FILES+=usr/share/man/man4/i386/stl.4.gz -OLD_FILES+=usr/share/man/man8/raidctl.8.gz -# 20040229: clean_environment() was removed after 3 days -OLD_FILES+=usr/share/man/man3/clean_environment.3.gz -# 20040119: installed as `isdntel' in newer systems -OLD_FILES+=etc/isdn/isdntel.sh -# 200XYYZZ: /lib transition clitches -OLD_FILES+=lib/libalias.so -OLD_FILES+=lib/libatm.so -OLD_FILES+=lib/libbsdxml.so -OLD_FILES+=lib/libc.so -OLD_FILES+=lib/libcam.so -OLD_FILES+=lib/libcrypt.so -OLD_FILES+=lib/libcrypto.so -OLD_FILES+=lib/libdevstat.so -OLD_FILES+=lib/libedit.so -OLD_FILES+=lib/libgeom.so -OLD_FILES+=lib/libipsec.so -OLD_FILES+=lib/libipx.so -OLD_FILES+=lib/libkvm.so -OLD_FILES+=lib/libm.so -OLD_FILES+=lib/libmd.so -OLD_FILES+=lib/libncurses.so -OLD_FILES+=lib/libreadline.so -OLD_FILES+=lib/libsbuf.so -OLD_FILES+=lib/libufs.so -OLD_FILES+=lib/libz.so -# 200312XX -OLD_FILES+=bin/cxconfig -OLD_FILES+=sbin/cxconfig -OLD_FILES+=usr/share/man/man8/cxconfig.8.gz -# 20031016: MULTI_DRIVER_MODULE macro removed -OLD_FILES+=usr/share/man/man9/MULTI_DRIVER_MODULE.9.gz -# 200309XX -OLD_FILES+=usr/bin/symorder -OLD_FILES+=usr/share/man/man1/symorder.1.gz -# 200308XX -OLD_FILES+=usr/sbin/amldb -OLD_FILES+=usr/share/man/man8/amldb.8.gz -# 200307XX -OLD_FILES+=sbin/mount_nwfs -OLD_FILES+=sbin/mount_portalfs -OLD_FILES+=sbin/mount_smbfs -# 200306XX -OLD_FILES+=usr/sbin/dev_mkdb -OLD_FILES+=usr/share/man/man8/dev_mkdb.8.gz -# 200304XX -OLD_FILES+=usr/lib/libcipher.a -OLD_FILES+=usr/lib/libcipher.so -OLD_FILES+=usr/lib/libcipher_p.a -OLD_FILES+=usr/lib/libgmp.a -OLD_FILES+=usr/lib/libgmp.so -OLD_FILES+=usr/lib/libgmp_p.a -OLD_FILES+=usr/lib/libperl.a -OLD_FILES+=usr/lib/libperl.so -OLD_FILES+=usr/lib/libperl_p.a -OLD_FILES+=usr/lib/libposix1e.a -OLD_FILES+=usr/lib/libposix1e.so -OLD_FILES+=usr/lib/libposix1e_p.a -OLD_FILES+=usr/lib/libskey.a -OLD_FILES+=usr/lib/libskey.so -OLD_FILES+=usr/lib/libskey_p.a -OLD_FILES+=usr/libexec/tradcpp0 -OLD_FILES+=usr/libexec/cpp0 -# 200304XX: removal of xten -OLD_FILES+=usr/libexec/xtend -OLD_FILES+=usr/sbin/xten -OLD_FILES+=usr/share/man/man1/xten.1.gz -OLD_FILES+=usr/share/man/man8/xtend.8.gz -# 200303XX -OLD_FILES+=usr/lib/libacl.so -OLD_FILES+=usr/lib/libdescrypt.so -OLD_FILES+=usr/lib/libf2c.so -OLD_FILES+=usr/lib/libg++.so -OLD_FILES+=usr/lib/libkdb.so -OLD_FILES+=usr/lib/librsaINTL.so -OLD_FILES+=usr/lib/libscrypt.so -OLD_FILES+=usr/lib/libss.so -# 200302XX -OLD_FILES+=usr/lib/libacl.a -OLD_FILES+=usr/lib/libacl_p.a -OLD_FILES+=usr/lib/libkadm.a -OLD_FILES+=usr/lib/libkadm.so -OLD_FILES+=usr/lib/libkadm_p.a -OLD_FILES+=usr/lib/libkafs.a -OLD_FILES+=usr/lib/libkafs.so -OLD_FILES+=usr/lib/libkafs_p.a -OLD_FILES+=usr/lib/libkdb.a -OLD_FILES+=usr/lib/libkdb_p.a -OLD_FILES+=usr/lib/libkrb.a -OLD_FILES+=usr/lib/libkrb.so -OLD_FILES+=usr/lib/libkrb_p.a -OLD_FILES+=usr/share/man/man3/SSL_CIPHER_get_name.3.gz -OLD_FILES+=usr/share/man/man3/SSL_COMP_add_compression_method.3 -OLD_FILES+=usr/share/man/man3/SSL_CTX_add_extra_chain_cert.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_add_session.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_ctrl.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_flush_sessions.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_free.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_get_verify_mode.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_load_verify_locations.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_new.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_sess_number.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_sess_set_cache_size.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_sess_set_get_cb.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_sessions.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_cert_store.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_cert_verify_callback.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_cipher_list.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_client_CA_list.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_client_cert_cb.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_default_passwd_cb.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_generate_session_id.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_info_callback.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_max_cert_list.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_mode.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_msg_callback.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_options.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_quiet_shutdown.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_session_cache_mode.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_session_id_context.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_ssl_version.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_timeout.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_tmp_dh_callback.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_tmp_rsa_callback.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_set_verify.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_use_certificate.3.gz -OLD_FILES+=usr/share/man/man3/SSL_SESSION_free.3.gz -OLD_FILES+=usr/share/man/man3/SSL_SESSION_get_ex_new_index.3.gz -OLD_FILES+=usr/share/man/man3/SSL_SESSION_get_time.3.gz -OLD_FILES+=usr/share/man/man3/SSL_accept.3.gz -OLD_FILES+=usr/share/man/man3/SSL_alert_type_string.3.gz -OLD_FILES+=usr/share/man/man3/SSL_clear.3.gz -OLD_FILES+=usr/share/man/man3/SSL_connect.3.gz -OLD_FILES+=usr/share/man/man3/SSL_do_handshake.3.gz -OLD_FILES+=usr/share/man/man3/SSL_free.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_SSL_CTX.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_ciphers.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_client_CA_list.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_current_cipher.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_default_timeout.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_error.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_ex_data_X509_STORE_CTX_idx.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_fd.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_peer_cert_chain.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_peer_certificate.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_rbio.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_session.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_verify_result.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_version.3.gz -OLD_FILES+=usr/share/man/man3/SSL_library_init.3.gz -OLD_FILES+=usr/share/man/man3/SSL_load_client_CA_file.3.gz -OLD_FILES+=usr/share/man/man3/SSL_new.3.gz -OLD_FILES+=usr/share/man/man3/SSL_pending.3.gz -OLD_FILES+=usr/share/man/man3/SSL_read.3.gz -OLD_FILES+=usr/share/man/man3/SSL_rstate_string.3.gz -OLD_FILES+=usr/share/man/man3/SSL_session_reused.3.gz -OLD_FILES+=usr/share/man/man3/SSL_set_bio.3.gz -OLD_FILES+=usr/share/man/man3/SSL_set_connect_state.3.gz -OLD_FILES+=usr/share/man/man3/SSL_set_fd.3.gz -OLD_FILES+=usr/share/man/man3/SSL_set_session.3.gz -OLD_FILES+=usr/share/man/man3/SSL_set_shutdown.3.gz -OLD_FILES+=usr/share/man/man3/SSL_set_verify_result.3.gz -OLD_FILES+=usr/share/man/man3/SSL_shutdown.3.gz -OLD_FILES+=usr/share/man/man3/SSL_state_string.3.gz -OLD_FILES+=usr/share/man/man3/SSL_want.3.gz -OLD_FILES+=usr/share/man/man3/SSL_write.3.gz -OLD_FILES+=usr/share/man/man3/d2i_SSL_SESSION.3.gz -# 200301XX -OLD_FILES+=usr/share/man/man3/des_3cbc_encrypt.3.gz -OLD_FILES+=usr/share/man/man3/des_3ecb_encrypt.3.gz -OLD_FILES+=usr/share/man/man3/des_cbc_cksum.3.gz -OLD_FILES+=usr/share/man/man3/des_cbc_encrypt.3.gz -OLD_FILES+=usr/share/man/man3/des_cfb_encrypt.3.gz -OLD_FILES+=usr/share/man/man3/des_ecb_encrypt.3.gz -OLD_FILES+=usr/share/man/man3/des_enc_read.3.gz -OLD_FILES+=usr/share/man/man3/des_enc_write.3.gz -OLD_FILES+=usr/share/man/man3/des_is_weak_key.3.gz -OLD_FILES+=usr/share/man/man3/des_key_sched.3.gz -OLD_FILES+=usr/share/man/man3/des_ofb_encrypt.3.gz -OLD_FILES+=usr/share/man/man3/des_pcbc_encrypt.3.gz -OLD_FILES+=usr/share/man/man3/des_quad_cksum.3.gz -OLD_FILES+=usr/share/man/man3/des_random_key.3.gz -OLD_FILES+=usr/share/man/man3/des_read_2password.3.gz -OLD_FILES+=usr/share/man/man3/des_read_password.3.gz -OLD_FILES+=usr/share/man/man3/des_read_pw_string.3.gz -OLD_FILES+=usr/share/man/man3/des_set_key.3.gz -OLD_FILES+=usr/share/man/man3/des_set_odd_parity.3.gz -OLD_FILES+=usr/share/man/man3/des_string_to_2key.3.gz -OLD_FILES+=usr/share/man/man3/des_string_to_key.3.gz -# 200212XX -OLD_FILES+=usr/sbin/kenv -OLD_FILES+=usr/bin/kenv -OLD_FILES+=usr/sbin/elf2aout -# 200210XX -OLD_FILES+=usr/include/libusbhid.h -OLD_FILES+=usr/share/man/man3/All_FreeBSD.3.gz -OLD_FILES+=usr/share/man/man3/CheckRules.3.gz -OLD_FILES+=usr/share/man/man3/ChunkCanBeRoot.3.gz -OLD_FILES+=usr/share/man/man3/Clone_Disk.3.gz -OLD_FILES+=usr/share/man/man3/Collapse_Chunk.3.gz -OLD_FILES+=usr/share/man/man3/Collapse_Disk.3.gz -OLD_FILES+=usr/share/man/man3/Create_Chunk.3.gz -OLD_FILES+=usr/share/man/man3/Create_Chunk_DWIM.3.gz -OLD_FILES+=usr/share/man/man3/Cyl_Aligned.3.gz -OLD_FILES+=usr/share/man/man3/Debug_Disk.3.gz -OLD_FILES+=usr/share/man/man3/Delete_Chunk.3.gz -OLD_FILES+=usr/share/man/man3/Disk_Names.3.gz -OLD_FILES+=usr/share/man/man3/Free_Disk.3.gz -OLD_FILES+=usr/share/man/man3/MakeDev.3.gz -OLD_FILES+=usr/share/man/man3/MakeDevDisk.3.gz -OLD_FILES+=usr/share/man/man3/Next_Cyl_Aligned.3.gz -OLD_FILES+=usr/share/man/man3/Next_Track_Aligned.3.gz -OLD_FILES+=usr/share/man/man3/Open_Disk.3.gz -OLD_FILES+=usr/share/man/man3/Prev_Cyl_Aligned.3.gz -OLD_FILES+=usr/share/man/man3/Prev_Track_Aligned.3.gz -OLD_FILES+=usr/share/man/man3/Set_Bios_Geom.3.gz -OLD_FILES+=usr/share/man/man3/Set_Boot_Blocks.3.gz -OLD_FILES+=usr/share/man/man3/Set_Boot_Mgr.3.gz -OLD_FILES+=usr/share/man/man3/ShowChunkFlags.3.gz -OLD_FILES+=usr/share/man/man3/Track_Aligned.3.gz -OLD_FILES+=usr/share/man/man3/Write_Disk.3.gz -OLD_FILES+=usr/share/man/man3/slice_type_name.3.gz -# 200210XX: most games moved to ports -OLD_FILES+=usr/share/man/man6/adventure.6.gz -OLD_FILES+=usr/share/man/man6/arithmetic.6.gz -OLD_FILES+=usr/share/man/man6/atc.6.gz -OLD_FILES+=usr/share/man/man6/backgammon.6.gz -OLD_FILES+=usr/share/man/man6/battlestar.6.gz -OLD_FILES+=usr/share/man/man6/bs.6.gz -OLD_FILES+=usr/share/man/man6/canfield.6.gz -OLD_FILES+=usr/share/man/man6/cfscores.6.gz -OLD_FILES+=usr/share/man/man6/cribbage.6.gz -OLD_FILES+=usr/share/man/man6/fish.6.gz -OLD_FILES+=usr/share/man/man6/hack.6.gz -OLD_FILES+=usr/share/man/man6/hangman.6.gz -OLD_FILES+=usr/share/man/man6/larn.6.gz -OLD_FILES+=usr/share/man/man6/mille.6.gz -OLD_FILES+=usr/share/man/man6/phantasia.6.gz -OLD_FILES+=usr/share/man/man6/piano.6.gz -OLD_FILES+=usr/share/man/man6/pig.6.gz -OLD_FILES+=usr/share/man/man6/quiz.6.gz -OLD_FILES+=usr/share/man/man6/rain.6.gz -OLD_FILES+=usr/share/man/man6/robots.6.gz -OLD_FILES+=usr/share/man/man6/rogue.6.gz -OLD_FILES+=usr/share/man/man6/sail.6.gz -OLD_FILES+=usr/share/man/man6/snake.6.gz -OLD_FILES+=usr/share/man/man6/snscore.6.gz -OLD_FILES+=usr/share/man/man6/trek.6.gz -OLD_FILES+=usr/share/man/man6/wargames.6.gz -OLD_FILES+=usr/share/man/man6/worm.6.gz -OLD_FILES+=usr/share/man/man6/worms.6.gz -OLD_FILES+=usr/share/man/man6/wump.6.gz -# 200207XX -OLD_FILES+=usr/share/man/man1aout/ar.1aout.gz -OLD_FILES+=usr/share/man/man1aout/as.1aout.gz -OLD_FILES+=usr/share/man/man1aout/ld.1aout.gz -OLD_FILES+=usr/share/man/man1aout/nm.1aout.gz -OLD_FILES+=usr/share/man/man1aout/ranlib.1aout.gz -OLD_FILES+=usr/share/man/man1aout/size.1aout.gz -OLD_FILES+=usr/share/man/man1aout/strings.1aout.gz -OLD_FILES+=usr/share/man/man1aout/strip.1aout.gz -OLD_FILES+=bin/mountd -OLD_FILES+=bin/nfsd -# 20020707 sbin/nfsd -> usr.sbin/nfsd -OLD_FILES+=sbin/nfsd -# 200206XX -OLD_FILES+=usr/lib/libpam_ssh.a -OLD_FILES+=usr/lib/libpam_ssh_p.a -OLD_FILES+=usr/bin/help -OLD_FILES+=usr/bin/sccs -.if ${TARGET_ARCH} != "amd64" && ${TARGET} != "arm" && ${TARGET_ARCH} != "i386" && ${TARGET} != "powerpc" -OLD_FILES+=usr/bin/gdbserver -.endif -OLD_FILES+=usr/bin/ssh-keysign -OLD_FILES+=usr/sbin/gifconfig -OLD_FILES+=usr/sbin/prefix -# 200205XX -OLD_FILES+=usr/bin/doscmd -# 200204XX -OLD_FILES+=usr/bin/a2p -OLD_FILES+=usr/bin/ptx -OLD_FILES+=usr/bin/pod2text -OLD_FILES+=usr/bin/pod2man -OLD_FILES+=usr/bin/pod2latex -OLD_FILES+=usr/bin/pod2html -OLD_FILES+=usr/bin/h2ph -OLD_FILES+=usr/bin/dprofpp -OLD_FILES+=usr/bin/c2ph -OLD_FILES+=usr/bin/h2xs -OLD_FILES+=usr/bin/pl2pm -OLD_FILES+=usr/bin/splain -OLD_FILES+=usr/bin/s2p -OLD_FILES+=usr/bin/find2perl -OLD_FILES+=usr/sbin/pkg_update -OLD_FILES+=usr/sbin/scriptdump -# 20020409 GC kget(1), userconfig is long dead. -OLD_FILES+=sbin/kget -OLD_FILES+=usr/share/man/man8/kget.8.gz -# 200203XX -OLD_FILES+=usr/lib/libss.a -OLD_FILES+=usr/lib/libss_p.a -OLD_FILES+=usr/lib/libtelnet.a -OLD_FILES+=usr/lib/libtelnet_p.a -OLD_FILES+=usr/sbin/diskpart -# 200202XX -OLD_FILES+=usr/bin/gprof4 -# 200201XX -OLD_FILES+=usr/sbin/linux -# 2001XXXX -OLD_FILES+=usr/bin/joy -OLD_FILES+=usr/sbin/ibcs2 -OLD_FILES+=usr/sbin/svr4 -OLD_FILES+=usr/bin/chflags -OLD_FILES+=usr/sbin/uuconv -OLD_FILES+=usr/sbin/uuchk -OLD_FILES+=usr/sbin/portmap -OLD_FILES+=usr/sbin/pmap_set -OLD_FILES+=usr/sbin/pmap_dump -OLD_FILES+=usr/sbin/mcon -OLD_FILES+=usr/sbin/stlstty -OLD_FILES+=usr/sbin/ispppcontrol -OLD_FILES+=usr/sbin/rndcontrol -# 20011001: UUCP migration to ports -OLD_FILES+=usr/bin/uucp -OLD_FILES+=usr/bin/uulog -OLD_FILES+=usr/bin/uuname -OLD_FILES+=usr/bin/uupick -OLD_FILES+=usr/bin/uusched -OLD_FILES+=usr/bin/uustat -OLD_FILES+=usr/bin/uuto -OLD_FILES+=usr/bin/uux -OLD_FILES+=usr/libexec/uucp/uucico -OLD_FILES+=usr/libexec/uucp/uuxqt -OLD_FILES+=usr/libexec/uucpd -OLD_FILES+=usr/share/man/man1/uuconv.1.gz -OLD_FILES+=usr/share/man/man1/uucp.1.gz -OLD_FILES+=usr/share/man/man1/uulog.1.gz -OLD_FILES+=usr/share/man/man1/uuname.1.gz -OLD_FILES+=usr/share/man/man1/uupick.1.gz -OLD_FILES+=usr/share/man/man1/uustat.1.gz -OLD_FILES+=usr/share/man/man1/uuto.1.gz -OLD_FILES+=usr/share/man/man1/uux.1.gz -OLD_FILES+=usr/share/man/man8/uuchk.8.gz -OLD_FILES+=usr/share/man/man8/uucico.8.gz -OLD_FILES+=usr/share/man/man8/uucpd.8.gz -OLD_FILES+=usr/share/man/man8/uusched.8.gz -OLD_FILES+=usr/share/man/man8/uuxqt.8.gz -# 20010523 mount_portal -> mount_portalfs -OLD_FILES+=sbin/mount_portal -OLD_FILES+=usr/share/man/man8/mount_portal.8.gz -# 200104XX -OLD_FILES+=usr/lib/libdescrypt.a -OLD_FILES+=usr/lib/libscrypt.a -OLD_FILES+=usr/lib/libscrypt_p.a -OLD_FILES+=usr/sbin/pim6stat -OLD_FILES+=usr/sbin/pim6sd -OLD_FILES+=usr/sbin/pim6dd -# 20010217 -OLD_FILES+=usr/share/doc/bind/misc/dns-setup -# 20001200 -OLD_FILES+=usr/lib/libgcc_r_pic.a -# 200009XX -OLD_FILES+=usr/lib/libRSAglue.a -OLD_FILES+=usr/lib/libRSAglue.so -OLD_FILES+=usr/lib/librsaINTL.a -OLD_FILES+=usr/lib/librsaUSA.a -OLD_FILES+=usr/lib/librsaUSA.so -# 200002XX ? -OLD_FILES+=usr/lib/libf2c.a -OLD_FILES+=usr/lib/libf2c_p.a -OLD_FILES+=usr/lib/libg++.a -OLD_FILES+=usr/lib/libg++_p.a -# 20001006 -OLD_FILES+=usr/bin/miniperl -# 20000810 -OLD_FILES+=usr/bin/sperl -# 200001XX -OLD_FILES+=usr/sbin/apmconf -## unsorted -# do we still support aout builds? -#OLD_FILES+=usr/lib/aout/c++rt0.o -#OLD_FILES+=usr/lib/aout/crt0.o -#OLD_FILES+=usr/lib/aout/gcrt0.o -#OLD_FILES+=usr/lib/aout/scrt0.o -#OLD_FILES+=usr/lib/aout/sgcrt0.o -OLD_FILES+=usr/lib/pam_ftp.so -OLD_FILES+=usr/share/man/man1/CA.pl.1.gz -OLD_FILES+=usr/share/man/man1/asn1parse.1.gz -OLD_FILES+=usr/share/man/man1/ca.1.gz -OLD_FILES+=usr/share/man/man1/ciphers.1.gz -OLD_FILES+=usr/share/man/man1/config.1.gz -OLD_FILES+=usr/share/man/man1/crl.1.gz -OLD_FILES+=usr/share/man/man1/crl2pkcs7.1.gz -OLD_FILES+=usr/share/man/man1/dgst.1.gz -OLD_FILES+=usr/share/man/man1/dhparam.1.gz -OLD_FILES+=usr/share/man/man1/doscmd.1.gz -OLD_FILES+=usr/share/man/man1/dsa.1.gz -OLD_FILES+=usr/share/man/man1/dsaparam.1.gz -OLD_FILES+=usr/share/man/man1/enc.1.gz -OLD_FILES+=usr/share/man/man1/gendsa.1.gz -OLD_FILES+=usr/share/man/man1/genrsa.1.gz -OLD_FILES+=usr/share/man/man1/getNAME.1.gz -OLD_FILES+=usr/share/man/man1/nseq.1.gz -OLD_FILES+=usr/share/man/man1/ocsp.1.gz -OLD_FILES+=usr/share/man/man1/openssl.1.gz -OLD_FILES+=usr/share/man/man1/pkcs12.1.gz -OLD_FILES+=usr/share/man/man1/pkcs7.1.gz -OLD_FILES+=usr/share/man/man1/pkcs8.1.gz -OLD_FILES+=usr/share/man/man1/rand.1.gz -OLD_FILES+=usr/share/man/man1/req.1.gz -OLD_FILES+=usr/share/man/man1/rsa.1.gz -OLD_FILES+=usr/share/man/man1/rsautl.1.gz -OLD_FILES+=usr/share/man/man1/s_client.1.gz -OLD_FILES+=usr/share/man/man1/s_server.1.gz -OLD_FILES+=usr/share/man/man1/sess_id.1.gz -OLD_FILES+=usr/share/man/man1/smime.1.gz -OLD_FILES+=usr/share/man/man1/speed.1.gz -OLD_FILES+=usr/share/man/man1/spkac.1.gz -OLD_FILES+=usr/share/man/man1/verify.1.gz -OLD_FILES+=usr/share/man/man1/version.1.gz -OLD_FILES+=usr/share/man/man1/x509.1.gz -OLD_FILES+=usr/share/man/man3/SSL_COMP_add_compression_method.3.gz -OLD_FILES+=usr/share/man/man3/SSL_CTX_get_ex_new_index.3.gz -OLD_FILES+=usr/share/man/man3/archive_entry_dup.3.gz -OLD_FILES+=usr/share/man/man3/archive_entry_set_tartype.3.gz -OLD_FILES+=usr/share/man/man3/archive_entry_tartype.3.gz -OLD_FILES+=usr/share/man/man3/archive_read_data_into_file.3.gz -OLD_FILES+=usr/share/man/man3/archive_read_open_tar.3.gz -OLD_FILES+=usr/share/man/man3/archive_read_support_format_gnutar.3.gz -OLD_FILES+=usr/share/man/man3/cipher.3.gz -OLD_FILES+=usr/share/man/man3/des_cipher.3.gz -OLD_FILES+=usr/share/man/man3/des_setkey.3.gz -OLD_FILES+=usr/share/man/man3/encrypt.3.gz -OLD_FILES+=usr/share/man/man3/endvfsent.3.gz -OLD_FILES+=usr/share/man/man3/getvfsbytype.3.gz -OLD_FILES+=usr/share/man/man3/getvfsent.3.gz -OLD_FILES+=usr/share/man/man3/isnanf.3.gz -OLD_FILES+=usr/share/man/man3/libautofs.3.gz -OLD_FILES+=usr/share/man/man3/pthread_attr_setsstack.3.gz -OLD_FILES+=usr/share/man/man3/pthread_getcancelstate.3.gz -OLD_FILES+=usr/share/man/man3/set_assertion_failure_callback.3.gz -OLD_FILES+=usr/share/man/man3/setkey.3.gz -OLD_FILES+=usr/share/man/man3/setvfsent.3.gz -OLD_FILES+=usr/share/man/man3/ssl.3.gz -OLD_FILES+=usr/share/man/man3/vfsisloadable.3.gz -OLD_FILES+=usr/share/man/man3/vfsload.3.gz -OLD_FILES+=usr/share/man/man4/als4000.4.gz -OLD_FILES+=usr/share/man/man4/csa.4.gz -OLD_FILES+=usr/share/man/man4/emu10k1.4.gz -OLD_FILES+=usr/share/man/man4/euc.4.gz -OLD_FILES+=usr/share/man/man4/gusc.4.gz -OLD_FILES+=usr/share/man/man4/if_fwp.4.gz -OLD_FILES+=usr/share/man/man4/lomac.4.gz -OLD_FILES+=usr/share/man/man4/maestro3.4.gz -OLD_FILES+=usr/share/man/man4/raid.4.gz -OLD_FILES+=usr/share/man/man4/sbc.4.gz -OLD_FILES+=usr/share/man/man4/sd.4.gz -OLD_FILES+=usr/share/man/man4/snc.4.gz -OLD_FILES+=usr/share/man/man4/st.4.gz -OLD_FILES+=usr/share/man/man4/uaudio.4.gz -OLD_FILES+=usr/share/man/man4/utf2.4.gz -OLD_FILES+=usr/share/man/man4/vinumdebug.4.gz -OLD_FILES+=usr/share/man/man5/disklabel.5.gz -OLD_FILES+=usr/share/man/man5/dm.conf.5.gz -OLD_FILES+=usr/share/man/man5/ranlib.5.gz -OLD_FILES+=usr/share/man/man5/utf2.5.gz -OLD_FILES+=usr/share/man/man7/groff_mwww.7.gz -OLD_FILES+=usr/share/man/man7/mmroff.7.gz -OLD_FILES+=usr/share/man/man7/mwww.7.gz -OLD_FILES+=usr/share/man/man8/dm.8.gz -OLD_FILES+=usr/share/man/man8/pam_ftp.8.gz -OLD_FILES+=usr/share/man/man8/pam_wheel.8.gz -OLD_FILES+=usr/share/man/man8/ssl.8.gz -OLD_FILES+=usr/share/man/man8/wlconfig.8.gz -OLD_FILES+=usr/share/man/man9/CURSIG.9.gz -OLD_FILES+=usr/share/man/man9/VFS_INIT.9.gz -OLD_FILES+=usr/share/man/man9/at_exit.9.gz -OLD_FILES+=usr/share/man/man9/at_fork.9.gz -OLD_FILES+=usr/share/man/man9/cdevsw_add.9.gz -OLD_FILES+=usr/share/man/man9/cdevsw_remove.9.gz -OLD_FILES+=usr/share/man/man9/cv_waitq_empty.9.gz -OLD_FILES+=usr/share/man/man9/cv_waitq_remove.9.gz -OLD_FILES+=usr/share/man/man9/endtsleep.9.gz -OLD_FILES+=usr/share/man/man9/jumbo.9.gz -OLD_FILES+=usr/share/man/man9/jumbo_freem.9.gz -OLD_FILES+=usr/share/man/man9/jumbo_pg_alloc.9.gz -OLD_FILES+=usr/share/man/man9/jumbo_pg_free.9.gz -OLD_FILES+=usr/share/man/man9/jumbo_pg_steal.9.gz -OLD_FILES+=usr/share/man/man9/jumbo_phys_to_kva.9.gz -OLD_FILES+=usr/share/man/man9/jumbo_vm_init.9.gz -OLD_FILES+=usr/share/man/man9/mac_biba.9.gz -OLD_FILES+=usr/share/man/man9/mac_bsdextended.9.gz -OLD_FILES+=usr/share/man/man9/mono_time.9.gz -OLD_FILES+=usr/share/man/man9/p1003_1b.9.gz -OLD_FILES+=usr/share/man/man9/pmap_prefault.9.gz -OLD_FILES+=usr/share/man/man9/posix4.9.gz -OLD_FILES+=usr/share/man/man9/resource_query_name.9.gz -OLD_FILES+=usr/share/man/man9/resource_query_string.9.gz -OLD_FILES+=usr/share/man/man9/resource_query_unit.9.gz -OLD_FILES+=usr/share/man/man9/rm_at_exit.9.gz -OLD_FILES+=usr/share/man/man9/rm_at_fork.9.gz -OLD_FILES+=usr/share/man/man9/runtime.9.gz -OLD_FILES+=usr/share/man/man9/sleepinit.9.gz -OLD_FILES+=usr/share/man/man9/unsleep.9.gz -OLD_FILES+=usr/share/games/atc/Game_List -OLD_FILES+=usr/share/games/atc/Killer -OLD_FILES+=usr/share/games/atc/crossover -OLD_FILES+=usr/share/games/atc/default -OLD_FILES+=usr/share/games/atc/easy -OLD_FILES+=usr/share/games/atc/game_2 -OLD_FILES+=usr/share/games/larn/larnmaze -OLD_FILES+=usr/share/games/larn/larnopts -OLD_FILES+=usr/share/games/larn/larn.help -OLD_FILES+=usr/share/games/quiz.db/africa -OLD_FILES+=usr/share/games/quiz.db/america -OLD_FILES+=usr/share/games/quiz.db/areas -OLD_FILES+=usr/share/games/quiz.db/arith -OLD_FILES+=usr/share/games/quiz.db/asia -OLD_FILES+=usr/share/games/quiz.db/babies -OLD_FILES+=usr/share/games/quiz.db/bard -OLD_FILES+=usr/share/games/quiz.db/chinese -OLD_FILES+=usr/share/games/quiz.db/collectives -OLD_FILES+=usr/share/games/quiz.db/ed -OLD_FILES+=usr/share/games/quiz.db/elements -OLD_FILES+=usr/share/games/quiz.db/europe -OLD_FILES+=usr/share/games/quiz.db/flowers -OLD_FILES+=usr/share/games/quiz.db/greek -OLD_FILES+=usr/share/games/quiz.db/inca -OLD_FILES+=usr/share/games/quiz.db/index -OLD_FILES+=usr/share/games/quiz.db/latin -OLD_FILES+=usr/share/games/quiz.db/locomotive -OLD_FILES+=usr/share/games/quiz.db/midearth -OLD_FILES+=usr/share/games/quiz.db/morse -OLD_FILES+=usr/share/games/quiz.db/murders -OLD_FILES+=usr/share/games/quiz.db/poetry -OLD_FILES+=usr/share/games/quiz.db/posneg -OLD_FILES+=usr/share/games/quiz.db/pres -OLD_FILES+=usr/share/games/quiz.db/province -OLD_FILES+=usr/share/games/quiz.db/seq-easy -OLD_FILES+=usr/share/games/quiz.db/seq-hard -OLD_FILES+=usr/share/games/quiz.db/sexes -OLD_FILES+=usr/share/games/quiz.db/sov -OLD_FILES+=usr/share/games/quiz.db/spell -OLD_FILES+=usr/share/games/quiz.db/state -OLD_FILES+=usr/share/games/quiz.db/trek -OLD_FILES+=usr/share/games/quiz.db/ucc -OLD_FILES+=usr/share/games/cribbage.instr -OLD_FILES+=usr/share/games/fish.instr -OLD_FILES+=usr/share/games/wump.info -OLD_FILES+=usr/games/hide/adventure -OLD_FILES+=usr/games/hide/arithmetic -OLD_FILES+=usr/games/hide/atc -OLD_FILES+=usr/games/hide/backgammon -OLD_FILES+=usr/games/hide/teachgammon -OLD_FILES+=usr/games/hide/battlestar -OLD_FILES+=usr/games/hide/bs -OLD_FILES+=usr/games/hide/canfield -OLD_FILES+=usr/games/hide/cribbage -OLD_FILES+=usr/games/hide/fish -OLD_FILES+=usr/games/hide/hack -OLD_FILES+=usr/games/hide/hangman -OLD_FILES+=usr/games/hide/larn -OLD_FILES+=usr/games/hide/mille -OLD_FILES+=usr/games/hide/phantasia -OLD_FILES+=usr/games/hide/quiz -OLD_FILES+=usr/games/hide/robots -OLD_FILES+=usr/games/hide/rogue -OLD_FILES+=usr/games/hide/sail -OLD_FILES+=usr/games/hide/snake -OLD_FILES+=usr/games/hide/trek -OLD_FILES+=usr/games/hide/worm -OLD_FILES+=usr/games/hide/wump -OLD_FILES+=usr/games/adventure -OLD_FILES+=usr/games/arithmetic -OLD_FILES+=usr/games/atc -OLD_FILES+=usr/games/backgammon -OLD_FILES+=usr/games/teachgammon -OLD_FILES+=usr/games/battlestar -OLD_FILES+=usr/games/bs -OLD_FILES+=usr/games/canfield -OLD_FILES+=usr/games/cfscores -OLD_FILES+=usr/games/cribbage -OLD_FILES+=usr/games/dm -OLD_FILES+=usr/games/fish -OLD_FILES+=usr/games/hack -OLD_FILES+=usr/games/hangman -OLD_FILES+=usr/games/larn -OLD_FILES+=usr/games/mille -OLD_FILES+=usr/games/phantasia -OLD_FILES+=usr/games/piano -OLD_FILES+=usr/games/pig -OLD_FILES+=usr/games/quiz -OLD_FILES+=usr/games/rain -OLD_FILES+=usr/games/robots -OLD_FILES+=usr/games/rogue -OLD_FILES+=usr/games/sail -OLD_FILES+=usr/games/snake -OLD_FILES+=usr/games/snscore -OLD_FILES+=usr/games/trek -OLD_FILES+=usr/games/wargames -OLD_FILES+=usr/games/worm -OLD_FILES+=usr/games/worms -OLD_FILES+=usr/games/wump -OLD_FILES+=sbin/mount_reiserfs -OLD_FILES+=usr/include/cam/cam_extend.h -OLD_FILES+=usr/include/dev/wi/wi_hostap.h -OLD_FILES+=usr/include/disktab.h -OLD_FILES+=usr/include/g++/FlexLexer.h -OLD_FILES+=usr/include/g++/PlotFile.h -OLD_FILES+=usr/include/g++/SFile.h -OLD_FILES+=usr/include/g++/_G_config.h -OLD_FILES+=usr/include/g++/algo.h -OLD_FILES+=usr/include/g++/algobase.h -OLD_FILES+=usr/include/g++/algorithm -OLD_FILES+=usr/include/g++/alloc.h -OLD_FILES+=usr/include/g++/bitset -OLD_FILES+=usr/include/g++/builtinbuf.h -OLD_FILES+=usr/include/g++/bvector.h -OLD_FILES+=usr/include/g++/cassert -OLD_FILES+=usr/include/g++/cctype -OLD_FILES+=usr/include/g++/cerrno -OLD_FILES+=usr/include/g++/cfloat -OLD_FILES+=usr/include/g++/ciso646 -OLD_FILES+=usr/include/g++/climits -OLD_FILES+=usr/include/g++/clocale -OLD_FILES+=usr/include/g++/cmath -OLD_FILES+=usr/include/g++/complex -OLD_FILES+=usr/include/g++/complex.h -OLD_FILES+=usr/include/g++/csetjmp -OLD_FILES+=usr/include/g++/csignal -OLD_FILES+=usr/include/g++/cstdarg -OLD_FILES+=usr/include/g++/cstddef -OLD_FILES+=usr/include/g++/cstdio -OLD_FILES+=usr/include/g++/cstdlib -OLD_FILES+=usr/include/g++/cstring -OLD_FILES+=usr/include/g++/ctime -OLD_FILES+=usr/include/g++/cwchar -OLD_FILES+=usr/include/g++/cwctype -OLD_FILES+=usr/include/g++/defalloc.h -OLD_FILES+=usr/include/g++/deque -OLD_FILES+=usr/include/g++/deque.h -OLD_FILES+=usr/include/g++/editbuf.h -OLD_FILES+=usr/include/g++/exception -OLD_FILES+=usr/include/g++/floatio.h -OLD_FILES+=usr/include/g++/fstream -OLD_FILES+=usr/include/g++/fstream.h -OLD_FILES+=usr/include/g++/function.h -OLD_FILES+=usr/include/g++/functional -OLD_FILES+=usr/include/g++/hash_map -OLD_FILES+=usr/include/g++/hash_map.h -OLD_FILES+=usr/include/g++/hash_set -OLD_FILES+=usr/include/g++/hash_set.h -OLD_FILES+=usr/include/g++/hashtable.h -OLD_FILES+=usr/include/g++/heap.h -OLD_FILES+=usr/include/g++/indstream.h -OLD_FILES+=usr/include/g++/iolibio.h -OLD_FILES+=usr/include/g++/iomanip -OLD_FILES+=usr/include/g++/iomanip.h -OLD_FILES+=usr/include/g++/iosfwd -OLD_FILES+=usr/include/g++/iostdio.h -OLD_FILES+=usr/include/g++/iostream -OLD_FILES+=usr/include/g++/iostream.h -OLD_FILES+=usr/include/g++/iostreamP.h -OLD_FILES+=usr/include/g++/istream.h -OLD_FILES+=usr/include/g++/iterator -OLD_FILES+=usr/include/g++/iterator.h -OLD_FILES+=usr/include/g++/libio.h -OLD_FILES+=usr/include/g++/libioP.h -OLD_FILES+=usr/include/g++/list -OLD_FILES+=usr/include/g++/list.h -OLD_FILES+=usr/include/g++/map -OLD_FILES+=usr/include/g++/map.h -OLD_FILES+=usr/include/g++/memory -OLD_FILES+=usr/include/g++/multimap.h -OLD_FILES+=usr/include/g++/multiset.h -OLD_FILES+=usr/include/g++/new -OLD_FILES+=usr/include/g++/new.h -OLD_FILES+=usr/include/g++/numeric -OLD_FILES+=usr/include/g++/ostream.h -OLD_FILES+=usr/include/g++/pair.h -OLD_FILES+=usr/include/g++/parsestream.h -OLD_FILES+=usr/include/g++/pfstream.h -OLD_FILES+=usr/include/g++/procbuf.h -OLD_FILES+=usr/include/g++/pthread_alloc -OLD_FILES+=usr/include/g++/pthread_alloc.h -OLD_FILES+=usr/include/g++/queue -OLD_FILES+=usr/include/g++/rope -OLD_FILES+=usr/include/g++/rope.h -OLD_FILES+=usr/include/g++/ropeimpl.h -OLD_FILES+=usr/include/g++/set -OLD_FILES+=usr/include/g++/set.h -OLD_FILES+=usr/include/g++/slist -OLD_FILES+=usr/include/g++/slist.h -OLD_FILES+=usr/include/g++/sstream -OLD_FILES+=usr/include/g++/stack -OLD_FILES+=usr/include/g++/stack.h -OLD_FILES+=usr/include/g++/std/bastring.cc -OLD_FILES+=usr/include/g++/std/bastring.h -OLD_FILES+=usr/include/g++/std/complext.cc -OLD_FILES+=usr/include/g++/std/complext.h -OLD_FILES+=usr/include/g++/std/dcomplex.h -OLD_FILES+=usr/include/g++/std/fcomplex.h -OLD_FILES+=usr/include/g++/std/gslice.h -OLD_FILES+=usr/include/g++/std/gslice_array.h -OLD_FILES+=usr/include/g++/std/indirect_array.h -OLD_FILES+=usr/include/g++/std/ldcomplex.h -OLD_FILES+=usr/include/g++/std/mask_array.h -OLD_FILES+=usr/include/g++/std/slice.h -OLD_FILES+=usr/include/g++/std/slice_array.h -OLD_FILES+=usr/include/g++/std/std_valarray.h -OLD_FILES+=usr/include/g++/std/straits.h -OLD_FILES+=usr/include/g++/std/valarray_array.h -OLD_FILES+=usr/include/g++/std/valarray_array.tcc -OLD_FILES+=usr/include/g++/std/valarray_meta.h -OLD_FILES+=usr/include/g++/stdexcept -OLD_FILES+=usr/include/g++/stdiostream.h -OLD_FILES+=usr/include/g++/stl.h -OLD_FILES+=usr/include/g++/stl_algo.h -OLD_FILES+=usr/include/g++/stl_algobase.h -OLD_FILES+=usr/include/g++/stl_alloc.h -OLD_FILES+=usr/include/g++/stl_bvector.h -OLD_FILES+=usr/include/g++/stl_config.h -OLD_FILES+=usr/include/g++/stl_construct.h -OLD_FILES+=usr/include/g++/stl_deque.h -OLD_FILES+=usr/include/g++/stl_function.h -OLD_FILES+=usr/include/g++/stl_hash_fun.h -OLD_FILES+=usr/include/g++/stl_hash_map.h -OLD_FILES+=usr/include/g++/stl_hash_set.h -OLD_FILES+=usr/include/g++/stl_hashtable.h -OLD_FILES+=usr/include/g++/stl_heap.h -OLD_FILES+=usr/include/g++/stl_iterator.h -OLD_FILES+=usr/include/g++/stl_list.h -OLD_FILES+=usr/include/g++/stl_map.h -OLD_FILES+=usr/include/g++/stl_multimap.h -OLD_FILES+=usr/include/g++/stl_multiset.h -OLD_FILES+=usr/include/g++/stl_numeric.h -OLD_FILES+=usr/include/g++/stl_pair.h -OLD_FILES+=usr/include/g++/stl_queue.h -OLD_FILES+=usr/include/g++/stl_raw_storage_iter.h -OLD_FILES+=usr/include/g++/stl_relops.h -OLD_FILES+=usr/include/g++/stl_rope.h -OLD_FILES+=usr/include/g++/stl_set.h -OLD_FILES+=usr/include/g++/stl_slist.h -OLD_FILES+=usr/include/g++/stl_stack.h -OLD_FILES+=usr/include/g++/stl_tempbuf.h -OLD_FILES+=usr/include/g++/stl_tree.h -OLD_FILES+=usr/include/g++/stl_uninitialized.h -OLD_FILES+=usr/include/g++/stl_vector.h -OLD_FILES+=usr/include/g++/stream.h -OLD_FILES+=usr/include/g++/streambuf.h -OLD_FILES+=usr/include/g++/strfile.h -OLD_FILES+=usr/include/g++/string -OLD_FILES+=usr/include/g++/strstream -OLD_FILES+=usr/include/g++/strstream.h -OLD_FILES+=usr/include/g++/tempbuf.h -OLD_FILES+=usr/include/g++/tree.h -OLD_FILES+=usr/include/g++/type_traits.h -OLD_FILES+=usr/include/g++/typeinfo -OLD_FILES+=usr/include/g++/utility -OLD_FILES+=usr/include/g++/valarray -OLD_FILES+=usr/include/g++/vector -OLD_FILES+=usr/include/g++/vector.h -OLD_FILES+=usr/include/gmp.h -OLD_FILES+=usr/include/isc/assertions.h -OLD_FILES+=usr/include/isc/ctl.h -OLD_FILES+=usr/include/isc/dst.h -OLD_FILES+=usr/include/isc/eventlib.h -OLD_FILES+=usr/include/isc/heap.h -OLD_FILES+=usr/include/isc/irpmarshall.h -OLD_FILES+=usr/include/isc/list.h -OLD_FILES+=usr/include/isc/logging.h -OLD_FILES+=usr/include/isc/memcluster.h -OLD_FILES+=usr/include/isc/misc.h -OLD_FILES+=usr/include/isc/tree.h -OLD_FILES+=usr/include/machine/ansi.h -OLD_FILES+=usr/include/machine/apic.h -OLD_FILES+=usr/include/machine/asc_ioctl.h -OLD_FILES+=usr/include/machine/asnames.h -OLD_FILES+=usr/include/machine/bus_at386.h -OLD_FILES+=usr/include/machine/bus_memio.h -OLD_FILES+=usr/include/machine/bus_pc98.h -OLD_FILES+=usr/include/machine/bus_pio.h -OLD_FILES+=usr/include/machine/cdk.h -OLD_FILES+=usr/include/machine/comstats.h -OLD_FILES+=usr/include/machine/console.h -OLD_FILES+=usr/include/machine/critical.h -OLD_FILES+=usr/include/machine/cronyx.h -OLD_FILES+=usr/include/machine/dvcfg.h -OLD_FILES+=usr/include/machine/globaldata.h -OLD_FILES+=usr/include/machine/globals.h -OLD_FILES+=usr/include/machine/gsc.h -OLD_FILES+=usr/include/machine/i4b_isppp.h -OLD_FILES+=usr/include/machine/if_wavelan_ieee.h -OLD_FILES+=usr/include/machine/iic.h -OLD_FILES+=usr/include/machine/ioctl_ctx.h -OLD_FILES+=usr/include/machine/ioctl_fd.h -OLD_FILES+=usr/include/machine/ipl.h -OLD_FILES+=usr/include/machine/lock.h -OLD_FILES+=usr/include/machine/mouse.h -OLD_FILES+=usr/include/machine/mpapic.h -OLD_FILES+=usr/include/machine/mtpr.h -OLD_FILES+=usr/include/machine/pc/msdos.h -OLD_FILES+=usr/include/machine/physio_proc.h -OLD_FILES+=usr/include/machine/smb.h -OLD_FILES+=usr/include/machine/spigot.h -OLD_FILES+=usr/include/machine/types.h -OLD_FILES+=usr/include/machine/uc_device.h -OLD_FILES+=usr/include/machine/ultrasound.h -OLD_FILES+=usr/include/machine/wtio.h -OLD_FILES+=usr/include/msdosfs/bootsect.h -OLD_FILES+=usr/include/msdosfs/bpb.h -OLD_FILES+=usr/include/msdosfs/denode.h -OLD_FILES+=usr/include/msdosfs/direntry.h -OLD_FILES+=usr/include/msdosfs/fat.h -OLD_FILES+=usr/include/msdosfs/msdosfsmount.h -OLD_FILES+=usr/include/net/hostcache.h -OLD_FILES+=usr/include/net/if_faith.h -OLD_FILES+=usr/include/net/if_ieee80211.h -OLD_FILES+=usr/include/net/if_tunvar.h -OLD_FILES+=usr/include/net/intrq.h -OLD_FILES+=usr/include/netatm/kern_include.h -OLD_FILES+=usr/include/netinet/if_fddi.h -OLD_FILES+=usr/include/netinet/in_hostcache.h -OLD_FILES+=usr/include/netinet/ip_flow.h -OLD_FILES+=usr/include/netinet/ip_fw2.h -OLD_FILES+=usr/include/netinet6/in6_prefix.h -OLD_FILES+=usr/include/netns/idp.h -OLD_FILES+=usr/include/netns/idp_var.h -OLD_FILES+=usr/include/netns/ns.h -OLD_FILES+=usr/include/netns/ns_error.h -OLD_FILES+=usr/include/netns/ns_if.h -OLD_FILES+=usr/include/netns/ns_pcb.h -OLD_FILES+=usr/include/netns/sp.h -OLD_FILES+=usr/include/netns/spidp.h -OLD_FILES+=usr/include/netns/spp_debug.h -OLD_FILES+=usr/include/netns/spp_timer.h -OLD_FILES+=usr/include/netns/spp_var.h -OLD_FILES+=usr/include/nfs/nfs.h -OLD_FILES+=usr/include/nfs/nfsm_subs.h -OLD_FILES+=usr/include/nfs/nfsmount.h -OLD_FILES+=usr/include/nfs/nfsnode.h -OLD_FILES+=usr/include/nfs/nfsrtt.h -OLD_FILES+=usr/include/nfs/nfsrvcache.h -OLD_FILES+=usr/include/nfs/nfsv2.h -OLD_FILES+=usr/include/nfs/nqnfs.h -OLD_FILES+=usr/include/ntfs/ntfs.h -OLD_FILES+=usr/include/ntfs/ntfs_compr.h -OLD_FILES+=usr/include/ntfs/ntfs_ihash.h -OLD_FILES+=usr/include/ntfs/ntfs_inode.h -OLD_FILES+=usr/include/ntfs/ntfs_subr.h -OLD_FILES+=usr/include/ntfs/ntfs_vfsops.h -OLD_FILES+=usr/include/ntfs/ntfsmount.h -OLD_FILES+=usr/include/nwfs/nwfs.h -OLD_FILES+=usr/include/nwfs/nwfs_mount.h -OLD_FILES+=usr/include/nwfs/nwfs_node.h -OLD_FILES+=usr/include/nwfs/nwfs_subr.h -OLD_FILES+=usr/include/posix4/_semaphore.h -OLD_FILES+=usr/include/posix4/aio.h -OLD_FILES+=usr/include/posix4/ksem.h -OLD_FILES+=usr/include/posix4/mqueue.h -OLD_FILES+=usr/include/posix4/posix4.h -OLD_FILES+=usr/include/posix4/sched.h -OLD_FILES+=usr/include/posix4/semaphore.h -OLD_DIRS+=usr/include/posix4 -OLD_FILES+=usr/include/security/_pam_compat.h -OLD_FILES+=usr/include/security/_pam_macros.h -OLD_FILES+=usr/include/security/_pam_types.h -OLD_FILES+=usr/include/security/pam_malloc.h -OLD_FILES+=usr/include/security/pam_misc.h -OLD_FILES+=usr/include/skey.h -OLD_FILES+=usr/include/strhash.h -OLD_FILES+=usr/include/struct.h -OLD_FILES+=usr/include/sys/_label.h -OLD_FILES+=usr/include/sys/_posix.h -OLD_FILES+=usr/include/sys/bus_private.h -OLD_FILES+=usr/include/sys/ccdvar.h -OLD_FILES+=usr/include/sys/diskslice.h -OLD_FILES+=usr/include/sys/dmap.h -OLD_FILES+=usr/include/sys/inttypes.h -OLD_FILES+=usr/include/sys/jumbo.h -OLD_FILES+=usr/include/sys/mac_policy.h -OLD_FILES+=usr/include/sys/pbioio.h -OLD_FILES+=usr/include/sys/syscall-hide.h -OLD_FILES+=usr/include/sys/tprintf.h -OLD_FILES+=usr/include/sys/vnioctl.h -OLD_FILES+=usr/include/sys/wormio.h -OLD_FILES+=usr/include/telnet.h -OLD_FILES+=usr/include/ufs/mfs/mfs_extern.h -OLD_FILES+=usr/include/ufs/mfs/mfsnode.h -OLD_FILES+=usr/include/values.h -OLD_FILES+=usr/include/vm/vm_zone.h -OLD_FILES+=usr/share/examples/etc/usbd.conf -OLD_FILES+=usr/share/examples/meteor/README -OLD_FILES+=usr/share/examples/meteor/rgb16.c -OLD_FILES+=usr/share/examples/meteor/rgb24.c -OLD_FILES+=usr/share/examples/meteor/test-n.c -OLD_FILES+=usr/share/examples/meteor/yuvpk.c -OLD_FILES+=usr/share/examples/meteor/yuvpl.c -OLD_FILES+=usr/share/examples/worm/README -OLD_FILES+=usr/share/examples/worm/makecdfs.sh -OLD_FILES+=usr/share/groff_font/devlj4/Makefile -OLD_FILES+=usr/share/groff_font/devlj4/text.map -OLD_FILES+=usr/share/groff_font/devlj4/special.map -OLD_FILES+=usr/share/misc/nslookup.help -OLD_FILES+=usr/share/sendmail/cf/feature/nodns.m4 -OLD_FILES+=usr/share/syscons/keymaps/lat-amer.kbd -OLD_FILES+=usr/share/vi/catalog/ru_SU.KOI8-R -OLD_FILES+=usr/share/zoneinfo/SystemV/YST9 -OLD_FILES+=usr/share/zoneinfo/SystemV/PST8 -OLD_FILES+=usr/share/zoneinfo/SystemV/EST5EDT -OLD_FILES+=usr/share/zoneinfo/SystemV/CST6CDT -OLD_FILES+=usr/share/zoneinfo/SystemV/MST7MDT -OLD_FILES+=usr/share/zoneinfo/SystemV/PST8PDT -OLD_FILES+=usr/share/zoneinfo/SystemV/YST9YDT -OLD_FILES+=usr/share/zoneinfo/SystemV/HST10 -OLD_FILES+=usr/share/zoneinfo/SystemV/MST7 -OLD_FILES+=usr/share/zoneinfo/SystemV/EST5 -OLD_FILES+=usr/share/zoneinfo/SystemV/AST4ADT -OLD_FILES+=usr/share/zoneinfo/SystemV/CST6 -OLD_FILES+=usr/share/zoneinfo/SystemV/AST4 -OLD_DIRS+=usr/share/zoneinfo/SystemV -OLD_FILES+=usr/share/doc/ntp/accopt.htm -OLD_FILES+=usr/share/doc/ntp/assoc.htm -OLD_FILES+=usr/share/doc/ntp/audio.htm -OLD_FILES+=usr/share/doc/ntp/authopt.htm -OLD_FILES+=usr/share/doc/ntp/biblio.htm -OLD_FILES+=usr/share/doc/ntp/build.htm -OLD_FILES+=usr/share/doc/ntp/clockopt.htm -OLD_FILES+=usr/share/doc/ntp/config.htm -OLD_FILES+=usr/share/doc/ntp/confopt.htm -OLD_FILES+=usr/share/doc/ntp/copyright.htm -OLD_FILES+=usr/share/doc/ntp/debug.htm -OLD_FILES+=usr/share/doc/ntp/driver1.htm -OLD_FILES+=usr/share/doc/ntp/driver10.htm -OLD_FILES+=usr/share/doc/ntp/driver11.htm -OLD_FILES+=usr/share/doc/ntp/driver12.htm -OLD_FILES+=usr/share/doc/ntp/driver16.htm -OLD_FILES+=usr/share/doc/ntp/driver18.htm -OLD_FILES+=usr/share/doc/ntp/driver19.htm -OLD_FILES+=usr/share/doc/ntp/driver2.htm -OLD_FILES+=usr/share/doc/ntp/driver20.htm -OLD_FILES+=usr/share/doc/ntp/driver22.htm -OLD_FILES+=usr/share/doc/ntp/driver23.htm -OLD_FILES+=usr/share/doc/ntp/driver24.htm -OLD_FILES+=usr/share/doc/ntp/driver26.htm -OLD_FILES+=usr/share/doc/ntp/driver27.htm -OLD_FILES+=usr/share/doc/ntp/driver28.htm -OLD_FILES+=usr/share/doc/ntp/driver29.htm -OLD_FILES+=usr/share/doc/ntp/driver3.htm -OLD_FILES+=usr/share/doc/ntp/driver30.htm -OLD_FILES+=usr/share/doc/ntp/driver32.htm -OLD_FILES+=usr/share/doc/ntp/driver33.htm -OLD_FILES+=usr/share/doc/ntp/driver34.htm -OLD_FILES+=usr/share/doc/ntp/driver35.htm -OLD_FILES+=usr/share/doc/ntp/driver36.htm -OLD_FILES+=usr/share/doc/ntp/driver37.htm -OLD_FILES+=usr/share/doc/ntp/driver4.htm -OLD_FILES+=usr/share/doc/ntp/driver5.htm -OLD_FILES+=usr/share/doc/ntp/driver6.htm -OLD_FILES+=usr/share/doc/ntp/driver7.htm -OLD_FILES+=usr/share/doc/ntp/driver8.htm -OLD_FILES+=usr/share/doc/ntp/driver9.htm -OLD_FILES+=usr/share/doc/ntp/exec.htm -OLD_FILES+=usr/share/doc/ntp/extern.htm -OLD_FILES+=usr/share/doc/ntp/gadget.htm -OLD_FILES+=usr/share/doc/ntp/hints.htm -OLD_FILES+=usr/share/doc/ntp/howto.htm -OLD_FILES+=usr/share/doc/ntp/htmlprimer.htm -OLD_FILES+=usr/share/doc/ntp/index.htm -OLD_FILES+=usr/share/doc/ntp/kern.htm -OLD_FILES+=usr/share/doc/ntp/kernpps.htm -OLD_FILES+=usr/share/doc/ntp/ldisc.htm -OLD_FILES+=usr/share/doc/ntp/measure.htm -OLD_FILES+=usr/share/doc/ntp/miscopt.htm -OLD_FILES+=usr/share/doc/ntp/monopt.htm -OLD_FILES+=usr/share/doc/ntp/mx4200data.htm -OLD_FILES+=usr/share/doc/ntp/notes.htm -OLD_FILES+=usr/share/doc/ntp/ntpd.htm -OLD_FILES+=usr/share/doc/ntp/ntpdate.htm -OLD_FILES+=usr/share/doc/ntp/ntpdc.htm -OLD_FILES+=usr/share/doc/ntp/ntpq.htm -OLD_FILES+=usr/share/doc/ntp/ntptime.htm -OLD_FILES+=usr/share/doc/ntp/ntptrace.htm -OLD_FILES+=usr/share/doc/ntp/parsedata.htm -OLD_FILES+=usr/share/doc/ntp/parsenew.htm -OLD_FILES+=usr/share/doc/ntp/patches.htm -OLD_FILES+=usr/share/doc/ntp/porting.htm -OLD_FILES+=usr/share/doc/ntp/pps.htm -OLD_FILES+=usr/share/doc/ntp/prefer.htm -OLD_FILES+=usr/share/doc/ntp/qth.htm -OLD_FILES+=usr/share/doc/ntp/quick.htm -OLD_FILES+=usr/share/doc/ntp/rdebug.htm -OLD_FILES+=usr/share/doc/ntp/refclock.htm -OLD_FILES+=usr/share/doc/ntp/release.htm -OLD_FILES+=usr/share/doc/ntp/tickadj.htm -OLD_FILES+=usr/share/doc/papers/nqnfs.ascii.gz -OLD_FILES+=usr/share/doc/papers/px.ascii.gz -OLD_FILES+=usr/share/man/man3/exp10.3.gz -OLD_FILES+=usr/share/man/man3/exp10f.3.gz -OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz -OLD_FILES+=usr/share/man/man3/gss_krb5_compat_des3_mic.3.gz -OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz -OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz -OLD_FILES+=usr/share/man/man3/mbmb.3.gz -OLD_FILES+=usr/share/man/man3/setrunelocale.3.gz -OLD_FILES+=usr/share/man/man5/usbd.conf.5.gz -.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" -OLD_FILES+=usr/share/man/man8/boot_i386.8.gz -.endif -OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz -OLD_FILES+=usr/share/man/man9/VFS_START.9.gz -OLD_FILES+=usr/share/man/man9/cpu_critical_exit.9.gz -OLD_FILES+=usr/share/man/man9/cpu_critical_enter.9.gz -OLD_FILES+=usr/share/info/annotate.info.gz -OLD_FILES+=usr/share/info/tar.info.gz -OLD_FILES+=usr/share/bsnmp/defs/tree.def -OLD_FILES+=usr/share/bsnmp/defs/mibII_tree.def -OLD_FILES+=usr/share/bsnmp/defs/netgraph_tree.def -OLD_FILES+=usr/share/bsnmp/mibs/FOKUS-MIB.txt -OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-MIB.txt -OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-SNMPD.txt -OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-NETGRAPH.txt -OLD_FILES+=usr/libdata/msdosfs/iso22dos -OLD_FILES+=usr/libdata/msdosfs/iso72dos -OLD_FILES+=usr/libdata/msdosfs/koi2dos -OLD_FILES+=usr/libdata/msdosfs/koi8u2dos -# The following files are *not* obsolete, they just don't get touched at -# install, so don't add them: -# - boot/loader.rc -# - usr/share/tmac/man.local -# - usr/share/tmac/mm/locale -# - usr/share/tmac/mm/se_locale -# - var/yp/Makefile - -# Early entries split OLD_FILES, OLD_LIBS, and OLD_DIRS into separate sections -# in this file, but this practice was abandoned in the mid-2000s. -# -# 20071120: shared library version bump -OLD_LIBS+=usr/lib/libasn1.so.8 -OLD_LIBS+=usr/lib/libgssapi.so.8 -OLD_LIBS+=usr/lib/libgssapi_krb5.so.8 -OLD_LIBS+=usr/lib/libhdb.so.8 -OLD_LIBS+=usr/lib/libkadm5clnt.so.8 -OLD_LIBS+=usr/lib/libkadm5srv.so.8 -OLD_LIBS+=usr/lib/libkafs5.so.8 -OLD_LIBS+=usr/lib/libkrb5.so.8 -OLD_LIBS+=usr/lib/libobjc.so.2 -# 20070519: GCC 4.2 -OLD_FILES+=usr/lib/libg2c.a -OLD_FILES+=usr/lib/libg2c.so -OLD_LIBS+=usr/lib/libg2c.so.2 -OLD_FILES+=usr/lib/libg2c_p.a -OLD_FILES+=usr/lib/libgcc_pic.a -# 20060729: OpenSSL 0.9.7e -> 0.9.8b upgrade -OLD_LIBS+=lib/libcrypto.so.4 -OLD_LIBS+=usr/lib/libssl.so.4 -# 20060521: gethostbyaddr(3) ABI change -OLD_LIBS+=usr/lib/libroken.so.8 -OLD_LIBS+=lib/libatm.so.3 -OLD_LIBS+=lib/libc.so.6 -OLD_LIBS+=lib/libutil.so.5 -# 20060413: shared library moved to /usr/lib -MOVED_LIBS+=lib/libgpib.so.1 -# 20060413: libpcap.so.4 moved to /lib/ -MOVED_LIBS+=usr/lib/libpcap.so.4 -# 20060412: libpthread.so.2 moved to /lib/ -MOVED_LIBS+=usr/lib/libpthread.so.2 -# 20060127: revert libdisk to static-only -OLD_LIBS+=usr/lib/libdisk.so.3 -# 20051027: libc_r discontinued (removed 20101113) -OLD_FILES+=usr/lib/libc_r.a -OLD_FILES+=usr/lib/libc_r.so -OLD_LIBS+=usr/lib/libc_r.so.7 -OLD_FILES+=usr/lib/libc_r_p.a -# 20050722: bump for 6.0-RELEASE -OLD_LIBS+=lib/libalias.so.4 -OLD_LIBS+=lib/libatm.so.2 -OLD_LIBS+=lib/libbegemot.so.1 -OLD_LIBS+=lib/libbsdxml.so.1 -OLD_LIBS+=lib/libbsnmp.so.2 -OLD_LIBS+=lib/libc.so.5 -OLD_LIBS+=lib/libcam.so.2 -OLD_LIBS+=lib/libcrypt.so.2 -OLD_LIBS+=lib/libcrypto.so.3 -OLD_LIBS+=lib/libdevstat.so.4 -OLD_LIBS+=lib/libedit.so.4 -OLD_LIBS+=lib/libgeom.so.2 -OLD_LIBS+=lib/libgpib.so.0 -OLD_LIBS+=lib/libipsec.so.1 -OLD_LIBS+=lib/libipx.so.2 -OLD_LIBS+=lib/libkiconv.so.1 -OLD_LIBS+=lib/libkvm.so.2 -OLD_LIBS+=lib/libm.so.3 -OLD_LIBS+=lib/libmd.so.2 -OLD_LIBS+=lib/libncurses.so.5 -OLD_LIBS+=lib/libreadline.so.5 -OLD_LIBS+=lib/libsbuf.so.2 -OLD_LIBS+=lib/libufs.so.2 -OLD_LIBS+=lib/libutil.so.4 -OLD_LIBS+=lib/libz.so.2 -OLD_LIBS+=usr/lib/libarchive.so.1 -OLD_LIBS+=usr/lib/libasn1.so.7 -OLD_LIBS+=usr/lib/libbluetooth.so.1 -OLD_LIBS+=usr/lib/libbz2.so.1 -OLD_LIBS+=usr/lib/libc_r.so.5 -OLD_LIBS+=usr/lib/libcalendar.so.2 -OLD_LIBS+=usr/lib/libcom_err.so.2 -OLD_LIBS+=usr/lib/libdevinfo.so.2 -OLD_LIBS+=usr/lib/libdialog.so.4 -OLD_LIBS+=usr/lib/libfetch.so.3 -OLD_LIBS+=usr/lib/libform.so.2 -OLD_LIBS+=usr/lib/libftpio.so.5 -OLD_LIBS+=usr/lib/libg2c.so.1 -OLD_LIBS+=usr/lib/libgnuregex.so.2 -OLD_LIBS+=usr/lib/libgssapi.so.7 -OLD_LIBS+=usr/lib/libhdb.so.7 -OLD_LIBS+=usr/lib/libhistory.so.5 -OLD_LIBS+=usr/lib/libkadm5clnt.so.7 -OLD_LIBS+=usr/lib/libkadm5srv.so.7 -OLD_LIBS+=usr/lib/libkafs5.so.7 -OLD_LIBS+=usr/lib/libkrb5.so.7 -OLD_LIBS+=usr/lib/libmagic.so.1 -OLD_LIBS+=usr/lib/libmenu.so.2 -OLD_LIBS+=usr/lib/libmilter.so.2 -OLD_LIBS+=usr/lib/libmp.so.4 -OLD_LIBS+=usr/lib/libncp.so.1 -OLD_LIBS+=usr/lib/libnetgraph.so.1 -OLD_LIBS+=usr/lib/libngatm.so.1 -OLD_LIBS+=usr/lib/libobjc.so.1 -OLD_LIBS+=usr/lib/libopie.so.3 -OLD_LIBS+=usr/lib/libpam.so.2 -OLD_LIBS+=usr/lib/libpanel.so.2 -OLD_LIBS+=usr/lib/libpcap.so.3 -OLD_LIBS+=usr/lib/libpmc.so.2 -OLD_LIBS+=usr/lib/libpthread.so.1 -OLD_LIBS+=usr/lib/libradius.so.1 -OLD_LIBS+=usr/lib/libroken.so.7 -OLD_LIBS+=usr/lib/librpcsvc.so.2 -OLD_LIBS+=usr/lib/libsdp.so.1 -OLD_LIBS+=usr/lib/libsmb.so.1 -OLD_LIBS+=usr/lib/libssh.so.2 -OLD_LIBS+=usr/lib/libssl.so.3 -OLD_LIBS+=usr/lib/libstdc++.so.4 -OLD_LIBS+=usr/lib/libtacplus.so.1 -OLD_LIBS+=usr/lib/libthr.so.1 -OLD_LIBS+=usr/lib/libthread_db.so.1 -OLD_LIBS+=usr/lib/libugidfw.so.1 -OLD_LIBS+=usr/lib/libusbhid.so.1 -OLD_LIBS+=usr/lib/libvgl.so.3 -OLD_LIBS+=usr/lib/libwrap.so.3 -OLD_LIBS+=usr/lib/libypclnt.so.1 -OLD_LIBS+=usr/lib/pam_chroot.so.2 -OLD_LIBS+=usr/lib/pam_deny.so.2 -OLD_LIBS+=usr/lib/pam_echo.so.2 -OLD_LIBS+=usr/lib/pam_exec.so.2 -OLD_LIBS+=usr/lib/pam_ftpusers.so.2 -OLD_LIBS+=usr/lib/pam_group.so.2 -OLD_LIBS+=usr/lib/pam_guest.so.2 -OLD_LIBS+=usr/lib/pam_krb5.so.2 -OLD_LIBS+=usr/lib/pam_ksu.so.2 -OLD_LIBS+=usr/lib/pam_lastlog.so.2 -OLD_LIBS+=usr/lib/pam_login_access.so.2 -OLD_LIBS+=usr/lib/pam_nologin.so.2 -OLD_LIBS+=usr/lib/pam_opie.so.2 -OLD_LIBS+=usr/lib/pam_opieaccess.so.2 -OLD_LIBS+=usr/lib/pam_passwdqc.so.2 -OLD_LIBS+=usr/lib/pam_permit.so.2 -OLD_LIBS+=usr/lib/pam_radius.so.2 -OLD_LIBS+=usr/lib/pam_rhosts.so.2 -OLD_LIBS+=usr/lib/pam_rootok.so.2 -OLD_LIBS+=usr/lib/pam_securetty.so.2 -OLD_LIBS+=usr/lib/pam_self.so.2 -OLD_LIBS+=usr/lib/pam_ssh.so.2 -OLD_LIBS+=usr/lib/pam_tacplus.so.2 -OLD_LIBS+=usr/lib/pam_unix.so.2 -OLD_LIBS+=usr/lib/snmp_atm.so.3 -OLD_LIBS+=usr/lib/snmp_mibII.so.3 -OLD_LIBS+=usr/lib/snmp_netgraph.so.3 -OLD_LIBS+=usr/lib/snmp_pf.so.3 -# 200505XX: ? -OLD_LIBS+=usr/lib/snmp_atm.so.2 -OLD_LIBS+=usr/lib/snmp_mibII.so.2 -OLD_LIBS+=usr/lib/snmp_netgraph.so.2 -OLD_LIBS+=usr/lib/snmp_pf.so.2 -# 2005XXXX: not ready for primetime yet -OLD_LIBS+=usr/lib/libautofs.so.1 -# 200411XX: libxpg4 removal -OLD_LIBS+=usr/lib/libxpg4.so.3 -# 200410XX: libm compatibility fix -OLD_LIBS+=lib/libm.so.2 -# 20041001: version bump -OLD_LIBS+=lib/libreadline.so.4 -OLD_LIBS+=usr/lib/libhistory.so.4 -OLD_LIBS+=usr/lib/libopie.so.2 -OLD_LIBS+=usr/lib/libpcap.so.2 -# 20040925: bind9 import -OLD_LIBS+=usr/lib/libisc.so.1 -# 200408XX -OLD_LIBS+=usr/lib/snmp_netgraph.so.1 -# 200404XX -OLD_LIBS+=usr/lib/libsnmp.so.1 -OLD_LIBS+=usr/lib/snmp_mibII.so.1 -# 200309XX -OLD_LIBS+=usr/lib/libasn1.so.6 -OLD_LIBS+=usr/lib/libhdb.so.6 -OLD_LIBS+=usr/lib/libkadm5clnt.so.6 -OLD_LIBS+=usr/lib/libkadm5srv.so.6 -OLD_LIBS+=usr/lib/libkrb5.so.6 -OLD_LIBS+=usr/lib/libroken.so.6 -# 200304XX -OLD_LIBS+=usr/lib/libc.so.4 -OLD_LIBS+=usr/lib/libc_r.so.4 -OLD_LIBS+=usr/lib/libdevstat.so.2 -OLD_LIBS+=usr/lib/libedit.so.3 -OLD_LIBS+=usr/lib/libgmp.so.3 -OLD_LIBS+=usr/lib/libmp.so.3 -OLD_LIBS+=usr/lib/libpam.so.1 -OLD_LIBS+=usr/lib/libposix1e.so.2 -OLD_LIBS+=usr/lib/libskey.so.2 -OLD_LIBS+=usr/lib/libusbhid.so.0 -OLD_LIBS+=usr/lib/libvgl.so.2 -# 20030218: OpenSSL 0.9.7 import -OLD_FILES+=usr/include/des.h -OLD_FILES+=usr/lib/libdes.a -OLD_FILES+=usr/lib/libdes.so -OLD_LIBS+=usr/lib/libdes.so.3 -OLD_FILES+=usr/lib/libdes_p.a -# 200302XX -OLD_LIBS+=usr/lib/libacl.so.3 -OLD_LIBS+=usr/lib/libasn1.so.5 -OLD_LIBS+=usr/lib/libcrypto.so.2 -OLD_LIBS+=usr/lib/libgssapi.so.5 -OLD_LIBS+=usr/lib/libhdb.so.5 -OLD_LIBS+=usr/lib/libkadm.so.3 -OLD_LIBS+=usr/lib/libkadm5clnt.so.5 -OLD_LIBS+=usr/lib/libkadm5srv.so.5 -OLD_LIBS+=usr/lib/libkafs.so.3 -OLD_LIBS+=usr/lib/libkafs5.so.5 -OLD_LIBS+=usr/lib/libkdb.so.3 -OLD_LIBS+=usr/lib/libkrb.so.3 -OLD_LIBS+=usr/lib/libroken.so.5 -OLD_LIBS+=usr/lib/libssl.so.2 -OLD_LIBS+=usr/lib/pam_kerberosIV.so -# 200208XX -OLD_LIBS+=usr/lib/libgssapi.so.4 -# 200203XX -OLD_LIBS+=usr/lib/libss.so.3 -OLD_LIBS+=usr/lib/libusb.so.0 -# 200112XX -OLD_LIBS+=usr/lib/libfetch.so.2 -# 200110XX -OLD_LIBS+=usr/lib/libgssapi.so.3 -# 200104XX -OLD_LIBS+=usr/lib/libdescrypt.so.2 -OLD_LIBS+=usr/lib/libscrypt.so.2 -# 200102XX -OLD_LIBS+=usr/lib/libcrypto.so.1 -OLD_LIBS+=usr/lib/libssl.so.1 -# 200009XX -OLD_LIBS+=usr/lib/libRSAglue.so.1 -OLD_LIBS+=usr/lib/librsaINTL.so.1 -OLD_LIBS+=usr/lib/librsaUSA.so.1 -# 200006XX -OLD_LIBS+=usr/lib/libalias.so.3 -OLD_LIBS+=usr/lib/libfetch.so.1 -OLD_LIBS+=usr/lib/libipsec.so.0 -# 200005XX -OLD_LIBS+=usr/lib/libxpg4.so.2 -# 200002XX -OLD_LIBS+=usr/lib/libc.so.3 -OLD_LIBS+=usr/lib/libcurses.so.2 -OLD_LIBS+=usr/lib/libdialog.so.3 -OLD_LIBS+=usr/lib/libedit.so.2 -OLD_LIBS+=usr/lib/libf2c.so.2 -OLD_LIBS+=usr/lib/libftpio.so.4 -OLD_LIBS+=usr/lib/libg++.so.4 -OLD_LIBS+=usr/lib/libhistory.so.3 -OLD_LIBS+=usr/lib/libmytinfo.so.2 -OLD_LIBS+=usr/lib/libncurses.so.3 -OLD_LIBS+=usr/lib/libreadline.so.3 -OLD_LIBS+=usr/lib/libss.so.2 -OLD_LIBS+=usr/lib/libtermcap.so.2 -OLD_LIBS+=usr/lib/libutil.so.2 -OLD_LIBS+=usr/lib/libvgl.so.1 -OLD_LIBS+=usr/lib/libwrap.so.2 -# ??? -OLD_LIBS+=usr/lib/libarchive.so.2 -OLD_LIBS+=usr/lib/libbsnmp.so.1 -OLD_LIBS+=usr/lib/libc_r.so.6 -OLD_LIBS+=usr/lib/libcipher.so.2 -OLD_LIBS+=usr/lib/libgssapi.so.6 -OLD_LIBS+=usr/lib/libkse.so.1 -OLD_LIBS+=usr/lib/liblwres.so.3 -OLD_LIBS+=usr/lib/pam_ftp.so.2 - -# 20040925: bind9 import -OLD_DIRS+=usr/share/doc/bind/html -OLD_DIRS+=usr/share/doc/bind/misc -OLD_DIRS+=usr/share/doc/bind/ -# ??? -OLD_DIRS+=usr/include/g++/std -OLD_DIRS+=usr/include/msdosfs -OLD_DIRS+=usr/include/ntfs -OLD_DIRS+=usr/include/nwfs -OLD_DIRS+=usr/include/ufs/mfs -# 20011001: UUCP migration to ports -OLD_DIRS+=usr/libexec/uucp - .include "tools/build/mk/OptionalObsoleteFiles.inc" @@ -27,6 +27,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250806: + if_epair(4) now uses ether_gen_addr(9) to generate a stable MAC + address. + To keep using the random address, set the loader tunable + net.link.epair.ether_gen_addr=0. + +20250804: + bsdconfig (including sysrc(8)) has moved to the new bsdconfig + package. If you use pkgbase and wish to use bsdconfig, you should + install FreeBSD-bsdconfig. + 20250730: The usbhid(4) USB HID driver is now enabled by default, and will be used in preference to other USB HID drivers like ukbd(4), ums(4), and diff --git a/cddl/usr.sbin/zfsd/case_file.cc b/cddl/usr.sbin/zfsd/case_file.cc index 7adfb08b75c6..852767aeb227 100644 --- a/cddl/usr.sbin/zfsd/case_file.cc +++ b/cddl/usr.sbin/zfsd/case_file.cc @@ -299,6 +299,15 @@ CaseFile::ReEvaluate(const string &devPath, const string &physPath, Vdev *vdev) PoolGUIDString().c_str(), VdevGUIDString().c_str()); return (/*consumed*/false); } + if (VdevState() == VDEV_STATE_OFFLINE) { + /* + * OFFLINE is an administrative decision. No need for zfsd to + * do anything. + */ + syslog(LOG_INFO, "CaseFile::ReEvaluate(%s,%s): Pool/Vdev ignored", + PoolGUIDString().c_str(), VdevGUIDString().c_str()); + return (/*consumed*/false); + } if (vdev != NULL && ( vdev->PoolGUID() == m_poolGUID @@ -401,7 +410,8 @@ CaseFile::ReEvaluate(const ZfsEvent &event) return (/*consumed*/true); } else if (event.Value("type") == "sysevent.fs.zfs.config_sync") { RefreshVdevState(); - if (VdevState() < VDEV_STATE_HEALTHY) + if (VdevState() < VDEV_STATE_HEALTHY && + VdevState() != VDEV_STATE_OFFLINE) consumed = ActivateSpare(); } @@ -694,6 +704,11 @@ CaseFile::CloseIfSolved() switch (VdevState()) { case VDEV_STATE_HEALTHY: /* No need to keep cases for healthy vdevs */ + case VDEV_STATE_OFFLINE: + /* + * Offline is a deliberate administrative action. zfsd + * doesn't need to do anything for this state. + */ Close(); return (true); case VDEV_STATE_REMOVED: @@ -710,7 +725,6 @@ CaseFile::CloseIfSolved() */ case VDEV_STATE_UNKNOWN: case VDEV_STATE_CLOSED: - case VDEV_STATE_OFFLINE: /* * Keep open? This may not be the correct behavior, * but it's what we've always done diff --git a/cddl/usr.sbin/zfsd/zfsd_event.cc b/cddl/usr.sbin/zfsd/zfsd_event.cc index 7a19b95abeed..afdabd99a8c3 100644 --- a/cddl/usr.sbin/zfsd/zfsd_event.cc +++ b/cddl/usr.sbin/zfsd/zfsd_event.cc @@ -355,6 +355,13 @@ ZfsEvent::Process() const Vdev vdev(zpl.front(), vdevConfig); caseFile = &CaseFile::Create(vdev); + if (caseFile->VdevState() == VDEV_STATE_OFFLINE) { + /* + * An administrator did this deliberately. It's not considered + * an error that zfsd must fix. + */ + return (false); + } if (caseFile->ReEvaluate(*this) == false) { stringstream msg; int priority = LOG_INFO; diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 5a1c30a95750..e8f1567733e4 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,12 @@ +2025-08-04 Simon J Gerraty <sjg@beast.crufty.net> + + * VERSION (_MAKE_VERSION): 20250804 + Merge with NetBSD make, pick up + o meta.c: allow printing only partial string to meta file + in jobs mode, otherwise we end up with duplicated output when + buffer does not end in newline. + Add a suitable unit test. + 2025-07-07 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20250707 diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES index 1cec16b73ef4..28465b6a8c39 100644 --- a/contrib/bmake/FILES +++ b/contrib/bmake/FILES @@ -431,6 +431,8 @@ unit-tests/make-exported.exp unit-tests/make-exported.mk unit-tests/meta-cmd-cmp.exp unit-tests/meta-cmd-cmp.mk +unit-tests/meta-output.exp +unit-tests/meta-output.mk unit-tests/meta-ignore.inc unit-tests/moderrs.exp unit-tests/moderrs.mk diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index eef1ef4b8ba9..e301cfafab72 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20250707 +_MAKE_VERSION=20250804 diff --git a/contrib/bmake/job.c b/contrib/bmake/job.c index 0c54e710afeb..e62d1ee84df5 100644 --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.517 2025/07/06 07:11:31 rillig Exp $ */ +/* $NetBSD: job.c,v 1.519 2025/08/04 15:40:39 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -137,7 +137,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.517 2025/07/06 07:11:31 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.519 2025/08/04 15:40:39 sjg Exp $"); #ifdef USE_SELECT @@ -1884,7 +1884,7 @@ again: SwitchOutputTo(job->node); #ifdef USE_META if (useMeta) - meta_job_output(job, p); + meta_job_output(job, p, (i < max) ? i : max); #endif (void)fwrite(p, 1, (size_t)(job->outBuf + i - p), stdout); (void)fflush(stdout); diff --git a/contrib/bmake/meta.c b/contrib/bmake/meta.c index 5d8d17f19700..f87f51c3b0a3 100644 --- a/contrib/bmake/meta.c +++ b/contrib/bmake/meta.c @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.215 2025/06/13 06:13:19 rillig Exp $ */ +/* $NetBSD: meta.c,v 1.219 2025/08/04 18:57:20 rillig Exp $ */ /* * Implement 'meta' mode. @@ -767,7 +767,7 @@ meta_job_error(Job *job, GNode *gn, bool ignerr, int status) } void -meta_job_output(Job *job, const char *cp) +meta_job_output(Job *job, const char *cp, size_t len) { BuildMon *pbm; @@ -790,7 +790,7 @@ meta_job_output(Job *job, const char *cp) cp++; } } - fprintf(pbm->mfp, "%s", cp); + fprintf(pbm->mfp, "%.*s", (int)len, cp); } } @@ -1703,7 +1703,7 @@ meta_compat_parent(pid_t child) fwrite(buf, 1, (size_t)nread, stdout); fflush(stdout); buf[nread] = '\0'; - meta_job_output(NULL, buf); + meta_job_output(NULL, buf, (size_t)nread); } while (false); if (metafd != -1 && FD_ISSET(metafd, &readfds) != 0) { if (meta_job_event(NULL) <= 0) diff --git a/contrib/bmake/meta.h b/contrib/bmake/meta.h index a7478cbc3e5d..4796cdeb3c01 100644 --- a/contrib/bmake/meta.h +++ b/contrib/bmake/meta.h @@ -1,4 +1,4 @@ -/* $NetBSD: meta.h,v 1.13 2025/06/13 06:13:19 rillig Exp $ */ +/* $NetBSD: meta.h,v 1.15 2025/08/04 03:47:26 sjg Exp $ */ /* * Things needed for 'meta' mode. @@ -49,7 +49,7 @@ void meta_job_parent(struct Job *, pid_t); int meta_job_fd(struct Job *) MAKE_ATTR_USE; int meta_job_event(struct Job *) MAKE_ATTR_USE; void meta_job_error(struct Job *, GNode *, bool, int); -void meta_job_output(struct Job *, const char *); +void meta_job_output(struct Job *, const char *, size_t); int meta_cmd_finish(void *); int meta_job_finish(struct Job *); bool meta_oodate(GNode *, bool) MAKE_ATTR_USE; diff --git a/contrib/bmake/mk/ChangeLog b/contrib/bmake/mk/ChangeLog index db524d2343b6..fda6d8b02158 100644 --- a/contrib/bmake/mk/ChangeLog +++ b/contrib/bmake/mk/ChangeLog @@ -1,3 +1,20 @@ +2025-07-24 Simon J Gerraty <sjg@beast.crufty.net> + + * install-mk (MK_VERSION): 20250724 + + * meta2deps: Allow X record to have 3 or 4 args. + V4 filemon on Linux produces 3 + V5 filemon on FreeBSD produces 4 + +2025-07-22 Simon J Gerraty <sjg@beast.crufty.net> + + * install-mk (MK_VERSION): 20250721 + + * meta2deps.{py,sh}: detect corrupted filemon output (an issue on + Linux) by checking each record type has the correct number of + words. Throw an error if necessary so that gendirdeps.mk will not + update Makefile.depend + 2025-07-04 Simon J Gerraty <sjg@beast.crufty.net> * prog.mk: .MADE is a special source not a target! diff --git a/contrib/bmake/mk/install-mk b/contrib/bmake/mk/install-mk index 8d354de17cb9..3ed5fd63ee5c 100644..100755 --- a/contrib/bmake/mk/install-mk +++ b/contrib/bmake/mk/install-mk @@ -59,7 +59,7 @@ # Simon J. Gerraty <sjg@crufty.net> # RCSid: -# $Id: install-mk,v 1.266 2025/05/29 01:48:06 sjg Exp $ +# $Id: install-mk,v 1.268 2025/07/24 15:55:48 sjg Exp $ # # @(#) Copyright (c) 1994-2025 Simon J. Gerraty # @@ -74,7 +74,7 @@ # sjg@crufty.net # -MK_VERSION=20250528 +MK_VERSION=20250724 OWNER= GROUP= MODE=444 diff --git a/contrib/bmake/mk/meta2deps.py b/contrib/bmake/mk/meta2deps.py index 70b121003988..77ed86397a0f 100755 --- a/contrib/bmake/mk/meta2deps.py +++ b/contrib/bmake/mk/meta2deps.py @@ -39,7 +39,7 @@ We only pay attention to a subset of the information in the SPDX-License-Identifier: BSD-2-Clause RCSid: - $Id: meta2deps.py,v 1.51 2025/05/16 20:03:43 sjg Exp $ + $Id: meta2deps.py,v 1.54 2025/07/24 16:05:48 sjg Exp $ Copyright (c) 2011-2025, Simon J. Gerraty Copyright (c) 2011-2017, Juniper Networks, Inc. @@ -441,7 +441,7 @@ class MetaFile: # Bye bye We go to some effort to avoid processing a dependency more than once. - Of the above record types only C,E,F,L,R,V and W are of interest. + Of the above record types only C,E,F,L,M,R,V,W and X are of interest. """ version = 0 # unknown @@ -465,8 +465,8 @@ class MetaFile: if self.sb and self.name.startswith(self.sb): error_name = self.name.replace(self.sb+'/','') else: - error_name = self.name - interesting = '#CEFLRVX' + error_name = self.name + interesting = '#CEFLMRVX' for line in f: self.line += 1 # ignore anything we don't care about @@ -475,6 +475,7 @@ class MetaFile: if self.debug > 2: print("input:", line, end=' ', file=self.debug_out) w = line.split() + wlen = len(w) if skip: if w[0] == 'V': @@ -498,6 +499,23 @@ class MetaFile: if line.find('Bye') > 0: eof_token = True continue + else: + # before we go further check we have a sane number of args + # the Linux filemon module is rather unreliable. + if w[0] in 'LM': + elen = 4 + elif w[0] == 'X': + # at least V4 on Linux does 3 args + if wlen == 3: + elen = 3 + else: + elen = 4 + else: + elen = 3 + if self.debug > 2: + print('op={} elen={} wlen={} line="{}"'.format(w[0], elen, wlen, line.strip()), file=self.debug_out) + if wlen != elen: + raise AssertionError('corrupted filemon data: wrong number of words: expected {} got {} in: {}'.format(elen, wlen, line)) pid = int(w[1]) if pid != last_pid: @@ -540,7 +558,7 @@ class MetaFile: print("seen:", w[2], file=self.debug_out) continue # file operations - if w[0] in 'ML': + if w[0] in 'LM': # these are special, tread src as read and # target as write self.parse_path(w[3].strip("'"), cwd, 'W', w) diff --git a/contrib/bmake/mk/meta2deps.sh b/contrib/bmake/mk/meta2deps.sh index e46e5a2e55c1..21c0d0134be5 100755 --- a/contrib/bmake/mk/meta2deps.sh +++ b/contrib/bmake/mk/meta2deps.sh @@ -75,7 +75,7 @@ # RCSid: -# $Id: meta2deps.sh,v 1.22 2025/05/16 20:03:43 sjg Exp $ +# $Id: meta2deps.sh,v 1.24 2025/07/24 15:55:48 sjg Exp $ # SPDX-License-Identifier: BSD-2-Clause # @@ -249,11 +249,21 @@ meta2deps() { ;; *) cat /dev/null "$@";; esac 2> /dev/null | - sed -e 's,^CWD,C C,;/^[#CREFLMVX] /!d' -e "s,',,g" | + sed -e 's,^CWD,C C,;/^[#CREFLMVWX] /!d' -e "s,',,g" | $_excludes | ( version=no epids= xpids= eof_token=no while read op pid path path2 do : op=$op pid=$pid path=$path path2=$path2 + # first a sanity check - filemon on Linux is not very reliable + # path2 should only be non-empty for op L or M + # and it should not contain spaces. + case "$op,$path2" in + \#*) ;; # ok + [LM],) error "missing path2 in: '$op $pid $path'";; + [LMX],*" "*) error "wrong number of words in: '$op $pid $path $path2'";; + *,|[LMX],*) ;; # ok + *) error "wrong number of words in: '$op $pid $path $path2'";; + esac # we track cwd and ldir (of interest) per pid # CWD is bmake's cwd case "$lpid,$pid" in diff --git a/contrib/bmake/unit-tests/Makefile b/contrib/bmake/unit-tests/Makefile index 4e639056815a..f6c298679a62 100644 --- a/contrib/bmake/unit-tests/Makefile +++ b/contrib/bmake/unit-tests/Makefile @@ -1,6 +1,6 @@ -# $Id: Makefile,v 1.240 2025/06/30 18:40:54 sjg Exp $ +# $Id: Makefile,v 1.245 2025/08/05 16:18:07 sjg Exp $ # -# $NetBSD: Makefile,v 1.369 2025/06/29 09:40:13 rillig Exp $ +# $NetBSD: Makefile,v 1.372 2025/08/04 22:44:49 sjg Exp $ # # Unit tests for make(1) # @@ -234,6 +234,7 @@ TESTS+= jobs-error-nested-make TESTS+= lint TESTS+= make-exported TESTS+= meta-cmd-cmp +TESTS+= meta-output TESTS+= moderrs TESTS+= modmisc .if ${.MAKE.UID} > 0 @@ -592,6 +593,7 @@ SED_CMDS.directive-include-guard= \ -e '/^ParseDependency/d' \ -e '/^ParseEOF:/d' SED_CMDS.export= -e '/^[^=_A-Za-z0-9]*=/d' +SED_CMDS.export+= -e '/^DIFF/d' .if ${.MAKE.OS:NCygwin} == "" SED_CMDS.export+= -e '/^WINDIR=/d' -e '/^SYSTEMROOT=/d' .endif @@ -802,6 +804,7 @@ EGREP= grep -E EGREP?= egrep MAKE_TEST_ENV= EGREP="${EGREP}" +MAKE_TEST_ENV+= DIFF="${TOOL_DIFF}" DIFF_FLAGS="${DIFF_FLAGS}" MAKE_TEST_ENV+= MALLOC_OPTIONS="JA" # for jemalloc 100 MAKE_TEST_ENV+= MALLOC_CONF="junk:true" # for jemalloc 510 MAKE_TEST_ENV+= TMPDIR=${TMPDIR} diff --git a/contrib/bmake/unit-tests/meta-output.exp b/contrib/bmake/unit-tests/meta-output.exp new file mode 100644 index 000000000000..37ef54b4e49e --- /dev/null +++ b/contrib/bmake/unit-tests/meta-output.exp @@ -0,0 +1,11 @@ +Test -B output +test1: Done +test2: Done +test3: Done + +Test -j1 output +test1: Done +test2: Done +test3: Done + +exit status 0 diff --git a/contrib/bmake/unit-tests/meta-output.mk b/contrib/bmake/unit-tests/meta-output.mk new file mode 100644 index 000000000000..104091df5d00 --- /dev/null +++ b/contrib/bmake/unit-tests/meta-output.mk @@ -0,0 +1,30 @@ +# + +.MAIN: all + +.if make(output) +.MAKE.MODE= meta curDirOk=true nofilemon +.else +.MAKE.MODE= compat +.endif + +all: output.-B output.-j1 + +_mf := ${.PARSEDIR}/${.PARSEFILE} + +# This output should be accurately reflected in the .meta file. +# We append an extra newline to ${.TARGET} (after it has been +# written to stdout) to match what meta_cmd_finish() will do. +output: .NOPATH + @{ echo Test ${tag} output; \ + for i in 1 2 3; do \ + printf "test$$i: "; sleep 0; echo " Done"; \ + done; echo; } | tee ${.TARGET}; echo >> ${.TARGET} + +# The diff at the end should produce nothing. +output.-B output.-j1: + @{ rm -f ${TMPDIR}/output; mkdir -p ${TMPDIR}/obj; \ + MAKEFLAGS= ${.MAKE} -r -C ${TMPDIR} ${.TARGET:E} tag=${.TARGET:E} -f ${_mf} output; \ + sed '1,/command output/d' ${TMPDIR}/obj/output.meta > ${TMPDIR}/obj/output-meta; \ + ${DIFF:Udiff} ${TMPDIR}/obj/output ${TMPDIR}/obj/output-meta; } + diff --git a/contrib/libucl/include/ucl++.h b/contrib/libucl/include/ucl++.h index fb63430d400d..1cd17eac0c75 100644 --- a/contrib/libucl/include/ucl++.h +++ b/contrib/libucl/include/ucl++.h @@ -396,6 +396,11 @@ public: return default_val; } + std::string forced_string_value () const + { + return ucl_object_tostring_forced(obj.get()); + } + size_t size () const { if (type () == UCL_ARRAY) { diff --git a/contrib/mandoc/lib.in b/contrib/mandoc/lib.in index 6b17aab5b27b..134614aa6478 100644 --- a/contrib/mandoc/lib.in +++ b/contrib/mandoc/lib.in @@ -131,6 +131,7 @@ LINE("libugidfw", "File System Firewall Interface Library (libugidfw, \\-lugidfw LINE("libulog", "User Login Record Library (libulog, \\-lulog)") LINE("libusbhid", "USB Human Interface Devices Library (libusbhid, \\-lusbhid)") LINE("libutil", "System Utilities Library (libutil, \\-lutil)") +LINE("libutil++", "C++ Utilities Library (libutil++, \\-lutil++)") LINE("libvgl", "Video Graphics Library (libvgl, \\-lvgl)") LINE("libx86_64", "x86_64 Architecture Library (libx86_64, \\-lx86_64)") LINE("libxo", "Text, XML, JSON, and HTML Output Emission Library (libxo, \\-lxo)") diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c index 73cc9a7dc657..14d3d41b6e21 100644 --- a/contrib/pf/authpf/authpf.c +++ b/contrib/pf/authpf/authpf.c @@ -863,9 +863,9 @@ change_table(int add, const char *ip_src) } if (add) - ret = pfctl_table_add_addrs(pfctl_fd(pfh), &tbl, &addr, 1, NULL, 0); + ret = pfctl_table_add_addrs_h(pfh, &tbl, &addr, 1, NULL, 0); else - ret = pfctl_table_del_addrs(pfctl_fd(pfh), &tbl, &addr, 1, NULL, 0); + ret = pfctl_table_del_addrs_h(pfh, &tbl, &addr, 1, NULL, 0); if (ret != 0 && ret != ESRCH) { diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index ffdd82ae9911..68977a6b8282 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -267,8 +267,6 @@ .. dtrace .. - et - .. examples BSD_daemon .. diff --git a/krb5/include/Makefile b/krb5/include/Makefile index c7b3f0f10a99..6cd606faf605 100644 --- a/krb5/include/Makefile +++ b/krb5/include/Makefile @@ -17,7 +17,7 @@ SUBDIR= krb5_private krb5 gssrpc gssapi SUBDIR_PARALLEL= -INCSGROUPS= INCS GSSAPI_KRB5 +INCSGROUPS= INCS INCSDIR= ${INCLUDEDIR} @@ -27,9 +27,6 @@ INCS= kdb.h \ krad.h \ krb5.h -GSSAPI_KRB5DIR= ${INCLUDEDIR}/gssapi_krb5/gssapi -GSSAPI_KRB5= gssapi.h - CLEANFILES= osconf.new # XXX The output of this needs to be verified against the osconf.h I created @@ -40,19 +37,8 @@ osconf.h: rebuild-error-tables: ${K5_ET_HEADERS} -force: - -stage_includes: copies -SDESTDIR?= ${SYSROOT:U${DESTDIR}} - -.PHONY: force rebuild-error-tables osconf.h +.PHONY: rebuild-error-tables osconf.h .PATH: ${KRB5_DIR}/include/krb5 -copies: .PHONY .META - cd ${KRB5_DIR}/include; \ - ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m444 ${INCS} ${SDESTDIR}${INCLUDEDIR} - .include <bsd.prog.mk> - -installincludes: copies diff --git a/krb5/lib/gssapi/mechglue/Makefile.inc b/krb5/lib/gssapi/mechglue/Makefile.inc index bb0d436e08d1..c54cdf37b55b 100644 --- a/krb5/lib/gssapi/mechglue/Makefile.inc +++ b/krb5/lib/gssapi/mechglue/Makefile.inc @@ -72,3 +72,5 @@ SRCS+= g_accept_sec_context.c \ g_wrap_aead.c \ g_wrap_iov.c \ gssd_pname_to_uid.c + +GSSAPI_INCS+= mechglue.h diff --git a/krb5/lib/kadm5srv/Makefile b/krb5/lib/kadm5srv/Makefile index e0ec557a3f5b..aa4fad49ea02 100644 --- a/krb5/lib/kadm5srv/Makefile +++ b/krb5/lib/kadm5srv/Makefile @@ -17,8 +17,6 @@ LDFLAGS=-Wl,--no-undefined LIBADD= krb5profile gssrpc gssapi_krb5 kdb5 krb5 k5crypto krb5support com_err VERSION_MAP= ${.CURDIR}/version.map -INCSDIR= ${INCLUDEDIR}/kadm5 - SRCS= alt_prof.c \ chpass_util.c \ logger.c \ @@ -30,10 +28,6 @@ SRCS= alt_prof.c \ .include "${KRB5_SRCTOP}/lib/kadm5srv/srv/Makefile.inc" -INCS= admin.h \ - chpass_util_strings.h \ - kadm_err.h - GEN= kadm_err.c kadm_err.h chpass_util_strings.c chpass_util_strings.h CLEANFILES= ${GEN} ${GENI} @@ -46,11 +40,7 @@ CFLAGS+=-I${KRB5_DIR}/lib \ -I${KRB5_OBJTOP}/lib/gssapi \ -I${KRB5_DIR}/lib/gssapi/krb5 \ -I${KRB5_DIR}/lib/gssapi/generic - -HDRDIR= ${KRB5_OBJHDR}/kadm5 -HDRS= ${HDRDIR}/admin.h \ - ${HDRDIR}/chpass_util_strings.h \ - ${HDRDIR}/kadm_err.h +CWARNFLAGS.gcc+=-Wno-alloc-size-larger-than GEN_KADM_ERR= kadm_err.et GEN_KADM_ERR_C= ${GEN_KADM_ERR:S/.et$/.c/} diff --git a/krb5/util/compile_et/Makefile b/krb5/util/compile_et/Makefile index 03446f2d7d1c..3d48b39cab27 100644 --- a/krb5/util/compile_et/Makefile +++ b/krb5/util/compile_et/Makefile @@ -19,10 +19,6 @@ BINDIR?= /usr/bin MAN= compile_et.1 CLEANFILES= compile_et -.if !defined(BOOTSTRAPPING) -SCRIPTSDIR= ${SHAREDIR}/et -.endif - compile_et: compile_et.sh sh ${SRC_ETDIR}/config_script ${SRC_ETDIR}/compile_et.sh \ "${KRB5_ETDIR}" /usr/bin/awk /usr/bin/sed > ${.TARGET} diff --git a/lib/Makefile b/lib/Makefile index e0aafcad60d4..e5139b312a75 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -106,6 +106,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libugidfw \ libulog \ libutil \ + libutil++ \ ${_libvgl} \ libwrap \ libxo \ diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c index 926c50d64852..12020a79f6b4 100644 --- a/lib/libc/gen/exec.c +++ b/lib/libc/gen/exec.c @@ -32,8 +32,10 @@ #include "namespace.h" #include <sys/param.h> #include <sys/stat.h> +#include <assert.h> #include <errno.h> #include <unistd.h> +#include <stdbool.h> #include <stdlib.h> #include <string.h> #include <stdio.h> @@ -139,26 +141,129 @@ execvp(const char *name, char * const *argv) return (__libc_execvpe(name, argv, environ)); } +/* + * Returns 0 if we don't consider this a terminal condition, -1 if we do. + */ +static int +execvPe_prog(const char *path, char * const *argv, char * const *envp) +{ + struct stat sb; + const char **memp; + size_t cnt; + int save_errno; + + (void)_execve(path, argv, envp); + /* Grouped roughly by never terminal vs. usually terminal conditions */ + switch (errno) { + case ELOOP: + case ENAMETOOLONG: + case ENOENT: + case ENOTDIR: + /* Non-terminal: property of the path we're trying */ + break; + case ENOEXEC: + /* + * Failures here are considered terminal because we must handle + * this via the ENOEXEC fallback path; doing any further + * searching would be categorically incorrect. + */ + + for (cnt = 0; argv[cnt] != NULL; ++cnt) + ; + + /* + * cnt may be 0 above; always allocate at least + * 3 entries so that we can at least fit "sh", path, and + * the NULL terminator. We can rely on cnt to take into + * account the NULL terminator in all other scenarios, + * as we drop argv[0]. + */ + memp = alloca(MAX(3, cnt + 2) * sizeof(char *)); + assert(memp != NULL); + if (cnt > 0) { + memp[0] = argv[0]; + memp[1] = path; + memcpy(&memp[2], &argv[1], cnt * sizeof(char *)); + } else { + memp[0] = "sh"; + memp[1] = path; + memp[2] = NULL; + } + + (void)_execve(_PATH_BSHELL, __DECONST(char **, memp), envp); + return (-1); + case ENOMEM: + case E2BIG: + /* Terminal: persistent condition */ + return (-1); + case ETXTBSY: + /* + * Terminal: we used to retry here, but sh(1) doesn't. + */ + return (-1); + default: + /* + * EACCES may be for an inaccessible directory or + * a non-executable file. Call stat() to decide + * which. This also handles ambiguities for EFAULT + * and EIO, and undocumented errors like ESTALE. + * We hope that the race for a stat() is unimportant. + */ + save_errno = errno; + if (stat(path, &sb) == -1) { + /* + * We force errno to ENOENT here to disambiguate the + * EACCESS case; the results of execve(2) are somewhat + * inconclusive because either the file did not exist or + * we just don't have search permissions, but the caller + * only really wants to see EACCES if the file did exist + * but was not accessible. + */ + if (save_errno == EACCES) + errno = ENOENT; + break; + } + + errno = save_errno; + + /* + * Non-terminal: the file did exist and we just didn't have + * access to it, so we surface the EACCES and let the search + * continue for a candidate that we do have access to. + */ + if (errno == EACCES) + break; + + /* + * All other errors here are terminal, as prescribed by exec(3). + */ + return (-1); + } + + return (0); +} + static int execvPe(const char *name, const char *path, char * const *argv, char * const *envp) { - const char **memp; - size_t cnt, lp, ln; - int eacces, save_errno; char buf[MAXPATHLEN]; - const char *bp, *np, *op, *p; - struct stat sb; + size_t ln, lp; + const char *np, *op, *p; + bool eacces; - eacces = 0; + eacces = false; /* If it's an absolute or relative path name, it's easy. */ - if (strchr(name, '/')) { - bp = name; - op = NULL; - goto retry; + if (strchr(name, '/') != NULL) { + /* + * We ignore non-terminal conditions because we don't have any + * further paths to try -- we can just bubble up the errno from + * execve(2) here. + */ + (void)execvPe_prog(name, argv, envp); + return (-1); } - bp = buf; /* If it's an empty path name, fail in the usual POSIX way. */ if (*name == '\0') { @@ -192,9 +297,13 @@ execvPe(const char *name, const char *path, char * const *argv, op = np + 1; /* - * If the path is too long complain. This is a possible - * security issue; given a way to make the path too long - * the user may execute the wrong program. + * If the path is too long, then complain. This is a possible + * security issue: given a way to make the path too long, the + * user may execute the wrong program. + * + * Remember to exercise caution here with assembling our final + * buf and any output, as we may be running in a vfork() context + * via posix_spawnp(). */ if (lp + ln + 2 > sizeof(buf)) { (void)_write(STDERR_FILENO, execvPe_err_preamble, @@ -202,82 +311,40 @@ execvPe(const char *name, const char *path, char * const *argv, (void)_write(STDERR_FILENO, p, lp); (void)_write(STDERR_FILENO, execvPe_err_trailer, sizeof(execvPe_err_trailer) - 1); + continue; } - bcopy(p, buf, lp); + + memcpy(&buf[0], p, lp); buf[lp] = '/'; - bcopy(name, buf + lp + 1, ln); + memcpy(&buf[lp + 1], name, ln); buf[lp + ln + 1] = '\0'; -retry: (void)_execve(bp, argv, envp); - switch (errno) { - case E2BIG: - goto done; - case ELOOP: - case ENAMETOOLONG: - case ENOENT: - break; - case ENOEXEC: - for (cnt = 0; argv[cnt]; ++cnt) - ; - - /* - * cnt may be 0 above; always allocate at least - * 3 entries so that we can at least fit "sh", bp, and - * the NULL terminator. We can rely on cnt to take into - * account the NULL terminator in all other scenarios, - * as we drop argv[0]. - */ - memp = alloca(MAX(3, cnt + 2) * sizeof(char *)); - if (memp == NULL) { - /* errno = ENOMEM; XXX override ENOEXEC? */ - goto done; - } - if (cnt > 0) { - memp[0] = argv[0]; - memp[1] = bp; - bcopy(argv + 1, memp + 2, cnt * sizeof(char *)); - } else { - memp[0] = "sh"; - memp[1] = bp; - memp[2] = NULL; - } - (void)_execve(_PATH_BSHELL, - __DECONST(char **, memp), envp); - goto done; - case ENOMEM: - goto done; - case ENOTDIR: - break; - case ETXTBSY: - /* - * We used to retry here, but sh(1) doesn't. - */ - goto done; - default: - /* - * EACCES may be for an inaccessible directory or - * a non-executable file. Call stat() to decide - * which. This also handles ambiguities for EFAULT - * and EIO, and undocumented errors like ESTALE. - * We hope that the race for a stat() is unimportant. - */ - save_errno = errno; - if (stat(bp, &sb) != 0) - break; - if (save_errno == EACCES) { - eacces = 1; - continue; - } - errno = save_errno; - goto done; - } + /* + * For terminal conditions we can just return immediately. If + * it was non-terminal, we just need to note if we had an + * EACCES -- execvPe_prog would do a stat(2) and leave us with + * an errno of EACCES only if the file did exist; otherwise it + * would coerce it to an ENOENT because we may not know if a + * file actually existed there or not. + */ + if (execvPe_prog(buf, argv, envp) == -1) + return (-1); + if (errno == EACCES) + eacces = true; } + + /* + * We don't often preserve errors encountering during the PATH search, + * so we override it here. ENOENT would be misleading if we found a + * candidate but couldn't access it, but most of the other conditions + * are either terminal or indicate that nothing was there. + */ if (eacces) errno = EACCES; else errno = ENOENT; -done: + return (-1); } diff --git a/lib/libc/sys/accept.c b/lib/libc/sys/accept.c index 95c8b4a58c74..c6fb040ab6d6 100644 --- a/lib/libc/sys/accept.c +++ b/lib/libc/sys/accept.c @@ -34,8 +34,6 @@ #include <sys/socket.h> #include "libc_private.h" -__weak_reference(__sys_accept, __accept); - #pragma weak accept int accept(int s, struct sockaddr *addr, socklen_t *addrlen) diff --git a/lib/libc/sys/accept4.c b/lib/libc/sys/accept4.c index 1a1f75c9f528..146dde9ae6fa 100644 --- a/lib/libc/sys/accept4.c +++ b/lib/libc/sys/accept4.c @@ -34,8 +34,6 @@ #include <sys/socket.h> #include "libc_private.h" -__weak_reference(__sys_accept4, __accept4); - #pragma weak accept4 int accept4(int s, struct sockaddr *addr, socklen_t *addrlen, int flags) diff --git a/lib/libc/sys/aio_suspend.c b/lib/libc/sys/aio_suspend.c index 592cb5b0e1d7..5a7774705ac2 100644 --- a/lib/libc/sys/aio_suspend.c +++ b/lib/libc/sys/aio_suspend.c @@ -33,8 +33,6 @@ #include <sys/aio.h> #include "libc_private.h" -__weak_reference(__sys_aio_suspend, __aio_suspend); - #pragma weak aio_suspend int aio_suspend(const struct aiocb * const iocbs[], int niocb, diff --git a/lib/libc/sys/clock_nanosleep.c b/lib/libc/sys/clock_nanosleep.c index a50af30e1fb3..db14bd46f85e 100644 --- a/lib/libc/sys/clock_nanosleep.c +++ b/lib/libc/sys/clock_nanosleep.c @@ -34,8 +34,6 @@ #include <time.h> #include "libc_private.h" -__weak_reference(__sys_clock_nanosleep, __clock_nanosleep); - #pragma weak clock_nanosleep int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, diff --git a/lib/libc/sys/close.c b/lib/libc/sys/close.c index 08a5419361a9..8aa2b9b6ad13 100644 --- a/lib/libc/sys/close.c +++ b/lib/libc/sys/close.c @@ -34,8 +34,6 @@ #include <unistd.h> #include "libc_private.h" -__weak_reference(__sys_close, __close); - #pragma weak close int close(int fd) diff --git a/lib/libc/sys/connect.c b/lib/libc/sys/connect.c index e64451683abc..f27813b63df0 100644 --- a/lib/libc/sys/connect.c +++ b/lib/libc/sys/connect.c @@ -34,8 +34,6 @@ #include <sys/socket.h> #include "libc_private.h" -__weak_reference(__sys_connect, __connect); - #pragma weak connect int connect(int s, const struct sockaddr *addr, socklen_t addrlen) diff --git a/lib/libc/sys/fork.c b/lib/libc/sys/fork.c index e907c51b5cee..3af81c14ffb3 100644 --- a/lib/libc/sys/fork.c +++ b/lib/libc/sys/fork.c @@ -33,8 +33,6 @@ #include <unistd.h> #include "libc_private.h" -__weak_reference(__sys_fork, __fork); - #pragma weak fork pid_t fork(void) diff --git a/lib/libc/sys/fsync.c b/lib/libc/sys/fsync.c index e542c8cdea48..c58b29ca6a77 100644 --- a/lib/libc/sys/fsync.c +++ b/lib/libc/sys/fsync.c @@ -34,8 +34,6 @@ #include <unistd.h> #include "libc_private.h" -__weak_reference(__sys_fsync, __fsync); - int fsync(int fd) { diff --git a/lib/libc/sys/kevent.c b/lib/libc/sys/kevent.c index f16ac89a36c6..e395e16c67f5 100644 --- a/lib/libc/sys/kevent.c +++ b/lib/libc/sys/kevent.c @@ -34,8 +34,6 @@ #include <sys/time.h> #include "libc_private.h" -__weak_reference(__sys_kevent, __kevent); - #pragma weak kevent int kevent(int kq, const struct kevent *changelist, int nchanges, diff --git a/lib/libc/sys/msync.c b/lib/libc/sys/msync.c index f825db97b947..11dd988300eb 100644 --- a/lib/libc/sys/msync.c +++ b/lib/libc/sys/msync.c @@ -34,8 +34,6 @@ #include <sys/mman.h> #include "libc_private.h" -__weak_reference(__sys_msync, __msync); - #pragma weak msync int msync(void *addr, size_t len, int flags) diff --git a/lib/libc/sys/nanosleep.c b/lib/libc/sys/nanosleep.c index bd0794c3af8e..23c07e3bf5fc 100644 --- a/lib/libc/sys/nanosleep.c +++ b/lib/libc/sys/nanosleep.c @@ -33,8 +33,6 @@ #include <time.h> #include "libc_private.h" -__weak_reference(__sys_nanosleep, __nanosleep); - #pragma weak nanosleep int nanosleep(const struct timespec *rqtp, struct timespec *rmtp) diff --git a/lib/libc/sys/open.c b/lib/libc/sys/open.c index 57c07637d2aa..dd7bedebf141 100644 --- a/lib/libc/sys/open.c +++ b/lib/libc/sys/open.c @@ -34,8 +34,6 @@ #include <stdarg.h> #include "libc_private.h" -__weak_reference(__sys_open, __open); - #pragma weak open int open(const char *path, int flags, ...) diff --git a/lib/libc/sys/openat.c b/lib/libc/sys/openat.c index 1cd8e7d90745..ba937cae3a3e 100644 --- a/lib/libc/sys/openat.c +++ b/lib/libc/sys/openat.c @@ -34,7 +34,6 @@ #include <stdarg.h> #include "libc_private.h" -__weak_reference(__sys_openat, __openat); __sym_compat(openat, __impl_openat, FBSD_1.1); __weak_reference(openat, __impl_openat); __sym_default(openat, openat, FBSD_1.2); diff --git a/lib/libc/sys/poll.c b/lib/libc/sys/poll.c index 5e000f7e728f..8c6a89adb2cb 100644 --- a/lib/libc/sys/poll.c +++ b/lib/libc/sys/poll.c @@ -34,8 +34,6 @@ #include <ssp/ssp.h> #include "libc_private.h" -__weak_reference(__sys_poll, __poll); - int __weak_symbol __ssp_real(poll)(struct pollfd pfd[], nfds_t nfds, int timeout) { diff --git a/lib/libc/sys/ppoll.c b/lib/libc/sys/ppoll.c index 72c0b5d5e421..5ffc35a8cbb0 100644 --- a/lib/libc/sys/ppoll.c +++ b/lib/libc/sys/ppoll.c @@ -34,8 +34,6 @@ #include <ssp/ssp.h> #include "libc_private.h" -__weak_reference(__sys_ppoll, __ppoll); - int __weak_symbol __ssp_real(ppoll)(struct pollfd pfd[], nfds_t nfds, const struct timespec *__restrict timeout, diff --git a/lib/libc/sys/pselect.c b/lib/libc/sys/pselect.c index 38477e39af44..2c1c9896d6b9 100644 --- a/lib/libc/sys/pselect.c +++ b/lib/libc/sys/pselect.c @@ -33,8 +33,6 @@ #include <sys/select.h> #include "libc_private.h" -__weak_reference(__sys_pselect, __pselect); - #pragma weak pselect int pselect(int n, fd_set *rs, fd_set *ws, fd_set *es, const struct timespec *t, diff --git a/lib/libc/sys/read.c b/lib/libc/sys/read.c index b4610e0c38c3..75cc7e42b013 100644 --- a/lib/libc/sys/read.c +++ b/lib/libc/sys/read.c @@ -34,8 +34,6 @@ #include <unistd.h> #include "libc_private.h" -__weak_reference(__sys_read, __read); - #pragma weak read ssize_t read(int fd, void *buf, size_t nbytes) diff --git a/lib/libc/sys/readv.c b/lib/libc/sys/readv.c index 2729f6ed99da..83b4bf9ba3e6 100644 --- a/lib/libc/sys/readv.c +++ b/lib/libc/sys/readv.c @@ -36,8 +36,6 @@ #include <ssp/ssp.h> #include "libc_private.h" -__weak_reference(__sys_readv, __readv); - ssize_t __weak_symbol __ssp_real(readv)(int fd, const struct iovec *iov, int iovcnt) { diff --git a/lib/libc/sys/recvfrom.c b/lib/libc/sys/recvfrom.c index 0cdbd8a4ccaa..f7e2dd2ca6c8 100644 --- a/lib/libc/sys/recvfrom.c +++ b/lib/libc/sys/recvfrom.c @@ -35,8 +35,6 @@ #include <ssp/ssp.h> #include "libc_private.h" -__weak_reference(__sys_recvfrom, __recvfrom); - ssize_t __weak_symbol __ssp_real(recvfrom)(int s, void *buf, size_t len, int flags, struct sockaddr * __restrict from, socklen_t * __restrict fromlen) diff --git a/lib/libc/sys/recvmsg.c b/lib/libc/sys/recvmsg.c index ce0f5e0478cd..7c820c47b325 100644 --- a/lib/libc/sys/recvmsg.c +++ b/lib/libc/sys/recvmsg.c @@ -35,8 +35,6 @@ #include <ssp/ssp.h> #include "libc_private.h" -__weak_reference(__sys_recvmsg, __recvmsg); - ssize_t __weak_symbol __ssp_real(recvmsg)(int s, struct msghdr *msg, int flags) { diff --git a/lib/libc/sys/select.c b/lib/libc/sys/select.c index bbbcfc8bf1e0..909449f17da8 100644 --- a/lib/libc/sys/select.c +++ b/lib/libc/sys/select.c @@ -33,8 +33,6 @@ #include <sys/select.h> #include "libc_private.h" -__weak_reference(__sys_select, __select); - #pragma weak select int select(int n, fd_set *rs, fd_set *ws, fd_set *es, struct timeval *t) diff --git a/lib/libc/sys/sendmsg.c b/lib/libc/sys/sendmsg.c index fd4e41837c48..6c5fb4021ce3 100644 --- a/lib/libc/sys/sendmsg.c +++ b/lib/libc/sys/sendmsg.c @@ -34,8 +34,6 @@ #include <sys/socket.h> #include "libc_private.h" -__weak_reference(__sys_sendmsg, __sendmsg); - #pragma weak sendmsg ssize_t sendmsg(int s, const struct msghdr *msg, int flags) diff --git a/lib/libc/sys/sendto.c b/lib/libc/sys/sendto.c index 708fc6ec9368..b8a173f434a9 100644 --- a/lib/libc/sys/sendto.c +++ b/lib/libc/sys/sendto.c @@ -34,8 +34,6 @@ #include <sys/socket.h> #include "libc_private.h" -__weak_reference(__sys_sendto, __sendto); - #pragma weak sendto ssize_t sendto(int s, const void *msg, size_t len, int flags, diff --git a/lib/libc/sys/setcontext.c b/lib/libc/sys/setcontext.c index 96b5dc115067..a750c4dfea30 100644 --- a/lib/libc/sys/setcontext.c +++ b/lib/libc/sys/setcontext.c @@ -33,7 +33,6 @@ #include <ucontext.h> #include "libc_private.h" -__weak_reference(__sys_setcontext, __setcontext); __sym_compat(setcontext, __impl_setcontext, FBSD_1.0); __weak_reference(setcontext, __impl_setcontext); __sym_default(setcontext, setcontext, FBSD_1.2); diff --git a/lib/libc/sys/sigaction.c b/lib/libc/sys/sigaction.c index 809881ca4d3f..7ce177895c81 100644 --- a/lib/libc/sys/sigaction.c +++ b/lib/libc/sys/sigaction.c @@ -33,7 +33,6 @@ #include <signal.h> #include "libc_private.h" -__weak_reference(__sys_sigaction, __sigaction); __weak_reference(sigaction, __libc_sigaction); #pragma weak sigaction diff --git a/lib/libc/sys/sigprocmask.c b/lib/libc/sys/sigprocmask.c index 96cb9586509b..8b7fb6fb8e74 100644 --- a/lib/libc/sys/sigprocmask.c +++ b/lib/libc/sys/sigprocmask.c @@ -33,7 +33,6 @@ #include <signal.h> #include "libc_private.h" -__weak_reference(__sys_sigprocmask, __sigprocmask); __weak_reference(sigprocmask, __libc_sigprocmask); #pragma weak sigprocmask diff --git a/lib/libc/sys/sigsuspend.c b/lib/libc/sys/sigsuspend.c index e5a9495f9f39..ac117650ed1b 100644 --- a/lib/libc/sys/sigsuspend.c +++ b/lib/libc/sys/sigsuspend.c @@ -33,7 +33,6 @@ #include <signal.h> #include "libc_private.h" -__weak_reference(__sys_sigsuspend, __sigsuspend); __weak_reference(sigsuspend, __libc_sigsuspend); #pragma weak sigsuspend diff --git a/lib/libc/sys/sigtimedwait.c b/lib/libc/sys/sigtimedwait.c index 839e5fe4d992..4efa69555f39 100644 --- a/lib/libc/sys/sigtimedwait.c +++ b/lib/libc/sys/sigtimedwait.c @@ -33,8 +33,6 @@ #include <signal.h> #include "libc_private.h" -__weak_reference(__sys_sigtimedwait, __sigtimedwait); - #pragma weak sigtimedwait int sigtimedwait(const sigset_t * __restrict set, siginfo_t * __restrict info, diff --git a/lib/libc/sys/sigwaitinfo.c b/lib/libc/sys/sigwaitinfo.c index 611d09c3c221..e94777b731e6 100644 --- a/lib/libc/sys/sigwaitinfo.c +++ b/lib/libc/sys/sigwaitinfo.c @@ -33,8 +33,6 @@ #include <signal.h> #include "libc_private.h" -__weak_reference(__sys_sigwaitinfo, __sigwaitinfo); - #pragma weak sigwaitinfo int sigwaitinfo(const sigset_t * __restrict set, siginfo_t * __restrict info) diff --git a/lib/libc/sys/swapcontext.c b/lib/libc/sys/swapcontext.c index b69a5b19e698..69d4dfea16b5 100644 --- a/lib/libc/sys/swapcontext.c +++ b/lib/libc/sys/swapcontext.c @@ -35,7 +35,6 @@ #include <stddef.h> #include "libc_private.h" -__weak_reference(__sys_swapcontext, __swapcontext); __sym_compat(swapcontext, __impl_swapcontext, FBSD_1.0); __weak_reference(swapcontext, __impl_swapcontext); __sym_default(swapcontext, swapcontext, FBSD_1.2); diff --git a/lib/libc/sys/wait4.c b/lib/libc/sys/wait4.c index 57b0071ef87f..1d30c2d44c19 100644 --- a/lib/libc/sys/wait4.c +++ b/lib/libc/sys/wait4.c @@ -33,8 +33,6 @@ #include <sys/wait.h> #include "libc_private.h" -__weak_reference(__sys_wait4, __wait4); - #pragma weak wait4 pid_t wait4(pid_t pid, int *status, int options, struct rusage *ru) diff --git a/lib/libc/sys/wait6.c b/lib/libc/sys/wait6.c index 118a7ef6b99e..70817bdb441c 100644 --- a/lib/libc/sys/wait6.c +++ b/lib/libc/sys/wait6.c @@ -34,8 +34,6 @@ #include <signal.h> #include "libc_private.h" -__weak_reference(__sys_wait6, __wait6); - #pragma weak wait6 pid_t wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *ru, diff --git a/lib/libc/sys/write.c b/lib/libc/sys/write.c index 5880856b8af8..15e2d22fdbc5 100644 --- a/lib/libc/sys/write.c +++ b/lib/libc/sys/write.c @@ -34,8 +34,6 @@ #include <unistd.h> #include "libc_private.h" -__weak_reference(__sys_write, __write); - #pragma weak write ssize_t write(int fd, const void *buf, size_t nbytes) diff --git a/lib/libc/sys/writev.c b/lib/libc/sys/writev.c index 9a32cb603ab8..b642c6af9a89 100644 --- a/lib/libc/sys/writev.c +++ b/lib/libc/sys/writev.c @@ -35,8 +35,6 @@ #include <unistd.h> #include "libc_private.h" -__weak_reference(__sys_writev, __writev); - #pragma weak writev ssize_t writev(int fd, const struct iovec *iov, int iovcnt) diff --git a/lib/libc/tests/gen/posix_spawn_test.c b/lib/libc/tests/gen/posix_spawn_test.c index 77c3b5a569d9..22133cf1d59a 100644 --- a/lib/libc/tests/gen/posix_spawn_test.c +++ b/lib/libc/tests/gen/posix_spawn_test.c @@ -29,8 +29,11 @@ * IEEE Std. 1003.1-2008. */ +#include <sys/param.h> +#include <sys/stat.h> #include <sys/wait.h> #include <errno.h> +#include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -38,6 +41,10 @@ #include <atf-c.h> +static const char true_script[] = + "#!/usr/bin/env\n" + "/usr/bin/true\n"; + char *myenv[2] = { "answer=42", NULL }; ATF_TC_WITHOUT_HEAD(posix_spawn_simple_test); @@ -124,6 +131,48 @@ ATF_TC_BODY(posix_spawnp_enoexec_fallback_null_argv0, tc) ATF_REQUIRE(error == EINVAL); } +ATF_TC(posix_spawnp_eacces); +ATF_TC_HEAD(posix_spawnp_eacces, tc) +{ + atf_tc_set_md_var(tc, "descr", "Verify EACCES behavior in posix_spawnp"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} +ATF_TC_BODY(posix_spawnp_eacces, tc) +{ + const struct spawnp_eacces_tc { + const char *pathvar; + int error_expected; + } spawnp_eacces_tests[] = { + { ".", EACCES }, /* File exists, but not +x */ + { "unsearchable", ENOENT }, /* File exists, dir not +x */ + }; + char *myargs[2] = { "eacces", NULL }; + int error; + + error = mkdir("unsearchable", 0755); + ATF_REQUIRE(error == 0); + error = symlink("/usr/bin/true", "unsearchable/eacces"); + ATF_REQUIRE(error == 0); + + (void)chmod("unsearchable", 0444); + + /* this will create a non-executable file */ + atf_utils_create_file("eacces", true_script); + + for (size_t i = 0; i < nitems(spawnp_eacces_tests); i++) { + const struct spawnp_eacces_tc *tc = &spawnp_eacces_tests[i]; + pid_t pid; + + error = setenv("PATH", tc->pathvar, 1); + ATF_REQUIRE_EQ(0, error); + + error = posix_spawnp(&pid, myargs[0], NULL, NULL, myargs, + myenv); + ATF_CHECK_INTEQ_MSG(tc->error_expected, error, + "path '%s'", tc->pathvar); + } +} + ATF_TP_ADD_TCS(tp) { @@ -131,6 +180,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, posix_spawn_no_such_command_negative_test); ATF_TP_ADD_TC(tp, posix_spawnp_enoexec_fallback); ATF_TP_ADD_TC(tp, posix_spawnp_enoexec_fallback_null_argv0); + ATF_TP_ADD_TC(tp, posix_spawnp_eacces); return (atf_no_error()); } diff --git a/lib/libifconfig/libifconfig.h b/lib/libifconfig/libifconfig.h index fc835485a51e..b2f0cf9744ea 100644 --- a/lib/libifconfig/libifconfig.h +++ b/lib/libifconfig/libifconfig.h @@ -69,6 +69,8 @@ struct ifconfig_bridge_status { size_t members_count; /**< how many member interfaces */ uint32_t cache_size; /**< size of address cache */ uint32_t cache_lifetime; /**< address cache entry lifetime */ + ifbr_flags_t flags; /**< bridge flags */ + ether_vlanid_t defpvid; /**< default pvid */ }; struct ifconfig_capabilities { diff --git a/lib/libifconfig/libifconfig_bridge.c b/lib/libifconfig/libifconfig_bridge.c index b4a920f488c5..675bf5dd2ff5 100644 --- a/lib/libifconfig/libifconfig_bridge.c +++ b/lib/libifconfig/libifconfig_bridge.c @@ -92,6 +92,18 @@ ifconfig_bridge_get_bridge_status(ifconfig_handle_t *h, } bridge->inner.cache_lifetime = cache_param.ifbrp_ctime; + if (ifconfig_bridge_ioctlwrap(h, name, BRDGGFLAGS, + &cache_param, sizeof(cache_param), false) != 0) { + goto err; + } + bridge->inner.flags = cache_param.ifbrp_flags; + + if (ifconfig_bridge_ioctlwrap(h, name, BRDGGDEFPVID, + &cache_param, sizeof(cache_param), false) != 0) { + goto err; + } + bridge->inner.defpvid = cache_param.ifbrp_defpvid; + if (ifconfig_bridge_ioctlwrap(h, name, BRDGPARAM, &bridge->params, sizeof(bridge->params), false) != 0) { goto err; diff --git a/lib/libnvmf/libnvmf.h b/lib/libnvmf/libnvmf.h index 6b38fd286596..f095af8bb02a 100644 --- a/lib/libnvmf/libnvmf.h +++ b/lib/libnvmf/libnvmf.h @@ -51,6 +51,8 @@ struct nvmf_qpair_params { }; }; +__BEGIN_DECLS + /* Transport-independent APIs. */ /* @@ -384,4 +386,6 @@ int nvmf_reconnect_host(int fd, const struct nvme_discovery_log_entry *dle, */ int nvmf_connection_status(int fd, nvlist_t **nvlp); +__END_DECLS + #endif /* !__LIBNVMF_H__ */ diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 104777352d8b..cbd9d4677146 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -2397,6 +2397,151 @@ pfctl_table_add_addrs(int dev, struct pfr_table *tbl, struct pfr_addr return (0); } +static void +snl_add_msg_attr_table(struct snl_writer *nw, uint32_t type, + const struct pfr_table *tbl) +{ + int off; + + off = snl_add_msg_attr_nested(nw, type); + + snl_add_msg_attr_string(nw, PF_T_ANCHOR, tbl->pfrt_anchor); + snl_add_msg_attr_string(nw, PF_T_NAME, tbl->pfrt_name); + snl_add_msg_attr_u32(nw, PF_T_TABLE_FLAGS, tbl->pfrt_flags); + + snl_end_attr_nested(nw, off); +} + +static void +snl_add_msg_attr_pfr_addr(struct snl_writer *nw, uint32_t type, + const struct pfr_addr *addr) +{ + int off; + + off = snl_add_msg_attr_nested(nw, type); + + snl_add_msg_attr_u8(nw, PFR_A_AF, addr->pfra_af); + snl_add_msg_attr_u8(nw, PFR_A_NET, addr->pfra_net); + snl_add_msg_attr_bool(nw, PFR_A_NOT, addr->pfra_not); + snl_add_msg_attr_ip6(nw, PFR_A_ADDR, &addr->pfra_ip6addr); + + snl_end_attr_nested(nw, off); +} + +static struct snl_attr_parser ap_table_add_addr[] = { + { .type = PF_TA_NBR_ADDED, .off = 0, .cb = snl_attr_get_uint32 }, +}; +SNL_DECLARE_PARSER(table_add_addr_parser, struct genlmsghdr, snl_f_p_empty, ap_table_add_addr); + +static int +_pfctl_table_add_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pfr_addr + *addrs, int size, int *nadd, int flags) +{ + struct snl_writer nw; + struct snl_errmsg_data e = {}; + struct nlmsghdr *hdr; + uint32_t seq_id; + uint32_t added; + int family_id; + + family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME); + if (family_id == 0) + return (ENOTSUP); + + snl_init_writer(&h->ss, &nw); + hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_TABLE_ADD_ADDR); + + snl_add_msg_attr_table(&nw, PF_TA_TABLE, tbl); + snl_add_msg_attr_u32(&nw, PF_TA_FLAGS, flags); + for (int i = 0; i < size && i < 256; i++) + snl_add_msg_attr_pfr_addr(&nw, PF_TA_ADDR, &addrs[i]); + + if ((hdr = snl_finalize_msg(&nw)) == NULL) + return (ENXIO); + seq_id = hdr->nlmsg_seq; + + if (! snl_send_message(&h->ss, hdr)) + return (ENXIO); + + while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { + if (! snl_parse_nlmsg(&h->ss, hdr, &table_add_addr_parser, &added)) + continue; + } + + if (nadd) + *nadd = added; + + return (e.error); +} + +int +pfctl_table_add_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pfr_addr + *addr, int size, int *nadd, int flags) +{ + int ret; + int off = 0; + int partial_added; + + do { + ret = _pfctl_table_add_addrs_h(h, tbl, &addr[off], size - off, &partial_added, flags); + if (ret != 0) + break; + if (nadd) + *nadd += partial_added; + off += partial_added; + } while (off < size); + + if (nadd) + *nadd = off; + + return (ret); +} + +static struct snl_attr_parser ap_table_del_addr[] = { + { .type = PF_TA_NBR_DELETED, .off = 0, .cb = snl_attr_get_uint32 }, +}; +SNL_DECLARE_PARSER(table_del_addr_parser, struct genlmsghdr, snl_f_p_empty, ap_table_del_addr); +static int +_pfctl_table_del_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pfr_addr + *addrs, int size, int *ndel, int flags) +{ + struct snl_writer nw; + struct snl_errmsg_data e = {}; + struct nlmsghdr *hdr; + uint32_t seq_id; + uint32_t deleted; + int family_id; + + family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME); + if (family_id == 0) + return (ENOTSUP); + + snl_init_writer(&h->ss, &nw); + hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_TABLE_DEL_ADDR); + + snl_add_msg_attr_table(&nw, PF_TA_TABLE, tbl); + snl_add_msg_attr_u32(&nw, PF_TA_FLAGS, flags); + for (int i = 0; i < size && i < 256; i++) + snl_add_msg_attr_pfr_addr(&nw, PF_TA_ADDR, &addrs[i]); + + if ((hdr = snl_finalize_msg(&nw)) == NULL) + return (ENXIO); + seq_id = hdr->nlmsg_seq; + + if (! snl_send_message(&h->ss, hdr)) + return (ENXIO); + + while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { + if (! snl_parse_nlmsg(&h->ss, hdr, &table_del_addr_parser, &deleted)) + continue; + } + + if (ndel) + *ndel = deleted; + + return (e.error); +} + int pfctl_table_del_addrs(int dev, struct pfr_table *tbl, struct pfr_addr *addr, int size, int *ndel, int flags) @@ -2421,6 +2566,30 @@ pfctl_table_del_addrs(int dev, struct pfr_table *tbl, struct pfr_addr } int +pfctl_table_del_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pfr_addr + *addr, int size, int *ndel, int flags) +{ + int ret; + int off = 0; + int partial_deleted; + + do { + ret = _pfctl_table_del_addrs_h(h, tbl, &addr[off], size - off, + &partial_deleted, flags); + if (ret != 0) + break; + if (ndel) + *ndel += partial_deleted; + off += partial_deleted; + } while (off < size); + + if (ndel) + *ndel = off; + + return (ret); +} + +int pfctl_table_set_addrs(int dev, struct pfr_table *tbl, struct pfr_addr *addr, int size, int *size2, int *nadd, int *ndel, int *nchange, int flags) { diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index 116f9243fda9..f6c8f6a2ccdb 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -511,8 +511,12 @@ int pfctl_clear_nat(int dev, const char *anchorname); int pfctl_clear_eth_rules(int dev, const char *anchorname); int pfctl_set_syncookies(int dev, const struct pfctl_syncookies *s); int pfctl_get_syncookies(int dev, struct pfctl_syncookies *s); +int pfctl_table_add_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pfr_addr + *addr, int size, int *nadd, int flags); int pfctl_table_add_addrs(int dev, struct pfr_table *tbl, struct pfr_addr *addr, int size, int *nadd, int flags); +int pfctl_table_del_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, + struct pfr_addr *addr, int size, int *ndel, int flags); int pfctl_table_del_addrs(int dev, struct pfr_table *tbl, struct pfr_addr *addr, int size, int *ndel, int flags); int pfctl_table_set_addrs(int dev, struct pfr_table *tbl, struct pfr_addr diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 3eb4bf85153d..7871731dcdcd 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -135,15 +135,28 @@ FEATURE_NOTE='\#include <sys/elf_common.h>\nGNU_PROPERTY_AARCH64_FEATURE_1_NOTE( FEATURE_NOTE='' .endif -${SASM}: - printf '/* %sgenerated by libc/sys/Makefile.inc */\n' @ > ${.TARGET} +# Add this file as a dependency of the generated assembly along with +# the two included files compat.h and SYS.h. Depending on this Makefile +# will cause some needless regenerations, but handles both changes in +# generated assembly and movement between MIASM and PSEUDO/INTERPOSED. +# The dependency on compat.h and SYS.h should properly be on the +# <foo>.S-><foo>.o rules, but there are too many .o variants for it to +# be easy and touching the geneated source files has the same effect in +# practice. +__makefile_sys:= ${.PARSEDIR}/${.PARSEFILE} +__asm_deps= ${__makefile_sys} \ + ${LIBC_SRCTOP}/include/compat.h \ + ${LIBSYS_SRCTOP}/${LIBC_ARCH}/SYS.h + +${SASM}: ${__asm_deps} + printf '/* %sgenerated by libsys/Makefile.sys */\n' @ > ${.TARGET} printf '#include "compat.h"\n' >> ${.TARGET} printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' >> ${.TARGET} printf ${NOTE_GNU_STACK} >>${.TARGET} printf ${FEATURE_NOTE} >> ${.TARGET} -${SPSEUDO}: - printf '/* %sgenerated by libc/sys/Makefile.inc */\n' @ > ${.TARGET} +${SPSEUDO}: ${__asm_deps} + printf '/* %sgenerated by libsys/Makefile.sys */\n' @ > ${.TARGET} printf '#include "compat.h"\n' >> ${.TARGET} printf '#include "SYS.h"\nPSEUDO(${.PREFIX:S/_//})\n' \ >> ${.TARGET} diff --git a/lib/libsys/chroot.2 b/lib/libsys/chroot.2 index 4c06e3673e03..3347df5cceee 100644 --- a/lib/libsys/chroot.2 +++ b/lib/libsys/chroot.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 15, 2024 +.Dd August 2, 2025 .Dt CHROOT 2 .Os .Sh NAME @@ -61,7 +61,12 @@ It should be noted that .Fn chroot has no effect on the process's current directory. .Pp -This call is restricted to the super-user. +This call is restricted to the super-user, unless the +.Ql security.bsd.unprivileged_chroot +sysctl variable is set to 1 +and the process has enabled the +.Dv PROC_NO_NEW_PRIVS_CTL +.Xr procctl 2 . .Pp Depending on the setting of the .Ql kern.chroot_allow_open_directories @@ -106,14 +111,37 @@ except it takes a file descriptor instead of path. .Sh ERRORS The .Fn chroot +and +.Fn fchroot +system calls +will fail and the root directory will be unchanged if: +.Bl -tag -width Er +.It Bq Er EPERM +The effective user ID is not the super-user and the +.Ql security.bsd.unprivileged_chroot +sysctl is 0. +.It Bq Er EPERM +The effective user ID is not the super-user and the +process has not enabled the +.Dv PROC_NO_NEW_PRIVS_CTL +.Xr procctl 2 . +.It Bq Er EPERM +One or more filedescriptors are open directories and the +.Ql kern.chroot_allow_open_directories +sysctl is not set to permit this. +.It Bq Er EIO +An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. +.El +.Pp +The +.Fn chroot system call will fail and the root directory will be unchanged if: .Bl -tag -width Er .It Bq Er ENOTDIR A component of the path name is not a directory. -.It Bq Er EPERM -The effective user ID is not the super-user, or one or more -filedescriptors are open directories. .It Bq Er ENAMETOOLONG A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. @@ -128,10 +156,6 @@ The .Fa dirname argument points outside the process's allocated address space. -.It Bq Er EIO -An I/O error occurred while reading from or writing to the file system. -.It Bq Er EINTEGRITY -Corrupted data was detected while reading from the file system. .El .Pp The @@ -146,15 +170,8 @@ file descriptor. The argument .Fa fd is not a valid file descriptor. -.It Bq Er EIO -An I/O error occurred while reading from or writing to the file system. -.It Bq Er EINTEGRITY -Corrupted data was detected while reading from the file system. .It Bq Er ENOTDIR The file descriptor does not reference a directory. -.It Bq Er EPERM -The effective user ID is not the super-user, or one or more -filedescriptors are open directories. .El .Sh SEE ALSO .Xr chdir 2 , diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 64cf7d004070..0f9e3749d75f 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -170,7 +170,6 @@ STATIC_LIB_REQUIRE(_sem_trywait); STATIC_LIB_REQUIRE(_sem_wait); STATIC_LIB_REQUIRE(_sigaction); STATIC_LIB_REQUIRE(_sigprocmask); -STATIC_LIB_REQUIRE(_sigsuspend); STATIC_LIB_REQUIRE(_sigtimedwait); STATIC_LIB_REQUIRE(_sigwait); STATIC_LIB_REQUIRE(_sigwaitinfo); diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index 2cd3de512d1c..4bff5497a804 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -683,14 +683,6 @@ _thr_sigmask(int how, const sigset_t *set, sigset_t *oset) } int -_sigsuspend(const sigset_t *set) -{ - sigset_t newset; - - return (__sys_sigsuspend(thr_remove_thr_signals(set, &newset))); -} - -int __thr_sigsuspend(const sigset_t *set) { struct pthread *curthread; diff --git a/lib/libusb/libusb.3 b/lib/libusb/libusb.3 index 9dc752f0fd7b..607a7f645d95 100644 --- a/lib/libusb/libusb.3 +++ b/lib/libusb/libusb.3 @@ -209,6 +209,14 @@ Decrement the reference counter of the device .Fa dev . .Pp .Ft int +.Fn libusb_wrap_sys_device "libusb_context *ctx" "intptr_t sys_dev" "libusb_device_handle **dev_handle" +This function creates a libusb handler from a previously opened fd +.Fa sys_dev . +This function is provided for compatibility and is currently unimplemented. +It always returns +.Dv LIBUSB_ERROR_NOT_SUPPORTED . +.Pp +.Ft int .Fn libusb_open "libusb_device *dev" "libusb_device_handle **devh" Open a device and obtain a device_handle. Returns 0 on success, @@ -536,6 +544,21 @@ libusb_free_container_id_descriptor function. .Fn libusb_free_container_id_descriptor "struct libusb_container_id_descriptor *container_id" This function is NULL safe and frees a parsed container ID descriptor given by .Fa container_id . +.Pp +.Ft int +.Fn libusb_get_platform_descriptor "struct libusb_context *ctx" "struct libusb_bos_dev_capability_descriptor *dev_cap" "struct libusb_platform_descriptor **platform_descriptor" +This function parses the platform descriptor from the descriptor given by +.Fa dev_cap +and stores a pointer to the parsed descriptor into +.Fa platform_descriptor . +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed platform descriptor must be freed using the +libusb_free_platform_descriptor function. +.Pp +.Ft void +.Fn libusb_free_platform_descriptor "struct libusb_platform_descriptor *platform_descriptor" +This function is NULL safe and frees a parsed platform descriptor given by +.Fa platform_descriptor . .Sh USB ASYNCHRONOUS I/O .Ft struct libusb_transfer * .Fn libusb_alloc_transfer "int iso_packets" @@ -734,6 +757,14 @@ another thread is already doing so. Must be called with the event lock held. .Pp .Ft int +.Fn libusb_pollfds_handle_timeouts "libusb_context *ctx" +This function determines whether applications maintaining libusb events using +.Fn libusb_get_pollfds +are responsible for handling timeout events themselves. +Returns 1 if libusb handles the timeout internally, 0 if the application +needs to set a dedicated timer to handle it. +.Pp +.Ft int .Fn libusb_get_next_timeout "libusb_context *ctx" "struct timeval *tv" Determine the next internal timeout that libusb needs to handle. Returns 0 diff --git a/lib/libusb/libusb.h b/lib/libusb/libusb.h index 1803ff637738..623b56fb273b 100644 --- a/lib/libusb/libusb.h +++ b/lib/libusb/libusb.h @@ -66,6 +66,7 @@ enum libusb_class_code { LIBUSB_CLASS_PERSONAL_HEALTHCARE = 15, LIBUSB_CLASS_DIAGNOSTIC_DEVICE = 0xdc, LIBUSB_CLASS_WIRELESS = 0xe0, + LIBUSB_CLASS_MISCELLANEOUS = 0xef, LIBUSB_CLASS_APPLICATION = 0xfe, LIBUSB_CLASS_VENDOR_SPEC = 0xff, }; @@ -106,6 +107,7 @@ enum libusb_device_capability_type { #define LIBUSB_BT_USB_2_0_EXTENSION_SIZE 7 #define LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE 10 #define LIBUSB_BT_CONTAINER_ID_SIZE 20 +#define LIBUSB_BT_PLATFORM_DESCRIPTOR_MIN_SIZE 20 #define LIBUSB_ENDPOINT_ADDRESS_MASK 0x0f #define LIBUSB_ENDPOINT_DIR_MASK 0x80 @@ -172,11 +174,23 @@ enum libusb_iso_usage_type { LIBUSB_ISO_USAGE_TYPE_IMPLICIT = 2, }; +enum libusb_usb_2_0_extension_attributes { + LIBUSB_BM_LPM_SUPPORT = 0x2, +}; + +enum libusb_supported_speed { + LIBUSB_LOW_SPEED_OPERATION = (1 << 0), + LIBUSB_FULL_SPEED_OPERATION = (1 << 1), + LIBUSB_HIGH_SPEED_OPERATION = (1 << 2), + LIBUSB_SUPER_SPEED_OPERATION = (1 << 3), +}; + enum libusb_bos_type { LIBUSB_BT_WIRELESS_USB_DEVICE_CAPABILITY = 1, LIBUSB_BT_USB_2_0_EXTENSION = 2, LIBUSB_BT_SS_USB_DEVICE_CAPABILITY = 3, LIBUSB_BT_CONTAINER_ID = 4, + LIBUSB_BT_PLATFORM_DESCRIPTOR = 5, }; enum libusb_capability { @@ -434,6 +448,15 @@ typedef struct libusb_container_id_descriptor { uint8_t ContainerID[16]; } libusb_container_id_descriptor __aligned(sizeof(void *)); +typedef struct libusb_platform_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDevCapabilityType; + uint8_t bReserved; + uint8_t PlatformCapabilityUUID[16]; + uint8_t CapabilityData[]; +} libusb_platform_descriptor __aligned(sizeof(void *)); + typedef struct libusb_control_setup { uint8_t bmRequestType; uint8_t bRequest; @@ -495,6 +518,7 @@ int libusb_get_max_packet_size(libusb_device * dev, uint8_t endpoint); int libusb_get_max_iso_packet_size(libusb_device * dev, uint8_t endpoint); libusb_device *libusb_ref_device(libusb_device * dev); void libusb_unref_device(libusb_device * dev); +int libusb_wrap_sys_device(libusb_context *ctx, intptr_t sys_dev, libusb_device_handle **dev_handle); int libusb_open(libusb_device * dev, libusb_device_handle ** devh); libusb_device_handle *libusb_open_device_with_vid_pid(libusb_context * ctx, uint16_t vendor_id, uint16_t product_id); void libusb_close(libusb_device_handle * devh); @@ -541,6 +565,8 @@ int libusb_get_ss_usb_device_capability_descriptor(struct libusb_context *ctx, s void libusb_free_ss_usb_device_capability_descriptor(struct libusb_ss_usb_device_capability_descriptor *ss_usb_device_capability); int libusb_get_container_id_descriptor(struct libusb_context *ctx, struct libusb_bos_dev_capability_descriptor *dev_cap, struct libusb_container_id_descriptor **container_id); void libusb_free_container_id_descriptor(struct libusb_container_id_descriptor *container_id); +int libusb_get_platform_descriptor(libusb_context *ctx, struct libusb_bos_dev_capability_descriptor *dev_cap, struct libusb_platform_descriptor **platform_descriptor); +void libusb_free_platform_descriptor(struct libusb_platform_descriptor *platform_descriptor); /* Asynchronous device I/O */ @@ -556,6 +582,7 @@ struct libusb_control_setup *libusb_control_transfer_get_setup(struct libusb_tra void libusb_fill_control_setup(uint8_t *buf, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint16_t wLength); void libusb_fill_control_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t *buf, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout); void libusb_fill_bulk_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, int length, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout); +void libusb_fill_bulk_stream_transfer(struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char endpoint, uint32_t stream_id, unsigned char *buffer, int length, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout); void libusb_fill_interrupt_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, int length, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout); void libusb_fill_iso_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, int length, int npacket, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout); @@ -575,6 +602,7 @@ int libusb_handle_events_completed(libusb_context * ctx, int *completed); int libusb_handle_events_timeout(libusb_context * ctx, struct timeval *tv); int libusb_handle_events(libusb_context * ctx); int libusb_handle_events_locked(libusb_context * ctx, struct timeval *tv); +int libusb_pollfds_handle_timeouts(libusb_context *ctx); int libusb_get_next_timeout(libusb_context * ctx, struct timeval *tv); void libusb_set_pollfd_notifiers(libusb_context * ctx, libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb, void *user_data); const struct libusb_pollfd **libusb_get_pollfds(libusb_context *ctx); diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index 5c116b39ea17..e226def0b7b6 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -1918,3 +1918,10 @@ libusb_dev_mem_free(libusb_device_handle *devh, unsigned char *buffer, { return (LIBUSB_ERROR_NOT_SUPPORTED); } + +int +libusb_wrap_sys_device(libusb_context *ctx, intptr_t sys_dev, + libusb_device_handle **dev_handle) +{ + return (LIBUSB_ERROR_NOT_SUPPORTED); +} diff --git a/lib/libusb/libusb10_desc.c b/lib/libusb/libusb10_desc.c index 5f4c46740688..7da5c84f4ad2 100644 --- a/lib/libusb/libusb10_desc.c +++ b/lib/libusb/libusb10_desc.c @@ -711,6 +711,55 @@ void libusb_free_container_id_descriptor( struct libusb_container_id_descriptor *container_id) { - free(container_id); } + +int +libusb_get_platform_descriptor(libusb_context *ctx, + struct libusb_bos_dev_capability_descriptor *bos_cap, + struct libusb_platform_descriptor **pd) +{ + struct libusb_platform_descriptor *desc; + uint8_t *cap_data; + + if (bos_cap == NULL || + bos_cap->bDescriptorType != LIBUSB_BT_PLATFORM_DESCRIPTOR || + pd == NULL) + return (LIBUSB_ERROR_INVALID_PARAM); + + if (bos_cap->bLength < LIBUSB_BT_PLATFORM_DESCRIPTOR_MIN_SIZE) + return (LIBUSB_ERROR_IO); + + cap_data = bos_cap->dev_capability_data; + desc = calloc(1, bos_cap->bLength); + if (desc == NULL) + return (LIBUSB_ERROR_NO_MEM); + + desc->bLength = bos_cap->bLength; + desc->bDescriptorType = LIBUSB_BT_PLATFORM_DESCRIPTOR; + desc->bDevCapabilityType = bos_cap->bDevCapabilityType; + desc->bReserved = cap_data[0]; + memcpy(desc->PlatformCapabilityUUID, cap_data + 1, + sizeof(desc->PlatformCapabilityUUID)); + + /* + * UUID (16 bytes) + bReserved + */ + cap_data += sizeof(desc->PlatformCapabilityUUID) + 1; + /* + * UUID (16 bytes) + bReserved + bLength + bDescriptortype + + * bDevCapabilitytype + */ + memcpy(desc->CapabilityData, cap_data, + bos_cap->bLength - (sizeof(desc->PlatformCapabilityUUID) + 4)); + *pd = desc; + + return (LIBUSB_SUCCESS); +} + +void +libusb_free_platform_descriptor( + struct libusb_platform_descriptor *platform_descriptor) +{ + free(platform_descriptor); +} diff --git a/lib/libusb/libusb10_io.c b/lib/libusb/libusb10_io.c index c99586ff650d..2047712e9e39 100644 --- a/lib/libusb/libusb10_io.c +++ b/lib/libusb/libusb10_io.c @@ -422,6 +422,12 @@ libusb_get_next_timeout(libusb_context *ctx, struct timeval *tv) return (0); } +int +libusb_pollfds_handle_timeouts(libusb_context *ctx) +{ + return (1); +} + void libusb_set_pollfd_notifiers(libusb_context *ctx, libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb, diff --git a/lib/libutil++/Makefile b/lib/libutil++/Makefile new file mode 100644 index 000000000000..df3074c2278e --- /dev/null +++ b/lib/libutil++/Makefile @@ -0,0 +1,20 @@ +PACKAGE= lib${LIB} +LIB_CXX= util++ +INTERNALLIB= true +SHLIB_MAJOR= 1 +SRCS= stringf.cc + +MAN+= freebsd::FILE_up.3 \ + freebsd::addrinfo_up.3 \ + freebsd::fd_up.3 \ + freebsd::malloc_up.3 \ + freebsd::nvlist_up.3 \ + freebsd::pidfile.3 \ + freebsd::stringf.3 + +.include <src.opts.mk> + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + +.include <bsd.lib.mk> diff --git a/lib/libutil++/freebsd::FILE_up.3 b/lib/libutil++/freebsd::FILE_up.3 new file mode 100644 index 000000000000..ea63b1233b43 --- /dev/null +++ b/lib/libutil++/freebsd::FILE_up.3 @@ -0,0 +1,41 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Chelsio Communications, Inc. +.\" Written by: John Baldwin <jhb@FreeBSD.org> +.\" +.Dd July 31, 2025 +.Dt FREEBSD::FILE_UP 3 +.Os +.Sh NAME +.Nm freebsd::FILE_up +.Nd std::unique_ptr specialization for stdio FILE objects +.Sh LIBRARY +.Lb libutil++ +.Sh SYNOPSIS +.In libutil++.hh +.Ft using FILE_up = std::unique_ptr<FILE, fclose_deleter>; +.Sh DESCRIPTION +This class is a specialization of +.Vt std::unique_ptr +for stdio +.Vt FILE +objects. +When a +.Vt FILE +object managed by an instance of this class is disposed, +.Xr fclose 3 +is invoked to dispose of the +.Vt FILE +object. +.Sh EXAMPLES +.Bd -literal -offset indent +freebsd::FILE_up fp(fopen("foo.txt", "w")); +if (!fp) + err(1, "fopen"); +fprintf(fp.get(), "hello\n"); +// `fp' is implicitly closed on destruction +.Ed +.Sh SEE ALSO +.Xr fclose 3 , +.Xr fopen 3 diff --git a/lib/libutil++/freebsd::addrinfo_up.3 b/lib/libutil++/freebsd::addrinfo_up.3 new file mode 100644 index 000000000000..4845a76bfb61 --- /dev/null +++ b/lib/libutil++/freebsd::addrinfo_up.3 @@ -0,0 +1,45 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Chelsio Communications, Inc. +.\" Written by: John Baldwin <jhb@FreeBSD.org> +.\" +.Dd July 31, 2025 +.Dt FREEBSD::ADDRINFO_UP 3 +.Os +.Sh NAME +.Nm freebsd::addrinfo_up +.Nd std::unique_ptr specialization for lists of socket addresses +.Sh LIBRARY +.Lb libutil++ +.Sh SYNOPSIS +.In libutil++.hh +.Ft using addrinfo_up = std::unique_ptr<addrinfo, freeaddrinfo_deleter>; +.Sh DESCRIPTION +This class is a specialization of +.Vt std::unique_ptr +for socket addresses returned by +.Xr getaddrinfo 3 . +When a list of socket addresses managed by an instance of this class is +disposed, +.Xr freeaddrinfo 3 +is invoked to dispose of the list. +.Sh EXAMPLES +.Bd -literal -offset indent +freebsd::addrinfo_up +resolve_address(const char *address, const char *port) +{ + struct addrinfo hints, *ai; + int error; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + error = getaddrinfo(address, port, &hints, &ai); + if (error != 0) + return {}; + return freebsd::addrinfo_up(ai); +} +.Ed +.Sh SEE ALSO +.Xr getaddrinfo 3 diff --git a/lib/libutil++/freebsd::fd_up.3 b/lib/libutil++/freebsd::fd_up.3 new file mode 100644 index 000000000000..2ef2241a5c40 --- /dev/null +++ b/lib/libutil++/freebsd::fd_up.3 @@ -0,0 +1,78 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Chelsio Communications, Inc. +.\" Written by: John Baldwin <jhb@FreeBSD.org> +.\" +.Dd July 31, 2025 +.Dt FREEBSD::STRINGF 3 +.Os +.Sh NAME +.Nm freebsd::fd_up +.Nd own a file descriptor +.Sh LIBRARY +.Lb libutil++ +.Sh SYNOPSIS +.In libutil++.hh +.Pp +.Vt class freebsd::fd_up +{ +.Bd -ragged -offset indent +.Fn fd_up +.Fn fd_up "int fd" +.Fn fd_up "fd_up &&other" +.Fn ~fd_up +.Ft int +.Fn get +.Ft int +.Fn release +.Ft void +.Fn reset "int newfd = -1" +.Ft "fd_up &" +.Fn operator= "fd_up &&other" +.Ft "fd_up &" +.Fn operator= "int fd" +.Fn "explicit operator bool" +.Fn "operator int" +.Ed +}; +.Sh DESCRIPTION +Each instance of this class owns a file descriptor. +This class is patterned on std::unique_ptr, +but instead of owning a pointer to an object, +this class owns a file descriptor. +The currently-owned file descriptor is disposed by invoking +.Xr close 2 +when an instance of this class is destroyed. +The currently-owned file descriptor is also disposed if it is replaced by the +.Fn reset +method or assignment operators. +.Pp +The +.Fn get +method returns the current file descriptor value while retaining ownership. +.Pp +The +.Fn release +method relinquishes ownership of the current file descriptor and returns the +value of the previously-owned file descriptor. +.Pp +The explicit +.Vt bool +conversion operator permits testing the validity of an object. +The operator returns true if the instance owns a valid file descriptor. +.Pp +The implicit +.Vt int +conversion operator permits passing an instance of this class directly as +an argument to existing functions which expect a file descriptor. +.Sh EXAMPLES +.Bd -literal -offset indent +freebsd::fd_up fd(open("/dev/null", O_RDWR)); +if (!fd) + err(1, "open"); +write(fd, "test", 4); +// `fd' is implicitly closed on destruction +.Ed +.Sh SEE ALSO +.Xr close 2 diff --git a/lib/libutil++/freebsd::malloc_up.3 b/lib/libutil++/freebsd::malloc_up.3 new file mode 100644 index 000000000000..b18e7854213a --- /dev/null +++ b/lib/libutil++/freebsd::malloc_up.3 @@ -0,0 +1,50 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Chelsio Communications, Inc. +.\" Written by: John Baldwin <jhb@FreeBSD.org> +.\" +.Dd July 31, 2025 +.Dt FREEBSD::MALLOC_UP 3 +.Os +.Sh NAME +.Nm freebsd::malloc_up +.Nd std::unique_ptr specialization for objects allocated via malloc +.Sh LIBRARY +.Lb libutil++ +.Sh SYNOPSIS +.In libutil++.hh +.Ft using malloc_up = std::unique_ptr<T, free_deleter<T>>; +.Sh DESCRIPTION +This class is a specialization of +.Vt std::unique_ptr +which invokes +.Xr free 3 +instead of +.Fn delete +when an object is disposed. +While explicit calls to +.Xr malloc 3 +should be avoided in C++ code, +this class can be useful to manage an object allocated by an existing API +which uses +.Xr malloc 3 +internally such as +.Xr scandir 3 . +Note that the type of the underlying object must be used as the first +template argument similar to std::unique_ptr. +.Sh EXAMPLES +This example uses +.Xr strdup 3 +for simplicity, +but new C++ code should generally not use +.Xr strdup 3 : +.Bd -literal -offset indent +freebsd::malloc_up<char> my_string(strdup("foo")); +// `mystring' is implicitly freed on destruction +.Ed +.Sh SEE ALSO +.Xr free 3 , +.Xr malloc 3 , +.Xr scandir 3 , +.Xr strdup 3 diff --git a/lib/libutil++/freebsd::nvlist_up.3 b/lib/libutil++/freebsd::nvlist_up.3 new file mode 100644 index 000000000000..43f76cf3ead3 --- /dev/null +++ b/lib/libutil++/freebsd::nvlist_up.3 @@ -0,0 +1,37 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Chelsio Communications, Inc. +.\" Written by: John Baldwin <jhb@FreeBSD.org> +.\" +.Dd July 31, 2025 +.Dt FREEBSD::NVLIST_UP 3 +.Os +.Sh NAME +.Nm freebsd::nvlist_up +.Nd std::unique_ptr specialization for name/value pairs +.Sh LIBRARY +.Lb libutil++ +.Sh SYNOPSIS +.In libutil++.hh +.Ft using nvlist_up = std::unique_ptr<nvlist, nvlist_deleter>; +.Sh DESCRIPTION +This class is a specialization of +.Vt std::unique_ptr +for +.Vt nvlist_t +objects. +When an +.Vt nvlist_t +object managed by an instance of this class is disposed, +.Xr nvlist_destroy 3 +is invoked to dispose of the object. +.Sh EXAMPLES +.Bd -literal -offset indent +freebsd::nvlist_up nvl(nvlist_create(0)); +nvlist_add_number(nvl.get(), "answer", 42); +nvlist_add_bool(nvl.get(), "valid", true); +// `nvl' is implicitly destroyed +.Ed +.Sh SEE ALSO +.Xr nvlist_destroy 3 diff --git a/lib/libutil++/freebsd::pidfile.3 b/lib/libutil++/freebsd::pidfile.3 new file mode 100644 index 000000000000..fb67253f5c02 --- /dev/null +++ b/lib/libutil++/freebsd::pidfile.3 @@ -0,0 +1,110 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Chelsio Communications, Inc. +.\" Written by: John Baldwin <jhb@FreeBSD.org> +.\" +.Dd July 31, 2025 +.Dt FREEBSD::STRINGF 3 +.Os +.Sh NAME +.Nm freebsd::pidfile +.Nd own a PID file handle +.Sh LIBRARY +.Lb libutil++ +.Sh SYNOPSIS +.In libutil++.hh +.Pp +.Vt class freebsd::pidfile +{ +.Bd -ragged -offset indent +.Fn pidfile +.Fn pidfile "struct pidfh *pfh" +.Fn pidfile "pidfile &&other" +.Fn ~pidfile +.Ft struct pidfh * +.Fn release +.Ft void +.Fn reset "struct pidfh *newpfh = nullptr" +.Ft int +.Fn write +.Ft int +.Fn close +.Ft int +.Fn fileno +.Ft "pidfile &" +.Fn operator= "pidfile &&other" +.Ft "pidfile &" +.Fn operator= "struct pidfh *pfh" +.Fn "explicit operator bool" +.Ed +}; +.Sh DESCRIPTION +Each instance of this class owns a PID file handle created by +.Xr pidfile_open 3 . +This class is patterned on std::unique_ptr; +however, +rather than exporting the raw pointer via a +.Fn get +method, +this class provides wrapper methods for each of the other +.Xr pidfile 3 +functions. +The currently-owned PID file is removed by invoking +.Xr pidfile_remove 3 +when an instance of this class is destroyed. +The currently-owned PID file is also removed if it is replaced by the +.Fn reset +method or assignment operators. +.Pp +The +.Fn release +method relinquishes ownership of the current PID file handle and returns the +value of the previously-owned PID file handle. +.Pp +The +.Fn write +method writes out the PID of the current process to the PID file via +.Xr pidfile_write 3 . +.Pp +The +.Fn close +method closes the current PID file without removing it via +.Xr pidfile_close 3 . +If the close succeeds, the PID file handle is no longer valid. +.Pp +The +.Fn fileno +method returns the underlying file descriptor for the current PID file via +.Xr pidfile_fileno 3 . +.Pp +The explicit +.Vt bool +conversion operator permits testing the validity of an object. +The operator returns true if the instance owns a valid PID file handle. +.Sh EXAMPLES +.Bd -literal -offset indent +int +main() +{ + freebsd::pidfile pf(pidfile_open("/var/run/daemon.pid", + 0600, NULL)); + if (!pf) + err(1, "pidfile_open"); + + if (daemon(0, 0) == -1) { + warn("daemon"); + return 1; + } + + pf->write(); + + for (;;) { + /* Do Work */ + } + + return 0; +} +.Ed +.Sh SEE ALSO +.Xr pidfile 3 diff --git a/lib/libutil++/freebsd::stringf.3 b/lib/libutil++/freebsd::stringf.3 new file mode 100644 index 000000000000..341fedef4343 --- /dev/null +++ b/lib/libutil++/freebsd::stringf.3 @@ -0,0 +1,48 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Chelsio Communications, Inc. +.\" Written by: John Baldwin <jhb@FreeBSD.org> +.\" +.Dd July 31, 2025 +.Dt FREEBSD::STRINGF 3 +.Os +.Sh NAME +.Nm freebsd::stringf +.Nd build a std::string using stdio formatting +.Sh LIBRARY +.Lb libutil++ +.Sh SYNOPSIS +.In libutil++.hh +.Ft std::string +.Fn freebsd::stringf "const char *fmt" "..." +.Ft std::string +.Fn freebsd::stringf "const char *fmt" "va_list ap" +.Sh DESCRIPTION +These functions construct a +.Vt std::string +object containing a formatted string. +The output of the string is dictated by the +.Fa fmt +argument and additional arguments using the same conventions documented in +.Xr printf 3 . +The first form provides functionality similar to +.Xr asprintf 3 +and the second form is similar to +.Xr vasprintf 3 . +.Sh RETURN VALUES +These functions return a std::string object. +.Sh EXCEPTIONS +These functions may throw one of the following exceptions: +.Bl -tag -width Er +.It Bq Er std::bad_alloc +Failed to allocate memory. +.It Bq Er std::length_error +The result would exceeed the maximum possible string size. +.El +.Sh EXAMPLES +.Bd -literal -offset indent +std::string s = freebsd::stringf("hello %s", "world"); +.Ed +.Sh SEE ALSO +.Xr asprintf 3 diff --git a/lib/libutil++/libutil++.hh b/lib/libutil++/libutil++.hh new file mode 100644 index 000000000000..ecf737f2fcb0 --- /dev/null +++ b/lib/libutil++/libutil++.hh @@ -0,0 +1,230 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Chelsio Communications, Inc. + * Written by: John Baldwin <jhb@FreeBSD.org> + */ + +#ifndef __LIBUTILPP_HH__ +#define __LIBUTILPP_HH__ + +#include <sys/nv.h> +#include <libutil.h> +#include <netdb.h> +#include <unistd.h> + +#include <cstdarg> +#include <cstdio> +#include <cstdlib> +#include <memory> + +namespace freebsd { + /* + * FILE_up is a std::unique_ptr<> for FILE objects which uses + * fclose() to destroy the wrapped pointer. + */ + struct fclose_deleter { + void operator() (std::FILE *fp) const + { + std::fclose(fp); + } + }; + + using FILE_up = std::unique_ptr<std::FILE, fclose_deleter>; + + /* + * addrinfo_up is a std::unique_ptr<> which uses + * freeaddrinfo() to destroy the wrapped pointer. It is + * intended to wrap arrays allocated by getaddrinfo(). + */ + struct freeaddrinfo_deleter { + void operator() (struct addrinfo *ai) const + { + freeaddrinfo(ai); + } + }; + + using addrinfo_up = std::unique_ptr<addrinfo, freeaddrinfo_deleter>; + + /* + * This class is intended to function similar to unique_ptr<>, + * but it contains a file descriptor rather than a pointer to + * an object. On destruction the descriptor is closed via + * close(2). + * + * Similar to unique_ptr<>, release() returns ownership of the + * file descriptor to the caller. reset() closes the current + * file descriptor and takes ownership of a new one. A move + * constructor permits ownership to be transferred via + * std::move(). An integer file descriptor can be assigned + * directly which is equivalent to calling reset(). + * + * An explicit bool conversion operator permits testing this + * class in logical expressions. It returns true if it + * contains a valid descriptor. + * + * An implicit int conversion operator returns the underlying + * file descriptor allowing objects of this type to be passed + * directly to APIs such as connect(), listen(), etc. + */ + class fd_up { + public: + fd_up() : fd(-1) {} + fd_up(int fd) : fd(fd) {} + fd_up(fd_up &&other) : fd(other.release()) {} + fd_up(fd_up const &) = delete; + + ~fd_up() { reset(); } + + int get() const { return (fd); } + + int release() + { + int oldfd = fd; + + fd = -1; + return (oldfd); + } + + void reset(int newfd = -1) + { + if (fd >= 0) + close(fd); + fd = newfd; + } + + fd_up &operator=(fd_up &&other) noexcept + { + if (this == &other) + return *this; + + reset(other.release()); + return *this; + } + + fd_up &operator=(fd_up const &) = delete; + + fd_up &operator=(int newfd) + { + reset(newfd); + return *this; + } + + explicit operator bool() const { return fd >= 0; } + operator int() const { return fd; } + private: + int fd; + }; + + /* + * malloc_up<T> is a std::unique_ptr<> which uses free() to + * destroy the wrapped pointer. This can be used to wrap + * pointers allocated implicitly by malloc() such as those + * returned by strdup(). + */ + template <class T> + struct free_deleter { + void operator() (T *p) const + { + std::free(p); + } + }; + + template <class T> + using malloc_up = std::unique_ptr<T, free_deleter<T>>; + + /* + * nvlist_up is a std::unique_ptr<> for nvlist_t objects which + * uses nvlist_destroy() to destroy the wrapped pointer. + */ + struct nvlist_deleter { + void operator() (nvlist_t *nvl) const + { + nvlist_destroy(nvl); + } + }; + + using nvlist_up = std::unique_ptr<nvlist_t, nvlist_deleter>; + + /* + * A wrapper class for the pidfile_* API. The destructor + * calls pidfile_remove() when an object is destroyed. This + * class is similar to std::unique_ptr<> in that it retains + * exclusive ownership of the pidfh object. + * + * In addition to release() and reset methods(), write(), + * close(), and fileno() methods are provided as wrappers for + * pidfile_*. + */ + class pidfile { + public: + pidfile() = default; + pidfile(struct pidfh *pfh) : pfh(pfh) {} + pidfile(pidfile &&other) : pfh(other.release()) {} + pidfile(pidfile const &) = delete; + + ~pidfile() { reset(); } + + struct pidfh *release() + { + struct pidfh *oldpfh = pfh; + + pfh = nullptr; + return (oldpfh); + } + + void reset(struct pidfh *newpfh = nullptr) + { + if (pfh != nullptr) + pidfile_remove(pfh); + pfh = newpfh; + } + + int write() + { + return (pidfile_write(pfh)); + } + + int close() + { + int rv = pidfile_close(pfh); + if (rv == 0) + pfh = nullptr; + return (rv); + } + + int fileno() + { + return (pidfile_fileno(pfh)); + } + + pidfile &operator=(pidfile &&other) noexcept + { + if (this == &other) + return *this; + reset(other.release()); + return *this; + } + + pidfile &operator=(pidfile const &) = delete; + + pidfile &operator=(struct pidfh *newpfh) + { + reset(newpfh); + return *this; + } + + explicit operator bool() const { return pfh != nullptr; } + private: + struct pidfh *pfh = nullptr; + }; + + /* + * Returns a std::string containing the same output as + * sprintf(). Throws std::bad_alloc if an error occurs. + */ + std::string stringf(const char *fmt, ...) __printflike(1, 2); + std::string stringf(const char *fmt, std::va_list ap); +} + +#endif /* !__LIBUTILPP_HH__ */ diff --git a/lib/libutil++/stringf.cc b/lib/libutil++/stringf.cc new file mode 100644 index 000000000000..8c24167d70ac --- /dev/null +++ b/lib/libutil++/stringf.cc @@ -0,0 +1,57 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Chelsio Communications, Inc. + * Written by: John Baldwin <jhb@FreeBSD.org> + */ + +#include <cstdarg> +#include <cstdio> +#include <string> + +#include "libutil++.hh" + +static int +stringf_write(void *cookie, const char *buf, int len) +{ + std::string *str = reinterpret_cast<std::string *>(cookie); + try { + str->append(buf, len); + } catch (std::bad_alloc) { + errno = ENOMEM; + return (-1); + } catch (std::length_error) { + errno = EFBIG; + return (-1); + } + return (len); +} + +std::string +freebsd::stringf(const char *fmt, va_list ap) +{ + std::string str; + freebsd::FILE_up fp(fwopen(reinterpret_cast<void *>(&str), + stringf_write)); + + vfprintf(fp.get(), fmt, ap); + + if (ferror(fp.get())) + throw std::bad_alloc(); + fp.reset(nullptr); + + return str; +} + +std::string +freebsd::stringf(const char *fmt, ...) +{ + std::va_list ap; + std::string str; + + va_start(ap, fmt); + str = freebsd::stringf(fmt, ap); + va_end(ap); + + return str; +} diff --git a/lib/libutil++/tests/Makefile b/lib/libutil++/tests/Makefile new file mode 100644 index 000000000000..e7720d122f36 --- /dev/null +++ b/lib/libutil++/tests/Makefile @@ -0,0 +1,12 @@ +PACKAGE= tests + +ATF_TESTS_CXX+= pidfile_test +ATF_TESTS_CXX+= stringf_test +ATF_TESTS_CXX+= up_test + +CFLAGS+= -I${SRCTOP}/lib/libutil++ +LIBADD+= util++ + +LIBADD.pidfile_test+= util + +.include <bsd.test.mk> diff --git a/lib/libutil++/tests/pidfile_test.cc b/lib/libutil++/tests/pidfile_test.cc new file mode 100644 index 000000000000..067f10e8fab8 --- /dev/null +++ b/lib/libutil++/tests/pidfile_test.cc @@ -0,0 +1,44 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Chelsio Communications, Inc. + * Written by: John Baldwin <jhb@FreeBSD.org> + */ + +#include <atf-c++.hpp> +#include <sys/stat.h> +#include <libutil.h> + +#include <libutil++.hh> + +ATF_TEST_CASE_WITHOUT_HEAD(basic); +ATF_TEST_CASE_BODY(basic) +{ + pid_t other; + struct pidfh *pfh = pidfile_open("test_pidfile", 0600, &other); + ATF_REQUIRE(pfh != nullptr); + ATF_REQUIRE(pidfile_fileno(pfh) >= 0); + + struct stat sb; + ATF_REQUIRE(fstat(pidfile_fileno(pfh), &sb) == 0); + ATF_REQUIRE_EQ(0, sb.st_size); + + freebsd::pidfile pf(pfh); + ATF_REQUIRE_EQ(pidfile_fileno(pfh), pf.fileno()); + + ATF_REQUIRE(pf.write() == 0); + + ATF_REQUIRE(fstat(pf.fileno(), &sb) == 0); + ATF_REQUIRE(sb.st_size > 0); + + ATF_REQUIRE(pf.close() == 0); + ATF_REQUIRE(pf.fileno() == -1); + ATF_REQUIRE_EQ(EDOOFUS, errno); + + ATF_REQUIRE(unlink("test_pidfile") == 0); +} + +ATF_INIT_TEST_CASES(tcs) +{ + ATF_ADD_TEST_CASE(tcs, basic); +} diff --git a/lib/libutil++/tests/stringf_test.cc b/lib/libutil++/tests/stringf_test.cc new file mode 100644 index 000000000000..5b8ef4ad54a9 --- /dev/null +++ b/lib/libutil++/tests/stringf_test.cc @@ -0,0 +1,52 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Chelsio Communications, Inc. + * Written by: John Baldwin <jhb@FreeBSD.org> + */ + +#include <atf-c++.hpp> +#include <stdarg.h> +#include <stdio.h> + +#include <libutil++.hh> + +ATF_TEST_CASE_WITHOUT_HEAD(basic); +ATF_TEST_CASE_BODY(basic) +{ + ATF_REQUIRE_EQ("foo", freebsd::stringf("foo")); + ATF_REQUIRE_EQ("bar", freebsd::stringf("%s", "bar")); + ATF_REQUIRE_EQ("42", freebsd::stringf("%u", 42)); + ATF_REQUIRE_EQ("0xdeadbeef", freebsd::stringf("%#x", 0xdeadbeef)); + ATF_REQUIRE_EQ("", freebsd::stringf("")); + ATF_REQUIRE_EQ("this is a test", freebsd::stringf("this %s test", + "is a")); +} + +static std::string +stringv(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + std::string str = freebsd::stringf(fmt, ap); + va_end(ap); + return (str); +} + +ATF_TEST_CASE_WITHOUT_HEAD(va_list); +ATF_TEST_CASE_BODY(va_list) +{ + ATF_REQUIRE_EQ("foo", stringv("foo")); + ATF_REQUIRE_EQ("bar", stringv("%s", "bar")); + ATF_REQUIRE_EQ("42", stringv("%u", 42)); + ATF_REQUIRE_EQ("0xdeadbeef", stringv("%#x", 0xdeadbeef)); + ATF_REQUIRE_EQ("", stringv("")); + ATF_REQUIRE_EQ("this is a test", stringv("this %s test", "is a")); +} + +ATF_INIT_TEST_CASES(tcs) +{ + ATF_ADD_TEST_CASE(tcs, basic); + ATF_ADD_TEST_CASE(tcs, va_list); +} diff --git a/lib/libutil++/tests/up_test.cc b/lib/libutil++/tests/up_test.cc new file mode 100644 index 000000000000..3f344054c334 --- /dev/null +++ b/lib/libutil++/tests/up_test.cc @@ -0,0 +1,33 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Chelsio Communications, Inc. + * Written by: John Baldwin <jhb@FreeBSD.org> + */ + +#include <atf-c++.hpp> +#include <libutil.h> + +#include <libutil++.hh> + +ATF_TEST_CASE_WITHOUT_HEAD(FILE_up); +ATF_TEST_CASE_BODY(FILE_up) +{ + FILE *fp = fopen("/dev/null", "r"); + ATF_REQUIRE(fp != NULL); + ATF_REQUIRE(fileno(fp) != -1); + + freebsd::FILE_up f(fp); + ATF_REQUIRE_EQ(fileno(fp), fileno(f.get())); + + f.reset(); + ATF_REQUIRE_EQ(f.get(), nullptr); + + ATF_REQUIRE_EQ(-1, fileno(fp)); + ATF_REQUIRE_EQ(EBADF, errno); +} + +ATF_INIT_TEST_CASES(tcs) +{ + ATF_ADD_TEST_CASE(tcs, FILE_up); +} diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index 12ac623aec6b..f8c566ca731a 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -32,74 +32,123 @@ CFLAGS+= -I${.CURDIR} -I${SRCTOP}/lib/libc/gen/ VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map -MAN+= cpuset.3 expand_number.3 flopen.3 fparseln.3 ftime.3 getlocalbase.3 \ - hexdump.3 humanize_number.3 kinfo_getallproc.3 kinfo_getfile.3 \ - kinfo_getproc.3 kinfo_getvmmap.3 kinfo_getvmobject.3 kld.3 \ - login_auth.3 login_cap.3 \ - login_class.3 login_ok.3 login_times.3 login_tty.3 mntopts.3 \ - pidfile.3 \ - property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \ - _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 -MAN+= login.conf.5 +MAN+= cpuset.3 +MLINKS+=cpuset.3 cpuset_parselist.3 MLINKS+=cpuset.3 domainset_parselist.3 +MAN+= expand_number.3 +MAN+= flopen.3 MLINKS+=flopen.3 flopenat.3 -MLINKS+=kld.3 kld_isloaded.3 kld.3 kld_load.3 -MLINKS+=login_auth.3 auth_cat.3 login_auth.3 auth_checknologin.3 -MLINKS+=login_cap.3 login_close.3 login_cap.3 login_getcapbool.3 \ - login_cap.3 login_getcaplist.3 login_cap.3 login_getcapnum.3 \ - login_cap.3 login_getcapsize.3 login_cap.3 login_getcapstr.3 \ - login_cap.3 login_getcaptime.3 login_cap.3 login_getclass.3 \ - login_cap.3 login_getclassbyname.3 login_cap.3 login_getpath.3 \ - login_cap.3 login_getpwclass.3 login_cap.3 login_getstyle.3 \ - login_cap.3 login_getuserclass.3 login_cap.3 login_setcryptfmt.3 -MLINKS+=login_class.3 setclasscontext.3 login_class.3 setclassenvironment.3 \ - login_class.3 setclassresources.3 login_class.3 setusercontext.3 -MLINKS+=login_ok.3 auth_hostok.3 login_ok.3 auth_timeok.3 \ - login_ok.3 auth_ttyok.3 -MLINKS+=login_times.3 in_lt.3 login_times.3 in_ltm.3 \ - login_times.3 in_ltms.3 \ - login_times.3 in_lts.3 \ - login_times.3 parse_lt.3 -MLINKS+=mntopts.3 getmntopts.3 \ - mntopts.3 getmntpoint.3 \ - mntopts.3 chkdoreload.3 \ - mntopts.3 build_iovec.3 \ - mntopts.3 build_iovec_argf.3 \ - mntopts.3 free_iovec.3 \ - mntopts.3 checkpath.3 \ - mntopts.3 rmslashes.3 -MLINKS+=pidfile.3 pidfile_close.3 \ - pidfile.3 pidfile_fileno.3 \ - pidfile.3 pidfile_open.3 \ - pidfile.3 pidfile_remove.3 \ - pidfile.3 pidfile_write.3 -MLINKS+=property.3 property_find.3 property.3 properties_free.3 +MAN+= fparseln.3 +MAN+= ftime.3 +MAN+= getlocalbase.3 +MAN+= hexdump.3 +MAN+= humanize_number.3 +MAN+= kinfo_getallproc.3 +MAN+= kinfo_getfile.3 +MAN+= kinfo_getproc.3 +MAN+= kinfo_getvmmap.3 +MAN+= kinfo_getvmobject.3 +MAN+= kld.3 +MLINKS+=kld.3 kld_isloaded.3 +MLINKS+=kld.3 kld_load.3 +MAN+= login_auth.3 +MLINKS+=login_auth.3 auth_cat.3 +MLINKS+=login_auth.3 auth_checknologin.3 +MAN+= login_cap.3 +MLINKS+=login_cap.3 login_close.3 +MLINKS+=login_cap.3 login_getcapbool.3 +MLINKS+=login_cap.3 login_getcapenum.3 +MLINKS+=login_cap.3 login_getcaplist.3 +MLINKS+=login_cap.3 login_getcapnum.3 +MLINKS+=login_cap.3 login_getcapsize.3 +MLINKS+=login_cap.3 login_getcapstr.3 +MLINKS+=login_cap.3 login_getcaptime.3 +MLINKS+=login_cap.3 login_getclass.3 +MLINKS+=login_cap.3 login_getclassbyname.3 +MLINKS+=login_cap.3 login_getpath.3 +MLINKS+=login_cap.3 login_getpwclass.3 +MLINKS+=login_cap.3 login_getstyle.3 +MLINKS+=login_cap.3 login_getuserclass.3 +MLINKS+=login_cap.3 login_setcryptfmt.3 +MAN+= login_class.3 +MLINKS+=login_class.3 setclasscontext.3 +MLINKS+=login_class.3 setclasscpumask.3 +MLINKS+=login_class.3 setclassenvironment.3 +MLINKS+=login_class.3 setclassresources.3 +MLINKS+=login_class.3 setusercontext.3 +MAN+= login_ok.3 +MLINKS+=login_ok.3 auth_hostok.3 +MLINKS+=login_ok.3 auth_timeok.3 +MLINKS+=login_ok.3 auth_ttyok.3 +MAN+= login_times.3 +MLINKS+=login_times.3 in_lt.3 +MLINKS+=login_times.3 in_ltm.3 +MLINKS+=login_times.3 in_ltms.3 +MLINKS+=login_times.3 in_lts.3 +MLINKS+=login_times.3 parse_lt.3 +MAN+= login_tty.3 +MAN+= mntopts.3 +MLINKS+=mntopts.3 build_iovec.3 +MLINKS+=mntopts.3 build_iovec_argf.3 +MLINKS+=mntopts.3 checkpath.3 +MLINKS+=mntopts.3 chkdoreload.3 +MLINKS+=mntopts.3 free_iovec.3 +MLINKS+=mntopts.3 getmntopts.3 +MLINKS+=mntopts.3 getmntpoint.3 +MLINKS+=mntopts.3 rmslashes.3 +MAN+= pidfile.3 +MLINKS+=pidfile.3 pidfile_close.3 +MLINKS+=pidfile.3 pidfile_fileno.3 +MLINKS+=pidfile.3 pidfile_open.3 +MLINKS+=pidfile.3 pidfile_remove.3 +MLINKS+=pidfile.3 pidfile_signal.3 +MLINKS+=pidfile.3 pidfile_write.3 +MAN+= property.3 +MLINKS+=property.3 property_find.3 +MLINKS+=property.3 properties_free.3 MLINKS+=property.3 properties_read.3 -MLINKS+=pty.3 forkpty.3 pty.3 openpty.3 -MLINKS+=quotafile.3 quota_close.3 \ - quotafile.3 quota_fsname.3 \ - quotafile.3 quota_open.3 \ - quotafile.3 quota_qfname.3 \ - quotafile.3 quota_read.3 \ - quotafile.3 quota_statfs.3 \ - quotafile.3 quota_write_limits.3 \ - quotafile.3 quota_write_usage.3 -MLINKS+=uucplock.3 uu_lock.3 uucplock.3 uu_lock_txfr.3 \ - uucplock.3 uu_lockerr.3 uucplock.3 uu_unlock.3 -MLINKS+=pw_util.3 pw_copy.3 \ - pw_util.3 pw_dup.3 \ - pw_util.3 pw_edit.3 \ - pw_util.3 pw_equal.3 \ - pw_util.3 pw_fini.3 \ - pw_util.3 pw_init.3 \ - pw_util.3 pw_make.3 \ - pw_util.3 pw_make_v7.3 \ - pw_util.3 pw_mkdb.3 \ - pw_util.3 pw_lock.3 \ - pw_util.3 pw_scan.3 \ - pw_util.3 pw_tempname.3 \ - pw_util.3 pw_tmp.3 -MLINKS+=cpuset.3 cpuset_parselist.3 +MAN+= pty.3 +MLINKS+=pty.3 forkpty.3 +MLINKS+=pty.3 openpty.3 +MAN+= pw_util.3 +MLINKS+=pw_util.3 pw_copy.3 +MLINKS+=pw_util.3 pw_dup.3 +MLINKS+=pw_util.3 pw_edit.3 +MLINKS+=pw_util.3 pw_equal.3 +MLINKS+=pw_util.3 pw_fini.3 +MLINKS+=pw_util.3 pw_init.3 +MLINKS+=pw_util.3 pw_initpwd.3 +MLINKS+=pw_util.3 pw_make.3 +MLINKS+=pw_util.3 pw_make_v7.3 +MLINKS+=pw_util.3 pw_mkdb.3 +MLINKS+=pw_util.3 pw_lock.3 +MLINKS+=pw_util.3 pw_scan.3 +MLINKS+=pw_util.3 pw_tempname.3 +MLINKS+=pw_util.3 pw_tmp.3 +MAN+= quotafile.3 +MLINKS+=quotafile.3 quota_check_path.3 +MLINKS+=quotafile.3 quota_close.3 +MLINKS+=quotafile.3 quota_convert.3 +MLINKS+=quotafile.3 quota_fsname.3 +MLINKS+=quotafile.3 quota_maxid.3 +MLINKS+=quotafile.3 quota_off.3 +MLINKS+=quotafile.3 quota_on.3 +MLINKS+=quotafile.3 quota_open.3 +MLINKS+=quotafile.3 quota_qfname.3 +MLINKS+=quotafile.3 quota_read.3 +MLINKS+=quotafile.3 quota_statfs.3 +MLINKS+=quotafile.3 quota_write_limits.3 +MLINKS+=quotafile.3 quota_write_usage.3 +MAN+= realhostname.3 +MAN+= realhostname_sa.3 +MAN+= _secure_path.3 +MAN+= trimdomain.3 +MAN+= uucplock.3 +MLINKS+=uucplock.3 uu_lock.3 +MLINKS+=uucplock.3 uu_lock_txfr.3 +MLINKS+=uucplock.3 uu_lockerr.3 +MLINKS+=uucplock.3 uu_unlock.3 +MAN+= login.conf.5 HAS_TESTS= SUBDIR.${MK_TESTS}+= tests diff --git a/lib/libutil/Symbol.map b/lib/libutil/Symbol.map index 8c8fff451cd1..2b28456f4406 100644 --- a/lib/libutil/Symbol.map +++ b/lib/libutil/Symbol.map @@ -13,6 +13,7 @@ FBSD_1.8 { cpuset_parselist; domainset_parselist; expand_number; + expand_unsigned; flopen; flopenat; forkpty; @@ -119,6 +120,14 @@ FBSD_1.8 { uu_lock; uu_lockerr; uu_unlock; + + /* + * login_setcryptfmt() uses crypt_set_format() from libcrypt. To + * avoid forcing a hard dependency on libcrypt, we provide a weak + * stub. Applications that use login_setcryptfmt() should link + * with libcrypt, whose crypt_set_format() will override the stub. + */ + crypt_set_format; }; FBSDprivate_1.0 { diff --git a/lib/libutil/expand_number.3 b/lib/libutil/expand_number.3 index 1b932400de69..b1833cedf406 100644 --- a/lib/libutil/expand_number.3 +++ b/lib/libutil/expand_number.3 @@ -24,11 +24,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 25, 2025 +.Dd August 6, 2025 .Dt EXPAND_NUMBER 3 .Os .Sh NAME -.Nm expand_number +.Nm expand_number , +.Nm expand_unsigned .Nd parse a number from human readable form .Sh LIBRARY .Lb libutil @@ -38,6 +39,10 @@ .Fo expand_number .Fa "const char *buf" "int64_t *num" .Fc +.Ft int +.Fo expand_unsigned +.Fa "const char *buf" "uint64_t *num" +.Fc .Sh DESCRIPTION The .Fn expand_number @@ -48,6 +53,17 @@ quantity in the location pointed to by its .Fa *num argument. .Pp +The +.Fn expand_unsigned +function is similar to +.Fn expand_number , +but accepts only positive numbers in the range +.Bq 0, Ns Dv UINT64_MAX . +.Pp +Both functions interpret the input +.Dq -0 +as 0. +.Pp The input string must consist of a decimal number, optionally preceded by a .Sq + @@ -81,20 +97,38 @@ is interpreted as 5, and .Dq 5kb is interpreted as 5,120). However, the usage of this suffix is discouraged. +.Pp +For backward compatibility reasons, if the compiler supports generic +selection, a macro is provided which automatically replaces calls to +.Fn expand_number +with calls to +.Fn expand_unsigned +if the type of the actual +.Va num +argument is compatible with +.Vt uint64_t * . .Sh RETURN VALUES .Rv -std .Sh ERRORS The .Fn expand_number -function will fail if: +and +.Fn expand_unsigned +functions will fail if: .Bl -tag -width Er .It Bq Er EINVAL The given string does not contain a valid number. .It Bq Er EINVAL An unrecognized suffix was encountered. .It Bq Er ERANGE -The given string represents a number which does not fit into a -.Vt int64_t . +The given string represents a number which does not fit into an +.Vt int64_t +(for +.Fn expand_number ) +or +.Vt uint64_t +(for +.Fn expand_unsigned ) . .El .Sh SEE ALSO .Xr humanize_number 3 @@ -103,3 +137,17 @@ The .Fn expand_number function first appeared in .Fx 6.3 . +The original implementation did not handle negative numbers correctly, +and it was switched to taking a +.Vt uint64_t * +and accepting only positive numbers in +.Fx 9.0 . +The +.Fn expand_unsigned +function was added, +and +.Fn expand_number +switched back to +.Vt int64_t * , +in +.Fx 15.0 . diff --git a/lib/libutil/expand_number.c b/lib/libutil/expand_number.c index f4c19d7867a3..a3313ba39d98 100644 --- a/lib/libutil/expand_number.c +++ b/lib/libutil/expand_number.c @@ -37,13 +37,12 @@ #include <stdbool.h> #include <stdint.h> -int -expand_number(const char *buf, int64_t *num) +static int +expand_impl(const char *buf, uint64_t *num, bool *neg) { char *endptr; uintmax_t number; unsigned int shift; - bool neg; int serrno; /* @@ -52,10 +51,10 @@ expand_number(const char *buf, int64_t *num) while (isspace((unsigned char)*buf)) buf++; if (*buf == '-') { - neg = true; + *neg = true; buf++; } else { - neg = false; + *neg = false; if (*buf == '+') buf++; } @@ -127,6 +126,22 @@ expand_number(const char *buf, int64_t *num) } number <<= shift; + *num = number; + return (0); +} + +int +(expand_number)(const char *buf, int64_t *num) +{ + uint64_t number; + bool neg; + + /* + * Parse the number. + */ + if (expand_impl(buf, &number, &neg) != 0) + return (-1); + /* * Apply the sign and check for overflow. */ @@ -146,3 +161,27 @@ expand_number(const char *buf, int64_t *num) return (0); } + +int +expand_unsigned(const char *buf, uint64_t *num) +{ + uint64_t number; + bool neg; + + /* + * Parse the number. + */ + if (expand_impl(buf, &number, &neg) != 0) + return (-1); + + /* + * Negative numbers are out of range. + */ + if (neg && number > 0) { + errno = ERANGE; + return (-1); + } + + *num = number; + return (0); +} diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h index d27262e44daf..9b5b2abe7f09 100644 --- a/lib/libutil/libutil.h +++ b/lib/libutil/libutil.h @@ -89,6 +89,14 @@ __BEGIN_DECLS void clean_environment(const char * const *_white, const char * const *_more_white); int expand_number(const char *_buf, int64_t *_num); +int expand_unsigned(const char *_buf, uint64_t *_num); +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ + __has_extension(c_generic_selections) +#define expand_number(_buf, _num) \ + _Generic((_num), \ + uint64_t *: expand_unsigned, \ + default: expand_number)((_buf), (_num)) +#endif int extattr_namespace_to_string(int _attrnamespace, char **_string); int extattr_string_to_namespace(const char *_string, int *_attrnamespace); int flopen(const char *_path, int _flags, ...); diff --git a/lib/libutil/pidfile.3 b/lib/libutil/pidfile.3 index c4786736d28f..d28d5ed8eccb 100644 --- a/lib/libutil/pidfile.3 +++ b/lib/libutil/pidfile.3 @@ -22,14 +22,16 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 10, 2020 +.Dd August 2, 2025 .Dt PIDFILE 3 .Os .Sh NAME .Nm pidfile_open , .Nm pidfile_write , .Nm pidfile_close , -.Nm pidfile_remove +.Nm pidfile_remove , +.Nm pidfile_fileno , +.Nm pidfile_signal .Nd "library for PID files handling" .Sh LIBRARY .Lb libutil @@ -45,6 +47,8 @@ .Fn pidfile_remove "struct pidfh *pfh" .Ft int .Fn pidfile_fileno "struct pidfh *pfh" +.Ft int +.Fn pidfile_signal "const char *path" "int sig" "pid_t *pidptr" .Sh DESCRIPTION The .Nm pidfile @@ -101,6 +105,26 @@ function closes and removes a pidfile. The .Fn pidfile_fileno function returns the file descriptor for the open pidfile. +.Pp +The +.Fn pidfile_signal +function looks for the pidfile specified by +.Va path , +and if it exists and is locked, sends the signal specified by +.Va sig +to the PID it contains. +If +.Va pidptr +is not +.Dv NULL , +the PID that was found in the pidfile is stored in the location it +points to. +Note that calling +.Fn pidfile_signal +with +.Va sig +set to zero is an effective way to verify the existence of a pidfile +and of the process that owns it. .Sh RETURN VALUES The .Fn pidfile_open @@ -125,6 +149,13 @@ and sets if a NULL .Vt pidfh is specified, or if the pidfile is no longer open. +.Pp +The +.Fn pidfile_signal +function returns 0 if it successfully signaled a process, and an +appropriate +.Va errno +value otherwise. .Sh EXAMPLES The following example shows in which order these functions should be used. Note that it is safe to pass @@ -132,7 +163,7 @@ Note that it is safe to pass to .Fn pidfile_write , .Fn pidfile_remove , -.Fn pidfile_close +.Fn pidfile_close , and .Fn pidfile_fileno functions. @@ -280,7 +311,28 @@ Improper function use. Probably called not from the process which used .Fn pidfile_open . .El +.Pp +The +.Fn pidfile_signal +function will fail if: +.Bl -tag -width Er +.It Bq Er ENOENT +The pidfile does not exist, or exists but is not locked. +.It Bq Er EDOM +The pidfile contains a negative number. +.El +.Pp +The +.Fn pidfile_signal +function may also fail and return any of the +.Va errno +values specified for the +.Fn pidfile_read +function and the +.Xr kill 2 +system call. .Sh SEE ALSO +.Xr kill 2 , .Xr open 2 , .Xr daemon 3 , .Xr flopen 3 @@ -288,11 +340,19 @@ Probably called not from the process which used The functions .Fn pidfile_open , .Fn pidfile_write , -.Fn pidfile_close +.Fn pidfile_close , and .Fn pidfile_remove first appeared in .Fx 5.5 . +The +.Fn pidfile_fileno +function was added in +.Fx 9.1 . +The +.Fn pidfile_signal +function was added in +.Fx 14.0 . .Sh AUTHORS .An -nosplit The diff --git a/lib/libutil/pw_util.3 b/lib/libutil/pw_util.3 index ed05818cd16a..a6bb71600441 100644 --- a/lib/libutil/pw_util.3 +++ b/lib/libutil/pw_util.3 @@ -31,6 +31,7 @@ .Nm pw_edit , .Nm pw_equal , .Nm pw_fini , +.Nm pw_initpwd , .Nm pw_init , .Nm pw_make , .Nm pw_make_v7 , diff --git a/lib/libutil/tests/expand_number_test.c b/lib/libutil/tests/expand_number_test.c index 8e7458994de4..8ff56e1ed01f 100644 --- a/lib/libutil/tests/expand_number_test.c +++ b/lib/libutil/tests/expand_number_test.c @@ -206,10 +206,85 @@ ATF_TC_BODY(expand_number__bad, tp) require_error(" + 1", EINVAL); } +ATF_TC_WITHOUT_HEAD(expand_unsigned); +ATF_TC_BODY(expand_unsigned, tp) +{ + static struct tc { + const char *str; + uint64_t num; + int error; + } tcs[] = { + { "0", 0, 0 }, + { "+0", 0, 0 }, + { "-0", 0, 0 }, + { "1", 1, 0 }, + { "+1", 1, 0 }, + { "-1", 0, ERANGE }, + { "18446744073709551615", UINT64_MAX, 0 }, + { "+18446744073709551615", UINT64_MAX, 0 }, + { "-18446744073709551615", 0, ERANGE }, + { 0 }, + }; + struct tc *tc; + uint64_t num; + int error, ret; + + for (tc = tcs; tc->str != NULL; tc++) { + ret = expand_number(tc->str, &num); + error = errno; + if (tc->error == 0) { + ATF_REQUIRE_EQ_MSG(0, ret, + "%s ret = %d", tc->str, ret); + ATF_REQUIRE_EQ_MSG(tc->num, num, + "%s num = %ju", tc->str, (uintmax_t)num); + } else { + ATF_REQUIRE_EQ_MSG(-1, ret, + "%s ret = %d", tc->str, ret); + ATF_REQUIRE_EQ_MSG(tc->error, error, + "%s errno = %d", tc->str, error); + } + } +} + +ATF_TC_WITHOUT_HEAD(expand_generic); +ATF_TC_BODY(expand_generic, tp) +{ + uint64_t uint64; + int64_t int64; + size_t size; + off_t off; + + ATF_REQUIRE_EQ(0, expand_number("18446744073709551615", &uint64)); + ATF_REQUIRE_EQ(UINT64_MAX, uint64); + ATF_REQUIRE_EQ(-1, expand_number("-1", &uint64)); + ATF_REQUIRE_EQ(ERANGE, errno); + + ATF_REQUIRE_EQ(0, expand_number("9223372036854775807", &int64)); + ATF_REQUIRE_EQ(INT64_MAX, int64); + ATF_REQUIRE_EQ(-1, expand_number("9223372036854775808", &int64)); + ATF_REQUIRE_EQ(ERANGE, errno); + ATF_REQUIRE_EQ(0, expand_number("-9223372036854775808", &int64)); + ATF_REQUIRE_EQ(INT64_MIN, int64); + + ATF_REQUIRE_EQ(0, expand_number("18446744073709551615", &size)); + ATF_REQUIRE_EQ(UINT64_MAX, size); + ATF_REQUIRE_EQ(-1, expand_number("-1", &size)); + ATF_REQUIRE_EQ(ERANGE, errno); + + ATF_REQUIRE_EQ(0, expand_number("9223372036854775807", &off)); + ATF_REQUIRE_EQ(INT64_MAX, off); + ATF_REQUIRE_EQ(-1, expand_number("9223372036854775808", &off)); + ATF_REQUIRE_EQ(ERANGE, errno); + ATF_REQUIRE_EQ(0, expand_number("-9223372036854775808", &off)); + ATF_REQUIRE_EQ(INT64_MIN, off); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, expand_number__ok); ATF_TP_ADD_TC(tp, expand_number__bad); + ATF_TP_ADD_TC(tp, expand_unsigned); + ATF_TP_ADD_TC(tp, expand_generic); return (atf_no_error()); } diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 46473b92a637..d4829b17cebb 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -268,7 +268,7 @@ typedef struct Struct_Obj_Entry { bool unholdfree : 1; /* unmap upon last unhold */ bool doomed : 1; /* Object cannot be referenced */ - MD_OBJ_ENTRY; + MD_OBJ_ENTRY struct link_map linkmap; /* For GDB and dlinfo() */ Objlist dldags; /* Object belongs to these dlopened DAGs (%) */ diff --git a/release/amd64/make-memstick.sh b/release/amd64/make-memstick.sh index cec4b27b5b96..770b128fd9f9 100755 --- a/release/amd64/make-memstick.sh +++ b/release/amd64/make-memstick.sh @@ -62,11 +62,9 @@ fi # Make an ESP in a file. espfilename=$(mktemp /tmp/efiboot.XXXXXX) if [ -f "${BASEBITSDIR}/boot/loader_ia32.efi" ]; then - make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi bootx64 \ - ${BASEBITSDIR}/boot/loader_ia32.efi bootia32 -else - make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi + extra_args="${BASEBITSDIR}/boot/loader_ia32.efi bootia32" fi +make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi bootx64 ${extra_args} ${MKIMG} -s mbr \ -b ${BASEBITSDIR}/boot/mbr \ diff --git a/release/amd64/mkisoimages.sh b/release/amd64/mkisoimages.sh index 8f7163e05261..01677ae787f9 100644 --- a/release/amd64/mkisoimages.sh +++ b/release/amd64/mkisoimages.sh @@ -54,11 +54,9 @@ if [ "$1" = "-b" ]; then # ESP file size in KB. espsize="2048" if [ -f "${BASEBITSDIR}/boot/loader_ia32.efi" ]; then - make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi bootx64 \ - ${BASEBITSDIR}/boot/loader_ia32.efi bootia32 - else - make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi + extra_args="${BASEBITSDIR}/boot/loader_ia32.efi bootia32" fi + make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi bootx64 ${extra_args} bootable="$bootable -o bootimage=i386;${espfilename} -o no-emul-boot -o platformid=efi" shift diff --git a/release/packages/ucl/bsdconfig-all.ucl b/release/packages/ucl/bsdconfig-all.ucl new file mode 100644 index 000000000000..7ffe7ccff9d8 --- /dev/null +++ b/release/packages/ucl/bsdconfig-all.ucl @@ -0,0 +1,5 @@ +comment = "System configuration utility" +desc = <<EOD +bsdconfig(8) and bsdinstall(8) provide graphical interfaces to configure the +system and to install new instances of the system, e.g. to create jails. +EOD diff --git a/release/packages/ucl/libutil++-all.ucl b/release/packages/ucl/libutil++-all.ucl new file mode 100644 index 000000000000..dfd77215dbc5 --- /dev/null +++ b/release/packages/ucl/libutil++-all.ucl @@ -0,0 +1,4 @@ +comment = "C++ utility library" +desc = <<EOD +libutil++ contains various C++ utility classes used by the base system. +EOD diff --git a/sbin/hastd/nv.c b/sbin/hastd/nv.c index 0730e4f2a794..16ab95cf0dc6 100644 --- a/sbin/hastd/nv.c +++ b/sbin/hastd/nv.c @@ -97,7 +97,7 @@ struct nvhdr { } __packed; #define NVH_DATA(nvh) ((unsigned char *)nvh + NVH_HSIZE(nvh)) #define NVH_HSIZE(nvh) \ - (sizeof(struct nvhdr) + roundup2((nvh)->nvh_namesize, 8)) + (sizeof(struct nvhdr) + roundup2((size_t)(nvh)->nvh_namesize, 8)) #define NVH_DSIZE(nvh) \ (((nvh)->nvh_type & NV_ORDER_MASK) == NV_ORDER_HOST ? \ (nvh)->nvh_dsize : \ @@ -247,11 +247,8 @@ nv_validate(struct nv *nv, size_t *extrap) break; } dsize = NVH_DSIZE(nvh); - if (dsize == 0) { - error = EINVAL; - break; - } - if (size < NVH_SIZE(nvh)) { + if (roundup2(dsize, 8) == 0 || + roundup2(dsize, 8) > size - NVH_HSIZE(nvh)) { error = EINVAL; break; } diff --git a/sbin/ifconfig/ifbridge.c b/sbin/ifconfig/ifbridge.c index 1a8c4c6e9c3e..eff443447c13 100644 --- a/sbin/ifconfig/ifbridge.c +++ b/sbin/ifconfig/ifbridge.c @@ -60,6 +60,10 @@ #include "ifconfig.h" +static int parse_vlans(ifbvlan_set_t *set, const char *str); +static int get_val(const char *cp, u_long *valp); +static int get_vlan_id(const char *cp, ether_vlanid_t *valp); + static const char *stpstates[] = { STP_STATES }; static const char *stpproto[] = { STP_PROTOS }; static const char *stproles[] = { STP_ROLES }; @@ -190,6 +194,21 @@ print_vlans(ifbvlan_set_t *vlans) } } +static char const * +vlan_proto_name(uint16_t proto) +{ + switch (proto) { + case 0: + return "none"; + case ETHERTYPE_VLAN: + return "802.1q"; + case ETHERTYPE_QINQ: + return "802.1ad"; + default: + return "unknown"; + } +} + static void bridge_status(if_ctx *ctx) { @@ -223,6 +242,11 @@ bridge_status(if_ctx *ctx) params->ifbop_root_path_cost, params->ifbop_root_port & 0xfff); + printb("\tbridge flags", bridge->flags, IFBRFBITS); + if (bridge->defpvid) + printf(" defuntagged=%u", (unsigned) bridge->defpvid); + printf("\n"); + prefix = "\tmember: "; pad = "\t "; for (size_t i = 0; i < bridge->members_count; ++i) { @@ -256,6 +280,9 @@ bridge_status(if_ctx *ctx) else printf(" <unknown state %d>", state); } + if (member->ifbr_vlanproto != 0) + printf(" vlan protocol %s", + vlan_proto_name(member->ifbr_vlanproto)); if (member->ifbr_pvid != 0) printf(" untagged %u", (unsigned)member->ifbr_pvid); print_vlans(&bridge->member_vlans[i]); @@ -265,15 +292,62 @@ bridge_status(if_ctx *ctx) ifconfig_bridge_free_bridge_status(bridge); } -static void -setbridge_add(if_ctx *ctx, const char *val, int dummy __unused) +static int +setbridge_add(if_ctx *ctx, int argc, const char *const *argv) { struct ifbreq req; + struct ifbif_vlan_req vlreq; + int oargc = argc; memset(&req, 0, sizeof(req)); - strlcpy(req.ifbr_ifsname, val, sizeof(req.ifbr_ifsname)); + memset(&vlreq, 0, sizeof(vlreq)); + + if (argc < 1) + errx(1, "usage: addm <interface> [opts ...]"); + + strlcpy(req.ifbr_ifsname, argv[0], sizeof(req.ifbr_ifsname)); + --argc; ++argv; + + while (argc) { + if (strcmp(argv[0], "untagged") == 0) { + if (argc < 2) + errx(1, "usage: untagged <vlan id>"); + + if (get_vlan_id(argv[1], &req.ifbr_pvid) < 0) + errx(1, "invalid VLAN identifier: %s", argv[1]); + + argc -= 2; + argv += 2; + } else if (strcmp(argv[0], "tagged") == 0) { + if (argc < 2) + errx(1, "usage: tagged <vlan set>"); + + vlreq.bv_op = BRDG_VLAN_OP_SET; + strlcpy(vlreq.bv_ifname, req.ifbr_ifsname, + sizeof(vlreq.bv_ifname)); + if (parse_vlans(&vlreq.bv_set, argv[1]) != 0) + errx(1, "invalid vlan set: %s", argv[1]); + + argc -= 2; + argv += 2; + } else { + break; + } + } + if (do_cmd(ctx, BRDGADD, &req, sizeof(req), 1) < 0) - err(1, "BRDGADD %s", val); + err(1, "BRDGADD %s", req.ifbr_ifsname); + + if (req.ifbr_pvid != 0 && + do_cmd(ctx, BRDGSIFPVID, &req, sizeof(req), 1) < 0) + err(1, "BRDGSIFPVID %s %u", req.ifbr_ifsname, + (unsigned)req.ifbr_pvid); + + if (vlreq.bv_op != 0 && + do_cmd(ctx, BRDGSIFVLANSET, &vlreq, sizeof(vlreq), 1) < 0) + err(1, "BRDGSIFVLANSET %s", req.ifbr_ifsname); + + return (oargc - argc); } static void @@ -514,7 +588,6 @@ setbridge_deladdr(if_ctx *ctx, int argc, const char *const *argv) static void setbridge_addr(if_ctx *ctx, const char *val __unused, int dummy __unused) { - bridge_addresses(ctx, ""); } @@ -662,7 +735,7 @@ setbridge_ifpathcost(if_ctx *ctx, const char *ifn, const char *cost) } static void -setbridge_untagged(if_ctx *ctx, const char *ifn, const char *vlanid) +setbridge_ifuntagged(if_ctx *ctx, const char *ifn, const char *vlanid) { struct ifbreq req; @@ -677,7 +750,7 @@ setbridge_untagged(if_ctx *ctx, const char *ifn, const char *vlanid) } static void -unsetbridge_untagged(if_ctx *ctx, const char *ifn, int dummy __unused) +unsetbridge_ifuntagged(if_ctx *ctx, const char *ifn, int dummy __unused) { struct ifbreq req; @@ -735,18 +808,6 @@ unsetbridge_private(if_ctx *ctx, const char *val, int dummy __unused) do_bridgeflag(ctx, val, IFBIF_PRIVATE, 0); } -static void -setbridge_vlanfilter(if_ctx *ctx, const char *val, int dummy __unused) -{ - do_bridgeflag(ctx, val, IFBIF_VLANFILTER, 1); -} - -static void -unsetbridge_vlanfilter(if_ctx *ctx, const char *val, int dummy __unused) -{ - do_bridgeflag(ctx, val, IFBIF_VLANFILTER, 0); -} - static int parse_vlans(ifbvlan_set_t *set, const char *str) { @@ -821,25 +882,109 @@ set_bridge_vlanset(if_ctx *ctx, const char *ifn, const char *vlans, int op) } static void -setbridge_tagged(if_ctx *ctx, const char *ifn, const char *vlans) +setbridge_iftagged(if_ctx *ctx, const char *ifn, const char *vlans) { set_bridge_vlanset(ctx, ifn, vlans, BRDG_VLAN_OP_SET); } static void -addbridge_tagged(if_ctx *ctx, const char *ifn, const char *vlans) +addbridge_iftagged(if_ctx *ctx, const char *ifn, const char *vlans) { set_bridge_vlanset(ctx, ifn, vlans, BRDG_VLAN_OP_ADD); } static void -delbridge_tagged(if_ctx *ctx, const char *ifn, const char *vlans) +delbridge_iftagged(if_ctx *ctx, const char *ifn, const char *vlans) { set_bridge_vlanset(ctx, ifn, vlans, BRDG_VLAN_OP_DEL); } +static void +setbridge_flags(if_ctx *ctx, const char *val __unused, int newflags) +{ + struct ifbrparam req; + + if (do_cmd(ctx, BRDGGFLAGS, &req, sizeof(req), 0) < 0) + err(1, "BRDGGFLAGS"); + + req.ifbrp_flags |= (uint32_t)newflags; + + if (do_cmd(ctx, BRDGSFLAGS, &req, sizeof(req), 1) < 0) + err(1, "BRDGSFLAGS"); +} + +static void +unsetbridge_flags(if_ctx *ctx, const char *val __unused, int newflags) +{ + struct ifbrparam req; + + if (do_cmd(ctx, BRDGGFLAGS, &req, sizeof(req), 0) < 0) + err(1, "BRDGGFLAGS"); + + req.ifbrp_flags &= ~(uint32_t)newflags; + + if (do_cmd(ctx, BRDGSFLAGS, &req, sizeof(req), 1) < 0) + err(1, "BRDGSFLAGS"); +} + +static void +setbridge_defuntagged(if_ctx *ctx, const char *arg, int dummy __unused) +{ + struct ifbrparam req; + + memset(&req, 0, sizeof(req)); + if (get_vlan_id(arg, &req.ifbrp_defpvid) < 0) + errx(1, "invalid vlan id: %s", arg); + + if (do_cmd(ctx, BRDGSDEFPVID, &req, sizeof(req), 1) < 0) + err(1, "BRDGSDEFPVID"); +} + +static void +unsetbridge_defuntagged(if_ctx *ctx, const char *val __unused, int dummy __unused) +{ + struct ifbrparam req; + + memset(&req, 0, sizeof(req)); + req.ifbrp_defpvid = 0; + + if (do_cmd(ctx, BRDGSDEFPVID, &req, sizeof(req), 1) < 0) + err(1, "BRDGSDEFPVID"); +} + +static void +setbridge_qinq(if_ctx *ctx, const char *val, int dummy __unused) +{ + do_bridgeflag(ctx, val, IFBIF_QINQ, 1); +} + +static void +unsetbridge_qinq(if_ctx *ctx, const char *val, int dummy __unused) +{ + do_bridgeflag(ctx, val, IFBIF_QINQ, 0); +} + +static void +setbridge_ifvlanproto(if_ctx *ctx, const char *ifname, const char *proto) +{ + struct ifbreq req; + + memset(&req, 0, sizeof(req)); + strlcpy(req.ifbr_ifsname, ifname, sizeof(req.ifbr_ifsname)); + + if (strcmp(proto, "802.1q") == 0) + req.ifbr_vlanproto = ETHERTYPE_VLAN; + else if (strcmp(proto, "802.1ad") == 0) + req.ifbr_vlanproto = ETHERTYPE_QINQ; + else + errx(1, "unrecognised VLAN protocol: %s", proto); + + if (do_cmd(ctx, BRDGSIFVLANPROTO, &req, sizeof(req), 1) < 0) + err(1, "BRDGSIFVLANPROTO"); +} + static struct cmd bridge_cmds[] = { - DEF_CMD_ARG("addm", setbridge_add), + DEF_CMD_VARG("addm", setbridge_add), DEF_CMD_ARG("deletem", setbridge_delete), DEF_CMD_ARG("discover", setbridge_discover), DEF_CMD_ARG("-discover", unsetbridge_discover), @@ -874,17 +1019,29 @@ static struct cmd bridge_cmds[] = { DEF_CMD_ARG2("ifpriority", setbridge_ifpriority), DEF_CMD_ARG2("ifpathcost", setbridge_ifpathcost), DEF_CMD_ARG2("ifmaxaddr", setbridge_ifmaxaddr), - DEF_CMD_ARG("vlanfilter", setbridge_vlanfilter), - DEF_CMD_ARG("-vlanfilter", unsetbridge_vlanfilter), - DEF_CMD_ARG2("untagged", setbridge_untagged), - DEF_CMD_ARG("-untagged", unsetbridge_untagged), - DEF_CMD_ARG2("tagged", setbridge_tagged), - DEF_CMD_ARG2("+tagged", addbridge_tagged), - DEF_CMD_ARG2("-tagged", delbridge_tagged), + DEF_CMD_ARG2("ifuntagged", setbridge_ifuntagged), + DEF_CMD_ARG("-ifuntagged", unsetbridge_ifuntagged), + DEF_CMD_ARG2("iftagged", setbridge_iftagged), + DEF_CMD_ARG2("+iftagged", addbridge_iftagged), + DEF_CMD_ARG2("-iftagged", delbridge_iftagged), + DEF_CMD_ARG2("ifvlanproto", setbridge_ifvlanproto), DEF_CMD_ARG("timeout", setbridge_timeout), DEF_CMD_ARG("private", setbridge_private), DEF_CMD_ARG("-private", unsetbridge_private), + DEF_CMD("vlanfilter", (int32_t)IFBRF_VLANFILTER, + setbridge_flags), + DEF_CMD("-vlanfilter", (int32_t)IFBRF_VLANFILTER, + unsetbridge_flags), + DEF_CMD_ARG("defuntagged", setbridge_defuntagged), + DEF_CMD("-defuntagged", 0, unsetbridge_defuntagged), + DEF_CMD("defqinq", (int32_t)IFBRF_DEFQINQ, + setbridge_flags), + DEF_CMD("-defqinq", (int32_t)IFBRF_DEFQINQ, + unsetbridge_flags), + DEF_CMD_ARG("qinq", setbridge_qinq), + DEF_CMD_ARG("-qinq", unsetbridge_qinq), }; + static struct afswtch af_bridge = { .af_name = "af_bridge", .af_af = AF_UNSPEC, diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 6a50a91880ef..b562f9e4c0c5 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 30, 2025 +.Dd August 5, 2025 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2494,12 +2494,27 @@ compatibility. .Ss Bridge Interface Parameters The following parameters are specific to bridge interfaces: .Bl -tag -width indent -.It Cm addm Ar interface +.It Cm addm Ar interface Op Ar options ... Add the interface named by .Ar interface as a member of the bridge. The interface is put into promiscuous mode so that it can receive every packet sent on the network. +.Pp +The interface name may be followed by one or more of the following +.Ar options : +.Bl -tag -width ".Cm untagged Ar vlan-id" +.It Cm untagged Ar vlan-id +Set the untagged VLAN identifier for the interface. +This is equivalent to the +.Cm ifuntagged +command. +.It Cm tagged Ar vlan-set +Set the allowed VLAN list for the interface. +This is equivalent to the +.Cm iftagged +command. +.El .It Cm deletem Ar interface Remove the interface named by .Ar interface @@ -2710,19 +2725,24 @@ The behaviour of these options is described in the section of .Xr bridge 4 . .Bl -tag -width indent -.It Cm vlanfilter Ar interface -Enable VLAN filtering on an interface. -.It Cm -vlanfilter Ar interface -Disable VLAN filtering on an interface. -.It Cm untagged Ar interface Ar vlan-id +.It Cm vlanfilter +Enable VLAN filtering on the bridge. +.It Cm -vlanfilter +Disable VLAN filtering on the bridge. +This is the default. +.It Cm ifuntagged Ar interface Ar vlan-id Set the untagged VLAN identifier for an interface. -.Pp -Setting -.Cm untagged -will automatically enable VLAN filtering on the interface. -.It Cm -untagged Ar interface Ar vlan-id +.It Cm -ifuntagged Ar interface Ar vlan-id Clear the untagged VLAN identifier for an interface. -.It Cm tagged Ar interface Ar vlan-list +.It Cm defuntagged Ar vlan-id +Enable the +.Cm untagged +option by default on newly added members. +.It Cm -defuntagged +Do not enable the +.Cm untagged +option by default on newly added members. +.It Cm iftagged Ar interface Ar vlan-list Set the interface's VLAN access list to the provided list of VLANs. The list should be a comma-separated list of one or more VLAN IDs or ranges formatted as @@ -2733,27 +2753,44 @@ meaning the empty set, or the value .Dq all meaning all VLANs (1-4094). -.Pp -Setting -.Cm tagged -will automatically enable VLAN filtering on the interface. -.It Cm +tagged Ar interface Ar vlan-list +.It Cm +iftagged Ar interface Ar vlan-list Add the provided list of VLAN IDs to the interface's VLAN access list. The list should be formatted as described for -.Cm tagged . -.Pp -Setting -.Cm +tagged -will automatically enable VLAN filtering on the interface. -.It Cm -tagged Ar interface Ar vlan-list +.Cm iftagged . +.It Cm -iftagged Ar interface Ar vlan-list Remove the provided list of VLAN IDs from the interface's VLAN access list. The list should be formatted as described for -.Cm tagged . -.Pp -Setting -.Cm -tagged -will automatically enable VLAN filtering on the interface. +.Cm iftagged . +.It Cm qinq Ar interface +Allow this interface to send 802.1ad +.Dq Q-in-Q +frames. +.It Cm -qinq Ar interface +Do not allow this interface to send 802.1ad +.Dq Q-in-Q +frames. +This is the default behavior. +.It Cm defqinq +Enable the +.Cm qinq +option by default on newly added members. +.It Cm -defqinq +Do not enable the +.Cm qinq +option by default on newly added members. +This is the default behavior. +.It Cm ifvlanproto Ar interface Ar proto +Set the VLAN encapsulation protocol on +.Ar interface +to +.Ar proto , +which must be either +.Dq 802.1q +or +.Dq 802.1ad . +The default is +.Dq 802.1q . .El .Ss Link Aggregation and Link Failover Parameters The following parameters are specific to lagg interfaces: diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 9aa50a73ba04..36bdd9705830 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -183,6 +183,8 @@ static const struct { { "src-nodes", PF_LIMIT_SRC_NODES }, { "frags", PF_LIMIT_FRAGS }, { "table-entries", PF_LIMIT_TABLE_ENTRIES }, + { "anchors", PF_LIMIT_ANCHORS }, + { "eth-anchors", PF_LIMIT_ETH_ANCHORS }, { NULL, 0 } }; @@ -3137,6 +3139,7 @@ pfctl_reset(int dev, int opts) struct pfr_buffer t; int i; + memset(&pf, 0, sizeof(pf)); pf.dev = dev; pf.h = pfh; pfctl_init_options(&pf); diff --git a/sbin/pfctl/pfctl_radix.c b/sbin/pfctl/pfctl_radix.c index 00e4207d377b..0fe9ca8813bb 100644 --- a/sbin/pfctl/pfctl_radix.c +++ b/sbin/pfctl/pfctl_radix.c @@ -122,7 +122,7 @@ pfr_add_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size, { int ret; - ret = pfctl_table_add_addrs(dev, tbl, addr, size, nadd, flags); + ret = pfctl_table_add_addrs_h(pfh, tbl, addr, size, nadd, flags); if (ret) { errno = ret; return (-1); @@ -136,7 +136,7 @@ pfr_del_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size, { int ret; - ret = pfctl_table_del_addrs(dev, tbl, addr, size, ndel, flags); + ret = pfctl_table_del_addrs_h(pfh, tbl, addr, size, ndel, flags); if (ret) { errno = ret; return (-1); diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4 index 2dff393ebc29..7048df4593bf 100644 --- a/share/man/man4/bridge.4 +++ b/share/man/man4/bridge.4 @@ -36,7 +36,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 5, 2025 +.Dd July 28, 2025 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -289,7 +289,7 @@ interface on the bridge and (if necessary) assign IP addresses there. By default no access control is enabled, so any interface may participate in any VLAN. .Pp -VLAN filtering may be enabled on an interface using the +VLAN filtering may be enabled on a bridge using the .Xr ifconfig 8 .Cm vlanfilter option. diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index 8954e872c231..a9ae823257a4 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 9, 2025 +.Dd July 30, 2025 .Dt PF.CONF 5 .Os .Sh NAME @@ -392,50 +392,37 @@ See .Xr zone 9 for an explanation of memory pools. .Pp -For example, -.Bd -literal -offset indent -set limit states 20000 -.Ed -.Pp -sets the maximum number of entries in the memory pool used by state table -entries (generated by +Limits can be set on the following: +.Bl -tag -width pktdelay_pkts +.It Cm states +Set the maximum number of entries in the memory pool used by state table +entries (those generated by .Ar pass rules which do not specify -.Ar no state ) -to 20000. -Using -.Bd -literal -offset indent -set limit frags 20000 -.Ed -.Pp -sets the maximum number of entries in the memory pool used for fragment -reassembly (generated by the -.Ar set reassemble -option or -.Ar scrub -rules) to 20000. -Using -.Bd -literal -offset indent -set limit src-nodes 2000 -.Ed -.Pp -sets the maximum number of entries in the memory pool used for tracking +.Cm no state ) . +The default is 100000. +.It Cm src-nodes +Set the maximum number of entries in the memory pool used for tracking source IP addresses (generated by the .Ar sticky-address and .Ar src.track -options) to 2000. -Using -.Bd -literal -offset indent -set limit table-entries 100000 -.Ed -.Pp -sets the limit on the overall number of addresses that can be stored -in tables to 100000. +options). +The default is 10000. +.It Cm table-entries +Set the number of addresses that can be stored in tables. +The default is 200000. +.It Cm anchors +Set the number of anchors that can exist. +The default is 512. +.It Cm eth-anchors +Set the number of anchors that can exist. +The default is 512. +.El .Pp -Various limits can be combined on a single line: +Multiple limits can be combined on a single line: .Bd -literal -offset indent -set limit { states 20000, frags 20000, src-nodes 2000 } +set limit { states 20000, frags 2000, src-nodes 2000 } .Ed .It Ar set ruleset-optimization .Bl -tag -width xxxxxxxx -compact @@ -855,7 +842,15 @@ modifier to ensure unique IP identifiers. .It Ar min-ttl Aq Ar number Enforces a minimum TTL for matching IP packets. .It Ar max-mss Aq Ar number -Enforces a maximum MSS for matching TCP packets. +Reduces the maximum segment size (MSS) +on TCP SYN packets to be no greater than +.Ar number . +This is sometimes required in scenarios where the two endpoints +of a TCP connection are not able to carry similar sized packets +and the resulting mismatch can lead to packet fragmentation or loss. +Note that setting the MSS this way can have undesirable effects, +such as interfering with the OS detection features of +.Xr pf 4 . .It Xo Ar set-tos Aq Ar string .No \*(Ba Aq Ar number .Xc diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index a3db00aed42f..94e5a0cfc8b9 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd July 14, 2025 +.Dd August 4, 2025 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1302,8 +1302,8 @@ This must be set in the environment, make command line, or .Pa /etc/src-env.conf , not .Pa /etc/src.conf . -.It Va WITH_MITKRB5 -Set this to build MIT Kerberos 5 instead of KTH Heimdal. +.It Va WITHOUT_MITKRB5 +Set this to build KTH Heimdal instead of MIT Kerberos 5. .It Va WITHOUT_MLX5TOOL Do not build .Xr mlx5tool 8 diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index a5a4fd528268..3444e9612a20 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -137,13 +137,15 @@ ZEXT= CLEANFILES+= ${${__group}:T:S/$/${FILTEXTENSION}/g} CLEANFILES+= ${${__group}:T:S/$/${CATEXT}${FILTEXTENSION}/g} .for __page in ${${__group}} -.for __target in ${__page:T:S/$/${FILTEXTENSION}/g} +# Escape colons in target names to support manual pages whose +# filenames contain colons. +.for __target in ${__page:T:S/:/\:/g:S/$/${FILTEXTENSION}/g} all-man: ${__target} ${__target}: ${__page} ${MANFILTER} < ${.ALLSRC} > ${.TARGET} .endfor .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) -.for __target in ${__page:T:S/$/${CATEXT}${FILTEXTENSION}/g} +.for __target in ${__page:T:S/:/\:/g:S/$/${CATEXT}${FILTEXTENSION}/g} all-man: ${__target} ${__target}: ${__page} ${MANFILTER} < ${.ALLSRC} | ${MANDOC_CMD} > ${.TARGET} @@ -156,7 +158,7 @@ ${__target}: ${__page} CLEANFILES+= ${${__group}:T:S/$/${CATEXT}/g} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __page in ${${__group}} -.for __target in ${__page:T:S/$/${CATEXT}/g} +.for __target in ${__page:T:S/:/\:/g:S/$/${CATEXT}/g} all-man: ${__target} ${__target}: ${__page} ${MANDOC_CMD} ${.ALLSRC} > ${.TARGET} @@ -176,7 +178,7 @@ ZEXT= ${MCOMPRESS_EXT} CLEANFILES+= ${${__group}:T:S/$/${MCOMPRESS_EXT}/g} CLEANFILES+= ${${__group}:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} .for __page in ${${__group}} -.for __target in ${__page:T:S/$/${MCOMPRESS_EXT}/} +.for __target in ${__page:T:S/:/\:/g:S/$/${MCOMPRESS_EXT}/} all-man: ${__target} ${__target}: ${__page} .if defined(MANFILTER) @@ -186,7 +188,7 @@ ${__target}: ${__page} .endif .endfor .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) -.for __target in ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/} +.for __target in ${__page:T:S/:/\:/g:S/$/${CATEXT}${MCOMPRESS_EXT}/} all-man: ${__target} ${__target}: ${__page} .if defined(MANFILTER) diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 0fe352dffaf4..283a99496b9f 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -78,6 +78,7 @@ _INTERNALLIBS= \ smdb \ smutil \ telnet \ + util++ \ vers \ wpaap \ wpacommon \ @@ -694,6 +695,9 @@ LIBPKGECC?= ${LIBPKGECCDIR}/libpkgecc${PIE_SUFFIX}.a LIBPMCSTATDIR= ${_LIB_OBJTOP}/lib/libpmcstat LIBPMCSTAT?= ${LIBPMCSTATDIR}/libpmcstat${PIE_SUFFIX}.a +LIBUTIL++DIR= ${_LIB_OBJTOP}/lib/libutil++ +LIBUTIL++?= ${LIBUTIL++DIR}/libutil++${PIE_SUFFIX}.a + LIBWPAAPDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/ap LIBWPAAP?= ${LIBWPAAPDIR}/libwpaap${PIE_SUFFIX}.a diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 4cf77ee75871..243a6625bece 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -104,6 +104,7 @@ */ #include "opt_ddb.h" +#include "opt_kstack_pages.h" #include "opt_pmap.h" #include "opt_vm.h" diff --git a/sys/arm64/arm64/copyinout.S b/sys/arm64/arm64/copyinout.S index 26dd0b4cf14f..e41c4b5f6734 100644 --- a/sys/arm64/arm64/copyinout.S +++ b/sys/arm64/arm64/copyinout.S @@ -37,7 +37,14 @@ #include "assym.inc" .macro check_user_access user_arg, size_arg, bad_access_func - adds x6, x\user_arg, x\size_arg + /* + * TBI is enabled from 15.0. Clear the top byte of the userspace + * address before checking whether it's within the given limit. + * The later load/store instructions will fault if TBI is disabled + * for the current process. + */ + and x6, x\user_arg, #(~TBI_ADDR_MASK) + adds x6, x6, x\size_arg b.cs \bad_access_func ldr x7, =VM_MAXUSER_ADDRESS cmp x6, x7 @@ -100,13 +107,20 @@ ENTRY(copyinstr) adr x6, copyio_fault /* Get the handler address */ SET_FAULT_HANDLER(x6, x7) /* Set the handler */ + /* + * As in check_user_access mask off the TBI bits for the cmp + * instruction. The load will fail trap if TBI is disabled, but we + * need to check the address didn't wrap. + */ + and x6, x0, #(~TBI_ADDR_MASK) ldr x7, =VM_MAXUSER_ADDRESS -1: cmp x0, x7 +1: cmp x6, x7 b.cs copyio_fault ldtrb w4, [x0] /* Load from uaddr */ add x0, x0, #1 /* Next char */ strb w4, [x1], #1 /* Store in kaddr */ add x5, x5, #1 /* count++ */ + add x6, x6, #1 /* Increment masked address */ cbz w4, 2f /* Break when NUL-terminated */ sub x2, x2, #1 /* len-- */ cbnz x2, 1b diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index bb323dbafd85..4a10a2b4f2d3 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -319,14 +319,12 @@ LEND(mpentry_common) * - Configure EL2 to support running the kernel at EL1 and exit to that */ LENTRY(enter_kernel_el) -#define INIT_SCTLR_EL1 (SCTLR_LSMAOE | SCTLR_nTLSMD | SCTLR_EIS | \ - SCTLR_TSCXT | SCTLR_EOS) mrs x23, CurrentEL and x23, x23, #(CURRENTEL_EL_MASK) cmp x23, #(CURRENTEL_EL_EL2) b.eq 1f - ldr x2, =INIT_SCTLR_EL1 + ldr x2, =SCTLR_MMU_OFF msr sctlr_el1, x2 /* SCTLR_EOS is set so eret is a context synchronizing event so we * need an isb here to ensure it's observed by later instructions, @@ -370,11 +368,11 @@ LENTRY(enter_kernel_el) msr vmpidr_el2, x2 /* Set the initial sctlr_el1 */ - ldr x2, =INIT_SCTLR_EL1 + ldr x2, =SCTLR_MMU_OFF msr sctlr_el1, x2 /* Check for VHE */ - CHECK_CPU_FEAT(x2, ID_AA64MMFR1, VH, .Lno_vhe) + CHECK_CPU_FEAT(x2, ID_AA64MMFR1, VH, IMPL, .Lno_vhe) /* * The kernel will be running in EL2, route exceptions here rather @@ -413,10 +411,9 @@ LENTRY(enter_kernel_el) * Configure the Extended Hypervisor register. This is only valid if * FEAT_HCX is enabled. */ - CHECK_CPU_FEAT(x2, ID_AA64MMFR1, HCX, 2f) + CHECK_CPU_FEAT(x2, ID_AA64MMFR1, HCX, IMPL, 2f) /* Extended Hypervisor Configuration */ - mov x2, xzr - msr HCRX_EL2_REG, x2 + msr HCRX_EL2_REG, xzr isb 2: @@ -430,7 +427,7 @@ LENTRY(enter_kernel_el) msr vttbr_el2, xzr /* Check the CPU supports GIC, and configure the CPU interface */ - CHECK_CPU_FEAT(x2, ID_AA64PFR0, GIC, 3f) + CHECK_CPU_FEAT(x2, ID_AA64PFR0, GIC, CPUIF_EN, 3f) mrs x2, icc_sre_el2 orr x2, x2, #ICC_SRE_EL2_EN /* Enable access from insecure EL1 */ @@ -443,7 +440,6 @@ LENTRY(enter_kernel_el) isb eret -#undef INIT_SCTLR_EL1 LEND(enter_kernel_el) /* @@ -1029,7 +1025,7 @@ LENTRY(start_mmu) * HW management of dirty state is set in C code as it may * need to be disabled because of CPU errata. */ - CHECK_CPU_FEAT(x3, ID_AA64MMFR1, HAFDBS, 1f) + CHECK_CPU_FEAT(x3, ID_AA64MMFR1, HAFDBS, AF, 1f) orr x2, x2, #(TCR_HA) 1: @@ -1038,11 +1034,7 @@ LENTRY(start_mmu) /* * Setup SCTLR. */ - ldr x2, sctlr_set - ldr x3, sctlr_clear - mrs x1, sctlr_el1 - bic x1, x1, x3 /* Clear the required bits */ - orr x1, x1, x2 /* Set the required bits */ + ldr x1, =SCTLR_MMU_ON msr sctlr_el1, x1 isb @@ -1067,16 +1059,6 @@ tcr: .quad (TCR_TxSZ(64 - VIRT_BITS) | TCR_TG | \ TCR_SH1_IS | TCR_ORGN1_WBWA | TCR_IRGN1_WBWA | \ TCR_SH0_IS | TCR_ORGN0_WBWA | TCR_IRGN0_WBWA) -sctlr_set: - /* Bits to set */ - .quad (SCTLR_LSMAOE | SCTLR_nTLSMD | SCTLR_UCI | SCTLR_SPAN | \ - SCTLR_nTWE | SCTLR_nTWI | SCTLR_UCT | SCTLR_DZE | \ - SCTLR_I | SCTLR_SED | SCTLR_SA0 | SCTLR_SA | SCTLR_C | \ - SCTLR_M | SCTLR_CP15BEN | SCTLR_BT1 | SCTLR_BT0) -sctlr_clear: - /* Bits to clear */ - .quad (SCTLR_EE | SCTLR_E0E | SCTLR_IESB | SCTLR_WXN | SCTLR_UMA | \ - SCTLR_ITD | SCTLR_A) LEND(start_mmu) ENTRY(abort) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 2152f7fcc1c6..07955866bd1c 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -2915,13 +2915,13 @@ retry: l1 = pmap_l1(pmap, va); if (l1 != NULL && (pmap_load(l1) & ATTR_DESCR_MASK) == L1_TABLE) { l2 = pmap_l1_to_l2(l1, va); - if (!ADDR_IS_KERNEL(va)) { + if (ADDR_IS_USER(va)) { /* Add a reference to the L2 page. */ l2pg = PTE_TO_VM_PAGE(pmap_load(l1)); l2pg->ref_count++; } else l2pg = NULL; - } else if (!ADDR_IS_KERNEL(va)) { + } else if (ADDR_IS_USER(va)) { /* Allocate a L2 page. */ l2pindex = pmap_l2_pindex(va) >> Ln_ENTRIES_SHIFT; l2pg = _pmap_alloc_l3(pmap, NUL2E + l2pindex, lockp); @@ -4082,7 +4082,7 @@ pmap_remove_l3_range(pmap_t pmap, pd_entry_t l2e, vm_offset_t sva, PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT(rounddown2(sva, L2_SIZE) + L2_SIZE == roundup2(eva, L2_SIZE), ("pmap_remove_l3_range: range crosses an L3 page table boundary")); - l3pg = !ADDR_IS_KERNEL(sva) ? PTE_TO_VM_PAGE(l2e) : NULL; + l3pg = ADDR_IS_USER(sva) ? PTE_TO_VM_PAGE(l2e) : NULL; va = eva; for (l3 = pmap_l2_to_l3(&l2e, sva); sva != eva; l3++, sva += L3_SIZE) { old_l3 = pmap_load(l3); @@ -5310,7 +5310,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, if ((flags & PMAP_ENTER_WIRED) != 0) new_l3 |= ATTR_SW_WIRED; if (pmap->pm_stage == PM_STAGE1) { - if (!ADDR_IS_KERNEL(va)) + if (ADDR_IS_USER(va)) new_l3 |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN; else new_l3 |= ATTR_S1_UXN; @@ -5401,7 +5401,7 @@ retry: pde = pmap_pde(pmap, va, &lvl); if (pde != NULL && lvl == 2) { l3 = pmap_l2_to_l3(pde, va); - if (!ADDR_IS_KERNEL(va) && mpte == NULL) { + if (ADDR_IS_USER(va) && mpte == NULL) { mpte = PTE_TO_VM_PAGE(pmap_load(pde)); mpte->ref_count++; } @@ -5411,7 +5411,7 @@ retry: if ((pmap_load(l2) & ATTR_DESCR_MASK) == L2_BLOCK && (l3 = pmap_demote_l2_locked(pmap, l2, va, &lock)) != NULL) { l3 = &l3[pmap_l3_index(va)]; - if (!ADDR_IS_KERNEL(va)) { + if (ADDR_IS_USER(va)) { mpte = PTE_TO_VM_PAGE(pmap_load(l2)); mpte->ref_count++; } @@ -5419,7 +5419,7 @@ retry: } /* We need to allocate an L3 table. */ } - if (!ADDR_IS_KERNEL(va)) { + if (ADDR_IS_USER(va)) { nosleep = (flags & PMAP_ENTER_NOSLEEP) != 0; /* @@ -5657,7 +5657,7 @@ pmap_enter_l2_rx(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == VM_MEMATTR_DEVICE) new_l2 |= ATTR_S1_XN; - if (!ADDR_IS_KERNEL(va)) + if (ADDR_IS_USER(va)) new_l2 |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN; else new_l2 |= ATTR_S1_UXN; @@ -5745,7 +5745,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, "pmap_enter_l2: no space for va %#lx" " in pmap %p", va, pmap); return (KERN_NO_SPACE); - } else if (!ADDR_IS_KERNEL(va) || + } else if (ADDR_IS_USER(va) || !pmap_every_pte_zero(PTE_TO_PHYS(old_l2))) { if (l2pg != NULL) l2pg->ref_count--; @@ -5796,7 +5796,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, } KASSERT(pmap_load(l2) == 0, ("pmap_enter_l2: non-zero L2 entry %p", l2)); - if (!ADDR_IS_KERNEL(va)) { + if (ADDR_IS_USER(va)) { vm_page_free_pages_toq(&free, true); } else { KASSERT(SLIST_EMPTY(&free), @@ -5916,7 +5916,7 @@ pmap_enter_l3c_rx(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *ml3p, if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == VM_MEMATTR_DEVICE) l3e |= ATTR_S1_XN; - if (!ADDR_IS_KERNEL(va)) + if (ADDR_IS_USER(va)) l3e |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN; else l3e |= ATTR_S1_UXN; @@ -5948,7 +5948,7 @@ pmap_enter_l3c(pmap_t pmap, vm_offset_t va, pt_entry_t l3e, u_int flags, /* * If the L3 PTP is not resident, we attempt to create it here. */ - if (!ADDR_IS_KERNEL(va)) { + if (ADDR_IS_USER(va)) { /* * Were we given the correct L3 PTP? If so, we can simply * increment its ref count. @@ -6224,7 +6224,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, * In the case that a page table page is not * resident, we are creating it here. */ - if (!ADDR_IS_KERNEL(va)) { + if (ADDR_IS_USER(va)) { vm_pindex_t l2pindex; /* @@ -6310,7 +6310,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == VM_MEMATTR_DEVICE) l3_val |= ATTR_S1_XN; - if (!ADDR_IS_KERNEL(va)) + if (ADDR_IS_USER(va)) l3_val |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN; else l3_val |= ATTR_S1_UXN; @@ -8528,7 +8528,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_offset_t va, * region and early kernel memory are the only parts of the * kernel address space that must be handled here. */ - KASSERT(!ADDR_IS_KERNEL(va) || VIRT_IN_DMAP(va) || + KASSERT(ADDR_IS_USER(va) || VIRT_IN_DMAP(va) || (va >= VM_MIN_KERNEL_ADDRESS && va < kernel_vm_end), ("pmap_demote_l2: No saved mpte for va %#lx", va)); @@ -8555,7 +8555,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_offset_t va, } ml3->pindex = pmap_l2_pindex(va); - if (!ADDR_IS_KERNEL(va)) { + if (ADDR_IS_USER(va)) { ml3->ref_count = NL3PG; pmap_resident_count_inc(pmap, 1); } diff --git a/sys/arm64/arm64/support.S b/sys/arm64/arm64/support.S index 2d067c7f7730..bf6fc931e4b0 100644 --- a/sys/arm64/arm64/support.S +++ b/sys/arm64/arm64/support.S @@ -39,8 +39,15 @@ #include "assym.inc" .macro check_user_access user_arg, limit, bad_addr_func + /* + * TBI is enabled from 15.0. Clear the top byte of the userspace + * address before checking whether it's within the given limit. + * The later load/store instructions will fault if TBI is disabled + * for the current process. + */ + and x6, x\user_arg, #(~TBI_ADDR_MASK) ldr x7, =(\limit) - cmp x\user_arg, x7 + cmp x6, x7 b.cs \bad_addr_func .endm diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 38b7f57f7853..500f35c48787 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -2608,6 +2608,26 @@ #define SCTLR_EnALS (UL(0x1) << 56) #define SCTLR_EPAN (UL(0x1) << 57) +#define SCTLR_MMU_OFF \ + (SCTLR_LSMAOE | SCTLR_nTLSMD | SCTLR_EIS | SCTLR_TSCXT | SCTLR_EOS) +#define SCTLR_MMU_ON \ + (SCTLR_MMU_OFF | \ + SCTLR_BT1 | \ + SCTLR_BT0 | \ + SCTLR_UCI | \ + SCTLR_SPAN | \ + SCTLR_nTWE | \ + SCTLR_nTWI | \ + SCTLR_UCT | \ + SCTLR_DZE | \ + SCTLR_I | \ + SCTLR_SED | \ + SCTLR_CP15BEN | \ + SCTLR_SA0 | \ + SCTLR_SA | \ + SCTLR_C | \ + SCTLR_M) + /* SCTLR_EL12 */ #define SCTLR_EL12_REG MRS_REG_ALT_NAME(SCTLR_EL12) #define SCTLR_EL12_op0 3 diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h index 4f373dc4b7e1..f9a64f574fca 100644 --- a/sys/arm64/include/asm.h +++ b/sys/arm64/include/asm.h @@ -77,10 +77,11 @@ * to the given label. The tmp register should be a register able to hold the * temporary data. */ -#define CHECK_CPU_FEAT(tmp, feat_reg, feat, label) \ - mrs tmp, ##feat_reg##_el1; \ +#define CHECK_CPU_FEAT(tmp, feat_reg, feat, min_val, label) \ + mrs tmp, ##feat_reg##_el1; \ ubfx tmp, tmp, ##feat_reg##_##feat##_SHIFT, ##feat_reg##_##feat##_WIDTH; \ - cbz tmp, label + cmp tmp, #(##feat_reg##_##feat##_##min_val## >> ##feat_reg##_##feat##_SHIFT); \ + b.lt label /* * Sets the trap fault handler. The exception handler will return to the diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index 349849845e73..c30ca1b2bff4 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -211,8 +211,13 @@ /* The address bits that hold a pointer authentication code */ #define PAC_ADDR_MASK (0xff7f000000000000UL) +/* The top-byte ignore address bits */ +#define TBI_ADDR_MASK 0xff00000000000000UL + /* If true addr is in the kernel address space */ #define ADDR_IS_KERNEL(addr) (((addr) & (1ul << 55)) == (1ul << 55)) +/* If true addr is in the user address space */ +#define ADDR_IS_USER(addr) (((addr) & (1ul << 55)) == 0) /* If true addr is in its canonical form (i.e. no TBI, PAC, etc.) */ #define ADDR_IS_CANONICAL(addr) \ (((addr) & 0xffff000000000000UL) == 0 || \ diff --git a/sys/dev/eqos/if_eqos.c b/sys/dev/eqos/if_eqos.c index de3d8da7c3bf..e07d6b48f723 100644 --- a/sys/dev/eqos/if_eqos.c +++ b/sys/dev/eqos/if_eqos.c @@ -117,7 +117,8 @@ eqos_miibus_readreg(device_t dev, int phy, int reg) addr = sc->csr_clock_range | (phy << GMAC_MAC_MDIO_ADDRESS_PA_SHIFT) | (reg << GMAC_MAC_MDIO_ADDRESS_RDA_SHIFT) | - GMAC_MAC_MDIO_ADDRESS_GOC_READ | GMAC_MAC_MDIO_ADDRESS_GB; + GMAC_MAC_MDIO_ADDRESS_GOC_READ | + GMAC_MAC_MDIO_ADDRESS_GB; WR4(sc, GMAC_MAC_MDIO_ADDRESS, addr); DELAY(100); @@ -150,7 +151,8 @@ eqos_miibus_writereg(device_t dev, int phy, int reg, int val) addr = sc->csr_clock_range | (phy << GMAC_MAC_MDIO_ADDRESS_PA_SHIFT) | (reg << GMAC_MAC_MDIO_ADDRESS_RDA_SHIFT) | - GMAC_MAC_MDIO_ADDRESS_GOC_WRITE | GMAC_MAC_MDIO_ADDRESS_GB; + GMAC_MAC_MDIO_ADDRESS_GOC_WRITE | + GMAC_MAC_MDIO_ADDRESS_GB; WR4(sc, GMAC_MAC_MDIO_ADDRESS, addr); DELAY(100); @@ -195,7 +197,7 @@ eqos_miibus_statchg(device_t dev) reg |= GMAC_MAC_CONFIGURATION_FES; break; case IFM_1000_T: - case IFM_1000_SX: + case IFM_1000_SX: reg &= ~GMAC_MAC_CONFIGURATION_PS; reg &= ~GMAC_MAC_CONFIGURATION_FES; break; @@ -241,7 +243,7 @@ eqos_media_change(if_t ifp) int error; EQOS_LOCK(sc); - error = mii_mediachg(device_get_softc(sc->miibus)); + error = mii_mediachg(device_get_softc(sc->miibus)); EQOS_UNLOCK(sc); return (error); } @@ -329,8 +331,8 @@ eqos_setup_rxdesc(struct eqos_softc *sc, int index, bus_addr_t paddr) sc->rx.desc_ring[index].des1 = htole32((uint32_t)(paddr >> 32)); sc->rx.desc_ring[index].des2 = htole32(0); bus_dmamap_sync(sc->rx.desc_tag, sc->rx.desc_map, BUS_DMASYNC_PREWRITE); - sc->rx.desc_ring[index].des3 = htole32(EQOS_RDES3_OWN | EQOS_RDES3_IOC | - EQOS_RDES3_BUF1V); + sc->rx.desc_ring[index].des3 = + htole32(EQOS_RDES3_OWN | EQOS_RDES3_IOC | EQOS_RDES3_BUF1V); } static int @@ -370,8 +372,10 @@ eqos_enable_intr(struct eqos_softc *sc) { WR4(sc, GMAC_DMA_CHAN0_INTR_ENABLE, - GMAC_DMA_CHAN0_INTR_ENABLE_NIE | GMAC_DMA_CHAN0_INTR_ENABLE_AIE | - GMAC_DMA_CHAN0_INTR_ENABLE_FBE | GMAC_DMA_CHAN0_INTR_ENABLE_RIE | + GMAC_DMA_CHAN0_INTR_ENABLE_NIE | + GMAC_DMA_CHAN0_INTR_ENABLE_AIE | + GMAC_DMA_CHAN0_INTR_ENABLE_FBE | + GMAC_DMA_CHAN0_INTR_ENABLE_RIE | GMAC_DMA_CHAN0_INTR_ENABLE_TIE); } @@ -437,8 +441,7 @@ eqos_setup_rxfilter(struct eqos_softc *sc) eaddr = if_getlladdr(ifp); val = eaddr[4] | (eaddr[5] << 8); WR4(sc, GMAC_MAC_ADDRESS0_HIGH, val); - val = eaddr[0] | (eaddr[1] << 8) | (eaddr[2] << 16) | - (eaddr[3] << 24); + val = eaddr[0] | (eaddr[1] << 8) | (eaddr[2] << 16) | (eaddr[3] << 24); WR4(sc, GMAC_MAC_ADDRESS0_LOW, val); /* Multicast hash filters */ @@ -726,8 +729,7 @@ eqos_rxintr(struct eqos_softc *sc) if ((m = eqos_alloc_mbufcl(sc))) { if ((error = eqos_setup_rxbuf(sc, sc->rx.head, m))) printf("ERROR: Hole in RX ring!!\n"); - } - else + } else if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); @@ -896,12 +898,10 @@ eqos_ioctl(if_t ifp, u_long cmd, caddr_t data) eqos_setup_rxfilter(sc); EQOS_UNLOCK(sc); } - } - else { + } else { eqos_init(sc); } - } - else { + } else { if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) eqos_stop(sc); } @@ -1008,39 +1008,55 @@ eqos_setup_dma(struct eqos_softc *sc) int error, i; /* Set up TX descriptor ring, descriptors, and dma maps */ - if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), - DESC_ALIGN, DESC_BOUNDARY, - BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, - TX_DESC_SIZE, 1, TX_DESC_SIZE, 0, - NULL, NULL, &sc->tx.desc_tag))) { + error = bus_dma_tag_create( + bus_get_dma_tag(sc->dev), /* Parent tag */ + DESC_ALIGN, DESC_BOUNDARY, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filterfunc, filterarg */ + TX_DESC_SIZE, 1, /* maxsize, nsegs */ + TX_DESC_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->tx.desc_tag); + if (error != 0) { device_printf(sc->dev, "could not create TX ring DMA tag\n"); return (error); } - if ((error = bus_dmamem_alloc(sc->tx.desc_tag, + error = bus_dmamem_alloc(sc->tx.desc_tag, (void**)&sc->tx.desc_ring, BUS_DMA_COHERENT | BUS_DMA_WAITOK | BUS_DMA_ZERO, - &sc->tx.desc_map))) { + &sc->tx.desc_map); + if (error != 0) { device_printf(sc->dev, "could not allocate TX descriptor ring.\n"); return (error); } - if ((error = bus_dmamap_load(sc->tx.desc_tag, sc->tx.desc_map, - sc->tx.desc_ring, - TX_DESC_SIZE, eqos_get1paddr, &sc->tx.desc_ring_paddr, 0))) { + + error = bus_dmamap_load(sc->tx.desc_tag, sc->tx.desc_map, + sc->tx.desc_ring, TX_DESC_SIZE, + eqos_get1paddr, &sc->tx.desc_ring_paddr, + 0); + if (error != 0) { device_printf(sc->dev, "could not load TX descriptor ring map.\n"); return (error); } - if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, - BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, - MCLBYTES*TX_MAX_SEGS, TX_MAX_SEGS, - MCLBYTES, 0, NULL, NULL, - &sc->tx.buf_tag))) { + error = bus_dma_tag_create( + bus_get_dma_tag(sc->dev), /* Parent tag */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filterfunc, filterarg */ + MCLBYTES*TX_MAX_SEGS, TX_MAX_SEGS, /* maxsize, nsegs */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->tx.buf_tag); + if (error != 0) { device_printf(sc->dev, "could not create TX buffer DMA tag.\n"); return (error); } @@ -1055,39 +1071,54 @@ eqos_setup_dma(struct eqos_softc *sc) } /* Set up RX descriptor ring, descriptors, dma maps, and mbufs */ - if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), - DESC_ALIGN, DESC_BOUNDARY, - BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, - RX_DESC_SIZE, 1, RX_DESC_SIZE, 0, - NULL, NULL, &sc->rx.desc_tag))) { + error = bus_dma_tag_create( + bus_get_dma_tag(sc->dev), /* Parent tag */ + DESC_ALIGN, DESC_BOUNDARY, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filterfunc, filterarg */ + RX_DESC_SIZE, 1, /* maxsize, nsegs */ + RX_DESC_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->rx.desc_tag); + if (error != 0) { device_printf(sc->dev, "could not create RX ring DMA tag.\n"); return (error); } - if ((error = bus_dmamem_alloc(sc->rx.desc_tag, + error = bus_dmamem_alloc(sc->rx.desc_tag, (void **)&sc->rx.desc_ring, BUS_DMA_COHERENT | BUS_DMA_WAITOK | BUS_DMA_ZERO, - &sc->rx.desc_map))) { + &sc->rx.desc_map); + if (error != 0) { device_printf(sc->dev, "could not allocate RX descriptor ring.\n"); return (error); } - if ((error = bus_dmamap_load(sc->rx.desc_tag, sc->rx.desc_map, - sc->rx.desc_ring, RX_DESC_SIZE, eqos_get1paddr, - &sc->rx.desc_ring_paddr, 0))) { + error = bus_dmamap_load(sc->rx.desc_tag, sc->rx.desc_map, + sc->rx.desc_ring, RX_DESC_SIZE, + eqos_get1paddr, &sc->rx.desc_ring_paddr, + 0); + if (error != 0) { device_printf(sc->dev, "could not load RX descriptor ring map.\n"); return (error); } - if ((error = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, - BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, - MCLBYTES, 1, - MCLBYTES, 0, NULL, NULL, - &sc->rx.buf_tag))) { + error = bus_dma_tag_create( + bus_get_dma_tag(sc->dev), /* Parent tag */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filterfunc, filterarg */ + MCLBYTES, 1, /* maxsize, nsegs */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->rx.buf_tag); + if (error != 0) { device_printf(sc->dev, "could not create RX buf DMA tag.\n"); return (error); } diff --git a/sys/dev/qat/qat_hw/qat_200xx/adf_200xx_hw_data.h b/sys/dev/qat/qat_hw/qat_200xx/adf_200xx_hw_data.h index a7324509bea7..f8adc0dba935 100644 --- a/sys/dev/qat/qat_hw/qat_200xx/adf_200xx_hw_data.h +++ b/sys/dev/qat/qat_hw/qat_200xx/adf_200xx_hw_data.h @@ -4,8 +4,8 @@ #define ADF_200XX_HW_DATA_H_ /* PCIe configuration space */ -#define ADF_200XX_PMISC_BAR 1 -#define ADF_200XX_ETR_BAR 2 +#define ADF_200XX_PMISC_BAR 0 +#define ADF_200XX_ETR_BAR 1 #define ADF_200XX_RX_RINGS_OFFSET 8 #define ADF_200XX_TX_RINGS_MASK 0xFF #define ADF_200XX_MAX_ACCELERATORS 3 diff --git a/sys/dev/qat/qat_hw/qat_c3xxx/adf_c3xxx_hw_data.h b/sys/dev/qat/qat_hw/qat_c3xxx/adf_c3xxx_hw_data.h index cddfc3f84853..486c46a1cac7 100644 --- a/sys/dev/qat/qat_hw/qat_c3xxx/adf_c3xxx_hw_data.h +++ b/sys/dev/qat/qat_hw/qat_c3xxx/adf_c3xxx_hw_data.h @@ -4,8 +4,8 @@ #define ADF_C3XXX_HW_DATA_H_ /* PCIe configuration space */ -#define ADF_C3XXX_PMISC_BAR 1 -#define ADF_C3XXX_ETR_BAR 2 +#define ADF_C3XXX_PMISC_BAR 0 +#define ADF_C3XXX_ETR_BAR 1 #define ADF_C3XXX_RX_RINGS_OFFSET 8 #define ADF_C3XXX_TX_RINGS_MASK 0xFF #define ADF_C3XXX_MAX_ACCELERATORS 3 diff --git a/sys/dev/sdio/sdiob.c b/sys/dev/sdio/sdiob.c index 4ec2058fa2e4..cb2cc0da6b77 100644 --- a/sys/dev/sdio/sdiob.c +++ b/sys/dev/sdio/sdiob.c @@ -150,7 +150,7 @@ sdiob_rw_direct_sc(struct sdiob_softc *sc, uint8_t fn, uint32_t addr, bool wr, sc->ccb = xpt_alloc_ccb(); else memset(sc->ccb, 0, sizeof(*sc->ccb)); - xpt_setup_ccb(&sc->ccb->ccb_h, sc->periph->path, CAM_PRIORITY_NONE); + xpt_setup_ccb(&sc->ccb->ccb_h, sc->periph->path, CAM_PRIORITY_NORMAL); CAM_DEBUG(sc->ccb->ccb_h.path, CAM_DEBUG_TRACE, ("%s(fn=%d, addr=%#02x, wr=%d, *val=%#02x)\n", __func__, fn, addr, wr, *val)); @@ -250,7 +250,7 @@ sdiob_rw_extended_cam(struct sdiob_softc *sc, uint8_t fn, uint32_t addr, sc->ccb = xpt_alloc_ccb(); else memset(sc->ccb, 0, sizeof(*sc->ccb)); - xpt_setup_ccb(&sc->ccb->ccb_h, sc->periph->path, CAM_PRIORITY_NONE); + xpt_setup_ccb(&sc->ccb->ccb_h, sc->periph->path, CAM_PRIORITY_NORMAL); CAM_DEBUG(sc->ccb->ccb_h.path, CAM_DEBUG_TRACE, ("%s(fn=%d addr=%#0x wr=%d b_count=%u blksz=%u buf=%p incr=%d)\n", __func__, fn, addr, wr, b_count, blksz, buffer, incaddr)); @@ -977,9 +977,6 @@ sdiobdiscover(void *context, int pending) if (sc->ccb == NULL) sc->ccb = xpt_alloc_ccb(); - else - memset(sc->ccb, 0, sizeof(*sc->ccb)); - xpt_setup_ccb(&sc->ccb->ccb_h, periph->path, CAM_PRIORITY_NONE); /* * Read CCCR and FBR of each function, get manufacturer and device IDs, diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 32872e8f3f3a..b90ce60ec664 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -1219,36 +1219,20 @@ fuse_vnop_getattr(struct vop_getattr_args *ap) struct vattr *vap = ap->a_vap; struct ucred *cred = ap->a_cred; struct thread *td = curthread; - int err = 0; - int dataflags; - - dataflags = fuse_get_mpdata(vnode_mount(vp))->dataflags; - - /* Note that we are not bailing out on a dead file system just yet. */ - if (!(dataflags & FSESS_INITED)) { - if (!vnode_isvroot(vp)) { - fdata_set_dead(fuse_get_mpdata(vnode_mount(vp))); - return (EXTERROR(ENOTCONN, "FUSE daemon is not " - "initialized")); - } else { - goto fake; - } - } err = fuse_internal_getattr(vp, vap, cred, td); if (err == ENOTCONN && vnode_isvroot(vp)) { - /* see comment in fuse_vfsop_statfs() */ - goto fake; - } else { - return err; + /* + * We want to seem a legitimate fs even if the daemon is dead, + * so that, eg., we can still do path based unmounting after + * the daemon dies. + */ + err = 0; + bzero(vap, sizeof(*vap)); + vap->va_type = vnode_vtype(vp); } - -fake: - bzero(vap, sizeof(*vap)); - vap->va_type = vnode_vtype(vp); - - return 0; + return err; } /* diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 4ffc4ce5c29f..67e33193ecec 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -218,7 +218,7 @@ NFSD_VNET_DEFINE_STATIC(u_char *, nfsrv_dnsname) = NULL; */ static int nfs_bigreply[NFSV42_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 }; /* local functions */ diff --git a/sys/fs/p9fs/p9fs_vfsops.c b/sys/fs/p9fs/p9fs_vfsops.c index 3451bc052187..e0e91e7e1709 100644 --- a/sys/fs/p9fs/p9fs_vfsops.c +++ b/sys/fs/p9fs/p9fs_vfsops.c @@ -374,7 +374,7 @@ p9fs_vget_common(struct mount *mp, struct p9fs_node *np, int flags, STAILQ_INSERT_TAIL(&vses->virt_node_list, np, p9fs_node_next); np->flags |= P9FS_NODE_IN_SESSION; P9FS_UNLOCK(vses); - + vn_set_state(vp, VSTATE_CONSTRUCTED); *vpp = vp; } else { /* diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 9d2a587b177a..79b6c8b2e6a1 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -384,7 +384,7 @@ static int tmpfs_access_locked(struct vnode *vp, struct tmpfs_node *node, accmode_t accmode, struct ucred *cred) { -#ifdef DEBUG_VFS_LOCKS +#ifdef INVARIANTS if (!mtx_owned(TMPFS_NODE_MTX(node))) { ASSERT_VOP_LOCKED(vp, "tmpfs_access_locked needs locked vnode or node"); diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 6bdef84a34c1..bbb622547598 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2773,8 +2773,8 @@ crcopysafe(struct proc *p, struct ucred *cr) PROC_LOCK_ASSERT(p, MA_OWNED); oldcred = p->p_ucred; - while (cr->cr_agroups < oldcred->cr_agroups) { - groups = oldcred->cr_agroups; + while (cr->cr_agroups < oldcred->cr_ngroups) { + groups = oldcred->cr_ngroups; PROC_UNLOCK(p); crextend(cr, groups); PROC_LOCK(p); diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index 7ee3b9e2048a..7351e9cb6313 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -96,6 +96,13 @@ static void racct_sub_cred_locked(struct ucred *cred, int resource, uint64_t amount); static void racct_add_cred_locked(struct ucred *cred, int resource, uint64_t amount); +static int racct_set_locked(struct proc *p, int resource, uint64_t amount, + int force); +static void racct_updatepcpu_locked(struct proc *p); +static void racct_updatepcpu_racct_locked(struct racct *racct); +static void racct_updatepcpu_containers(void); +static void racct_settime_locked(struct proc *p, bool exit); +static void racct_zeropcpu_locked(struct proc *p); SDT_PROVIDER_DEFINE(racct); SDT_PROBE_DEFINE3(racct, , rusage, add, @@ -308,68 +315,6 @@ fixpt_t ccpu_exp[] = { #define CCPU_EXP_MAX 110 -/* - * This function is analogical to the getpcpu() function in the ps(1) command. - * They should both calculate in the same way so that the racct %cpu - * calculations are consistent with the values shown by the ps(1) tool. - * The calculations are more complex in the 4BSD scheduler because of the value - * of the ccpu variable. In ULE it is defined to be zero which saves us some - * work. - */ -static uint64_t -racct_getpcpu(struct proc *p, u_int pcpu) -{ - u_int swtime; -#ifdef SCHED_4BSD - fixpt_t pctcpu, pctcpu_next; -#endif - fixpt_t p_pctcpu; - struct thread *td; - - ASSERT_RACCT_ENABLED(); - KASSERT((p->p_flag & P_IDLEPROC) == 0, - ("racct_getpcpu: idle process %p", p)); - - swtime = (ticks - p->p_swtick) / hz; - - /* - * For short-lived processes, the sched_pctcpu() returns small - * values even for cpu intensive processes. Therefore we use - * our own estimate in this case. - */ - if (swtime < RACCT_PCPU_SECS) - return (pcpu); - - p_pctcpu = 0; - FOREACH_THREAD_IN_PROC(p, td) { - thread_lock(td); -#ifdef SCHED_4BSD - pctcpu = sched_pctcpu(td); - /* Count also the yet unfinished second. */ - pctcpu_next = (pctcpu * ccpu_exp[1]) >> FSHIFT; - pctcpu_next += sched_pctcpu_delta(td); - p_pctcpu += max(pctcpu, pctcpu_next); -#else - /* - * In ULE the %cpu statistics are updated on every - * sched_pctcpu() call. So special calculations to - * account for the latest (unfinished) second are - * not needed. - */ - p_pctcpu += sched_pctcpu(td); -#endif - thread_unlock(td); - } - -#ifdef SCHED_4BSD - if (swtime <= CCPU_EXP_MAX) - return ((100 * (uint64_t)p_pctcpu * 1000000) / - (FSCALE - ccpu_exp[swtime])); -#endif - - return ((100 * (uint64_t)p_pctcpu * 1000000) / FSCALE); -} - static void racct_add_racct(struct racct *dest, const struct racct *src) { @@ -499,19 +444,6 @@ racct_adjust_resource(struct racct *racct, int resource, ("%s: resource %d usage < 0", __func__, resource)); racct->r_resources[resource] = 0; } - - /* - * There are some cases where the racct %cpu resource would grow - * beyond 100% per core. For example in racct_proc_exit() we add - * the process %cpu usage to the ucred racct containers. If too - * many processes terminated in a short time span, the ucred %cpu - * resource could grow too much. Also, the 4BSD scheduler sometimes - * returns for a thread more than 100% cpu usage. So we set a sane - * boundary here to 100% * the maximum number of CPUs. - */ - if ((resource == RACCT_PCTCPU) && - (racct->r_resources[RACCT_PCTCPU] > 100 * 1000000 * (int64_t)MAXCPU)) - racct->r_resources[RACCT_PCTCPU] = 100 * 1000000 * (int64_t)MAXCPU; } static int @@ -635,10 +567,44 @@ racct_add_buf(struct proc *p, const struct buf *bp, int is_write) RACCT_UNLOCK(); } +static void +racct_settime_locked(struct proc *p, bool exit) +{ + struct thread *td; + struct timeval wallclock; + uint64_t runtime; + + ASSERT_RACCT_ENABLED(); + RACCT_LOCK_ASSERT(); + PROC_LOCK_ASSERT(p, MA_OWNED); + + if (exit) { + /* + * proc_reap() has already calculated rux + * and added crux to rux. + */ + runtime = cputick2usec(p->p_rux.rux_runtime - + p->p_crux.rux_runtime); + } else { + PROC_STATLOCK(p); + FOREACH_THREAD_IN_PROC(p, td) + ruxagg(p, td); + PROC_STATUNLOCK(p); + runtime = cputick2usec(p->p_rux.rux_runtime); + } + microuptime(&wallclock); + timevalsub(&wallclock, &p->p_stats->p_start); + + racct_set_locked(p, RACCT_CPU, runtime, 0); + racct_set_locked(p, RACCT_WALLCLOCK, + (uint64_t)wallclock.tv_sec * 1000000 + + wallclock.tv_usec, 0); +} + static int racct_set_locked(struct proc *p, int resource, uint64_t amount, int force) { - int64_t old_amount, decayed_amount, diff_proc, diff_cred; + int64_t old_amount, diff_proc, diff_cred; #ifdef RCTL int error; #endif @@ -655,17 +621,7 @@ racct_set_locked(struct proc *p, int resource, uint64_t amount, int force) * The diffs may be negative. */ diff_proc = amount - old_amount; - if (resource == RACCT_PCTCPU) { - /* - * Resources in per-credential racct containers may decay. - * If this is the case, we need to calculate the difference - * between the new amount and the proportional value of the - * old amount that has decayed in the ucred racct containers. - */ - decayed_amount = old_amount * RACCT_DECAY_FACTOR / FSCALE; - diff_cred = amount - decayed_amount; - } else - diff_cred = diff_proc; + diff_cred = diff_proc; #ifdef notyet KASSERT(diff_proc >= 0 || RACCT_CAN_DROP(resource), ("%s: usage of non-droppable resource %d dropping", __func__, @@ -908,8 +864,6 @@ racct_proc_fork(struct proc *parent, struct proc *child) goto out; #endif - /* Init process cpu time. */ - child->p_prev_runtime = 0; child->p_throttled = 0; /* @@ -964,37 +918,16 @@ racct_proc_fork_done(struct proc *child) void racct_proc_exit(struct proc *p) { - struct timeval wallclock; - uint64_t pct_estimate, pct, runtime; int i; if (!racct_enable) return; PROC_LOCK(p); - /* - * We don't need to calculate rux, proc_reap() has already done this. - */ - runtime = cputick2usec(p->p_rux.rux_runtime); -#ifdef notyet - KASSERT(runtime >= p->p_prev_runtime, ("runtime < p_prev_runtime")); -#else - if (runtime < p->p_prev_runtime) - runtime = p->p_prev_runtime; -#endif - microuptime(&wallclock); - timevalsub(&wallclock, &p->p_stats->p_start); - if (wallclock.tv_sec > 0 || wallclock.tv_usec > 0) { - pct_estimate = (1000000 * runtime * 100) / - ((uint64_t)wallclock.tv_sec * 1000000 + - wallclock.tv_usec); - } else - pct_estimate = 0; - pct = racct_getpcpu(p, pct_estimate); - RACCT_LOCK(); - racct_set_locked(p, RACCT_CPU, runtime, 0); - racct_add_cred_locked(p->p_ucred, RACCT_PCTCPU, pct); + + racct_settime_locked(p, true); + racct_zeropcpu_locked(p); KASSERT(p->p_racct->r_resources[RACCT_RSS] == 0, ("process reaped with %ju allocated for RSS\n", @@ -1068,6 +1001,10 @@ racct_move(struct racct *dest, struct racct *src) RACCT_LOCK(); racct_add_racct(dest, src); racct_sub_racct(src, src); + dest->r_runtime = src->r_runtime; + dest->r_time = src->r_time; + src->r_runtime = 0; + timevalsub(&src->r_time, &src->r_time); RACCT_UNLOCK(); } @@ -1170,8 +1107,6 @@ racct_proc_wakeup(struct proc *p) static void racct_decay_callback(struct racct *racct, void *dummy1, void *dummy2) { - int64_t r_old, r_new; - ASSERT_RACCT_ENABLED(); RACCT_LOCK_ASSERT(); @@ -1181,15 +1116,6 @@ racct_decay_callback(struct racct *racct, void *dummy1, void *dummy2) rctl_throttle_decay(racct, RACCT_READIOPS); rctl_throttle_decay(racct, RACCT_WRITEIOPS); #endif - - r_old = racct->r_resources[RACCT_PCTCPU]; - - /* If there is nothing to decay, just exit. */ - if (r_old <= 0) - return; - - r_new = r_old * RACCT_DECAY_FACTOR / FSCALE; - racct->r_resources[RACCT_PCTCPU] = r_new; } static void @@ -1221,15 +1147,105 @@ racct_decay(void) } static void +racct_updatepcpu_racct_locked(struct racct *racct) +{ + struct timeval diff; + uint64_t elapsed; + uint64_t runtime; + uint64_t newpcpu; + uint64_t oldpcpu; + + ASSERT_RACCT_ENABLED(); + RACCT_LOCK_ASSERT(); + + /* Difference between now and previously-recorded time. */ + microuptime(&diff); + timevalsub(&diff, &racct->r_time); + elapsed = (uint64_t)diff.tv_sec * 1000000 + diff.tv_usec; + + /* Difference between current and previously-recorded runtime. */ + runtime = racct->r_resources[RACCT_CPU] - racct->r_runtime; + + newpcpu = runtime * 100 * 1000000 / elapsed; + oldpcpu = racct->r_resources[RACCT_PCTCPU]; + /* + * This calculation is equivalent to + * (1 - 0.3) * newpcpu + 0.3 * oldpcpu + * where RACCT_DECAY_FACTOR = 0.3 * FSCALE. + */ + racct->r_resources[RACCT_PCTCPU] = ((FSCALE - RACCT_DECAY_FACTOR) * + newpcpu + RACCT_DECAY_FACTOR * oldpcpu) / FSCALE; + if (racct->r_resources[RACCT_PCTCPU] > + 100 * 1000000 * (uint64_t)mp_ncpus) + racct->r_resources[RACCT_PCTCPU] = 100 * 1000000 * + (uint64_t)mp_ncpus; + + /* Record current times. */ + racct->r_runtime = racct->r_resources[RACCT_CPU]; + timevaladd(&racct->r_time, &diff); +} + +static void +racct_zeropcpu_locked(struct proc *p) +{ + ASSERT_RACCT_ENABLED(); + PROC_LOCK_ASSERT(p, MA_OWNED); + + p->p_racct->r_resources[RACCT_PCTCPU] = 0; +} + +static void +racct_updatepcpu_locked(struct proc *p) +{ + ASSERT_RACCT_ENABLED(); + PROC_LOCK_ASSERT(p, MA_OWNED); + + racct_updatepcpu_racct_locked(p->p_racct); +} + +static void +racct_updatepcpu_pre(void) +{ + + RACCT_LOCK(); +} + +static void +racct_updatepcpu_post(void) +{ + + RACCT_UNLOCK(); +} + +static void +racct_updatepcpu_racct_callback(struct racct *racct, void *dummy1, void *dummy2) +{ + racct_updatepcpu_racct_locked(racct); +} + +static void +racct_updatepcpu_containers(void) +{ + ASSERT_RACCT_ENABLED(); + + ui_racct_foreach(racct_updatepcpu_racct_callback, racct_updatepcpu_pre, + racct_updatepcpu_post, NULL, NULL); + loginclass_racct_foreach(racct_updatepcpu_racct_callback, racct_updatepcpu_pre, + racct_updatepcpu_post, NULL, NULL); + prison_racct_foreach(racct_updatepcpu_racct_callback, racct_updatepcpu_pre, + racct_updatepcpu_post, NULL, NULL); +} + +static void racctd(void) { - struct thread *td; struct proc *p; - struct timeval wallclock; - uint64_t pct, pct_estimate, runtime; + struct proc *idle; ASSERT_RACCT_ENABLED(); + idle = STAILQ_FIRST(&cpuhead)->pc_idlethread->td_proc; + for (;;) { racct_decay(); @@ -1237,36 +1253,16 @@ racctd(void) FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); + if (p == idle) { + PROC_UNLOCK(p); + continue; + } if (p->p_state != PRS_NORMAL || (p->p_flag & P_IDLEPROC) != 0) { - if (p->p_state == PRS_ZOMBIE) - racct_set(p, RACCT_PCTCPU, 0); PROC_UNLOCK(p); continue; } - microuptime(&wallclock); - timevalsub(&wallclock, &p->p_stats->p_start); - PROC_STATLOCK(p); - FOREACH_THREAD_IN_PROC(p, td) - ruxagg(p, td); - runtime = cputick2usec(p->p_rux.rux_runtime); - PROC_STATUNLOCK(p); -#ifdef notyet - KASSERT(runtime >= p->p_prev_runtime, - ("runtime < p_prev_runtime")); -#else - if (runtime < p->p_prev_runtime) - runtime = p->p_prev_runtime; -#endif - p->p_prev_runtime = runtime; - if (wallclock.tv_sec > 0 || wallclock.tv_usec > 0) { - pct_estimate = (1000000 * runtime * 100) / - ((uint64_t)wallclock.tv_sec * 1000000 + - wallclock.tv_usec); - } else - pct_estimate = 0; - pct = racct_getpcpu(p, pct_estimate); RACCT_LOCK(); #ifdef RCTL rctl_throttle_decay(p->p_racct, RACCT_READBPS); @@ -1274,11 +1270,8 @@ racctd(void) rctl_throttle_decay(p->p_racct, RACCT_READIOPS); rctl_throttle_decay(p->p_racct, RACCT_WRITEIOPS); #endif - racct_set_locked(p, RACCT_PCTCPU, pct, 1); - racct_set_locked(p, RACCT_CPU, runtime, 0); - racct_set_locked(p, RACCT_WALLCLOCK, - (uint64_t)wallclock.tv_sec * 1000000 + - wallclock.tv_usec, 0); + racct_settime_locked(p, false); + racct_updatepcpu_locked(p); RACCT_UNLOCK(); PROC_UNLOCK(p); } @@ -1306,6 +1299,8 @@ racctd(void) PROC_UNLOCK(p); } sx_sunlock(&allproc_lock); + + racct_updatepcpu_containers(); pause("-", hz); } } diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 9830e5093a3a..2a6f0989f6aa 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -571,7 +571,10 @@ kern_clock_nanosleep(struct thread *td, clockid_t clock_id, int flags, td->td_rtcgen = atomic_load_acq_int(&rtc_generation); error = kern_clock_gettime(td, clock_id, &now); - KASSERT(error == 0, ("kern_clock_gettime: %d", error)); + if (error != 0) { + td->td_rtcgen = 0; + return (error); + } timespecsub(&ts, &now, &ts); } if (ts.tv_sec < 0 || (ts.tv_sec == 0 && ts.tv_nsec == 0)) { diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 29774cf87393..a6e38be89291 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -97,10 +97,6 @@ #include <vm/vnode_pager.h> #include <vm/uma.h> -#if defined(DEBUG_VFS_LOCKS) && (!defined(INVARIANTS) || !defined(WITNESS)) -#error DEBUG_VFS_LOCKS requires INVARIANTS and WITNESS -#endif - #ifdef DDB #include <ddb/ddb.h> #endif @@ -5736,102 +5732,69 @@ extattr_check_cred(struct vnode *vp, int attrnamespace, struct ucred *cred, } } -#ifdef DEBUG_VFS_LOCKS -int vfs_badlock_ddb = 1; /* Drop into debugger on violation. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, - "Drop into debugger on lock violation"); - -int vfs_badlock_mutex = 1; /* Check for interlock across VOPs. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, &vfs_badlock_mutex, - 0, "Check for interlock across VOPs"); - -int vfs_badlock_print = 1; /* Print lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print, - 0, "Print lock violations"); - -int vfs_badlock_vnode = 1; /* Print vnode details on lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_vnode, CTLFLAG_RW, &vfs_badlock_vnode, - 0, "Print vnode details on lock violations"); - -#ifdef KDB -int vfs_badlock_backtrace = 1; /* Print backtrace at lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, - &vfs_badlock_backtrace, 0, "Print backtrace at lock violations"); -#endif - -static void -vfs_badlock(const char *msg, const char *str, struct vnode *vp) -{ - -#ifdef KDB - if (vfs_badlock_backtrace) - kdb_backtrace(); -#endif - if (vfs_badlock_vnode) - vn_printf(vp, "vnode "); - if (vfs_badlock_print) - printf("%s: %p %s\n", str, (void *)vp, msg); - if (vfs_badlock_ddb) - kdb_enter(KDB_WHY_VFSLOCK, "lock violation"); -} - +#ifdef INVARIANTS void assert_vi_locked(struct vnode *vp, const char *str) { - - if (vfs_badlock_mutex && !mtx_owned(VI_MTX(vp))) - vfs_badlock("interlock is not locked but should be", str, vp); + VNASSERT(mtx_owned(VI_MTX(vp)), vp, + ("%s: vnode interlock is not locked but should be", str)); } void assert_vi_unlocked(struct vnode *vp, const char *str) { - - if (vfs_badlock_mutex && mtx_owned(VI_MTX(vp))) - vfs_badlock("interlock is locked but should not be", str, vp); + VNASSERT(!mtx_owned(VI_MTX(vp)), vp, + ("%s: vnode interlock is locked but should not be", str)); } void assert_vop_locked(struct vnode *vp, const char *str) { + bool locked; + if (KERNEL_PANICKED() || vp == NULL) return; #ifdef WITNESS - if ((vp->v_irflag & VIRF_CROSSMP) == 0 && - witness_is_owned(&vp->v_vnlock->lock_object) == -1) + locked = !((vp->v_irflag & VIRF_CROSSMP) == 0 && + witness_is_owned(&vp->v_vnlock->lock_object) == -1); #else - int locked = VOP_ISLOCKED(vp); - if (locked == 0 || locked == LK_EXCLOTHER) + int state = VOP_ISLOCKED(vp); + locked = state != 0 && state != LK_EXCLOTHER; #endif - vfs_badlock("is not locked but should be", str, vp); + VNASSERT(locked, vp, ("%s: vnode is not locked but should be", str)); } void assert_vop_unlocked(struct vnode *vp, const char *str) { + bool locked; + if (KERNEL_PANICKED() || vp == NULL) return; #ifdef WITNESS - if ((vp->v_irflag & VIRF_CROSSMP) == 0 && - witness_is_owned(&vp->v_vnlock->lock_object) == 1) + locked = (vp->v_irflag & VIRF_CROSSMP) == 0 && + witness_is_owned(&vp->v_vnlock->lock_object) == 1; #else - if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) + locked = VOP_ISLOCKED(vp) == LK_EXCLUSIVE; #endif - vfs_badlock("is locked but should not be", str, vp); + VNASSERT(!locked, vp, ("%s: vnode is locked but should not be", str)); } void assert_vop_elocked(struct vnode *vp, const char *str) { + bool locked; + if (KERNEL_PANICKED() || vp == NULL) return; - if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) - vfs_badlock("is not exclusive locked but should be", str, vp); + locked = VOP_ISLOCKED(vp) == LK_EXCLUSIVE; + VNASSERT(locked, vp, + ("%s: vnode is not exclusive locked but should be", str)); } -#endif /* DEBUG_VFS_LOCKS */ +#endif /* INVARIANTS */ void vop_rename_fail(struct vop_rename_args *ap) @@ -5852,7 +5815,7 @@ vop_rename_pre(void *ap) { struct vop_rename_args *a = ap; -#ifdef DEBUG_VFS_LOCKS +#ifdef INVARIANTS struct mount *tmp; if (a->a_tvp) @@ -5895,7 +5858,7 @@ vop_rename_pre(void *ap) vhold(a->a_tvp); } -#ifdef DEBUG_VFS_LOCKS +#ifdef INVARIANTS void vop_fplookup_vexec_debugpre(void *ap __unused) { @@ -5934,6 +5897,8 @@ vop_fplookup_symlink_debugpost(void *ap __unused, int rc __unused) static void vop_fsync_debugprepost(struct vnode *vp, const char *name) { + struct mount *mp; + if (vp->v_type == VCHR) ; /* @@ -5951,10 +5916,16 @@ vop_fsync_debugprepost(struct vnode *vp, const char *name) * should still be caught when the stacked filesystem * invokes VOP_FSYNC() on the underlying filesystem. */ - else if (MNT_SHARED_WRITES(vp->v_mount)) - ASSERT_VOP_LOCKED(vp, name); - else - ASSERT_VOP_ELOCKED(vp, name); + else { + mp = NULL; + VOP_GETWRITEMOUNT(vp, &mp); + if (vn_lktype_write(mp, vp) == LK_SHARED) + ASSERT_VOP_LOCKED(vp, name); + else + ASSERT_VOP_ELOCKED(vp, name); + if (mp != NULL) + vfs_rel(mp); + } } void @@ -6008,13 +5979,7 @@ vop_strategy_debugpre(void *ap) if ((bp->b_flags & B_CLUSTER) != 0) return; - if (!KERNEL_PANICKED() && !BUF_ISLOCKED(bp)) { - if (vfs_badlock_print) - printf( - "VOP_STRATEGY: bp is not locked but should be\n"); - if (vfs_badlock_ddb) - kdb_enter(KDB_WHY_VFSLOCK, "lock violation"); - } + BUF_ASSERT_LOCKED(bp); } void @@ -6063,7 +6028,7 @@ vop_need_inactive_debugpost(void *ap, int rc) ASSERT_VI_LOCKED(a->a_vp, "VOP_NEED_INACTIVE"); } -#endif +#endif /* INVARIANTS */ void vop_allocate_post(void *ap, int rc) @@ -6229,7 +6194,7 @@ vop_mkdir_post(void *ap, int rc) } } -#ifdef DEBUG_VFS_LOCKS +#ifdef INVARIANTS void vop_mkdir_debugpost(void *ap, int rc) { @@ -6677,7 +6642,7 @@ vfs_knlunlock(void *arg) static void vfs_knl_assert_lock(void *arg, int what) { -#ifdef DEBUG_VFS_LOCKS +#ifdef INVARIANTS struct vnode *vp = arg; if (what == LA_LOCKED) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 25d40a9806cb..9704e9c160a8 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -37,6 +37,7 @@ #include "opt_capsicum.h" #include "opt_ktrace.h" +#define EXTERR_CATEGORY EXTERR_CAT_VFSSYSCALL #include <sys/systm.h> #ifdef COMPAT_FREEBSD11 #include <sys/abi_compat.h> @@ -46,6 +47,7 @@ #include <sys/capsicum.h> #include <sys/disk.h> #include <sys/dirent.h> +#include <sys/exterrvar.h> #include <sys/fcntl.h> #include <sys/file.h> #include <sys/filedesc.h> @@ -982,13 +984,16 @@ kern_chroot(struct thread *td, struct vnode *vp) error = priv_check(td, PRIV_VFS_CHROOT); if (error != 0) { p = td->td_proc; - PROC_LOCK(p); - if (unprivileged_chroot == 0 || - (p->p_flag2 & P2_NO_NEW_PRIVS) == 0) { - PROC_UNLOCK(p); + if (unprivileged_chroot == 0) { + error = EXTERROR(EPERM, + "security.bsd.unprivileged_chroot sysctl not enabled"); + goto e_vunlock; + } + if ((p->p_flag2 & P2_NO_NEW_PRIVS) == 0) { + error = EXTERROR(EPERM, + "PROC_NO_NEW_PRIVS not enabled"); goto e_vunlock; } - PROC_UNLOCK(p); } error = change_dir(vp, td); diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 0a35fb4095fb..3aed54c58e04 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -259,6 +259,7 @@ struct bridge_iflist { struct epoch_context bif_epoch_ctx; ether_vlanid_t bif_pvid; /* port vlan id */ ifbvlan_set_t bif_vlan_set; /* if allowed tagged vlans */ + uint16_t bif_vlanproto; /* vlan protocol */ }; /* @@ -300,6 +301,8 @@ struct bridge_softc { struct ether_addr sc_defaddr; /* Default MAC address */ if_input_fn_t sc_if_input; /* Saved copy of if_input */ struct epoch_context sc_epoch_ctx; + ifbr_flags_t sc_flags; /* bridge flags */ + ether_vlanid_t sc_defpvid; /* default PVID */ }; VNET_DEFINE_STATIC(struct sx, bridge_list_sx); @@ -417,6 +420,11 @@ static int bridge_ioctl_grte(struct bridge_softc *, void *); static int bridge_ioctl_gifsstp(struct bridge_softc *, void *); static int bridge_ioctl_sproto(struct bridge_softc *, void *); static int bridge_ioctl_stxhc(struct bridge_softc *, void *); +static int bridge_ioctl_gflags(struct bridge_softc *, void *); +static int bridge_ioctl_sflags(struct bridge_softc *, void *); +static int bridge_ioctl_gdefpvid(struct bridge_softc *, void *); +static int bridge_ioctl_sdefpvid(struct bridge_softc *, void *); +static int bridge_ioctl_svlanproto(struct bridge_softc *, void *); static int bridge_pfil(struct mbuf **, struct ifnet *, struct ifnet *, int); #ifdef INET @@ -636,6 +644,21 @@ static const struct bridge_control bridge_control_table[] = { { bridge_ioctl_gifvlanset, sizeof(struct ifbif_vlan_req), BC_F_COPYIN|BC_F_COPYOUT }, + + { bridge_ioctl_gflags, sizeof(struct ifbrparam), + BC_F_COPYOUT }, + + { bridge_ioctl_sflags, sizeof(struct ifbrparam), + BC_F_COPYIN|BC_F_SUSER }, + + { bridge_ioctl_gdefpvid, sizeof(struct ifbrparam), + BC_F_COPYOUT }, + + { bridge_ioctl_sdefpvid, sizeof(struct ifbrparam), + BC_F_COPYIN|BC_F_SUSER }, + + { bridge_ioctl_svlanproto, sizeof(struct ifbreq), + BC_F_COPYIN|BC_F_SUSER }, }; static const int bridge_control_table_size = nitems(bridge_control_table); @@ -1476,6 +1499,11 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg) bif->bif_ifp = ifs; bif->bif_flags = IFBIF_LEARNING | IFBIF_DISCOVER; bif->bif_savedcaps = ifs->if_capenable; + bif->bif_vlanproto = ETHERTYPE_VLAN; + if (sc->sc_flags & IFBRF_VLANFILTER) + bif->bif_pvid = sc->sc_defpvid; + if (sc->sc_flags & IFBRF_DEFQINQ) + bif->bif_flags |= IFBIF_QINQ; /* * Assign the interface's MAC address to the bridge if it's the first @@ -1557,6 +1585,7 @@ bridge_ioctl_gifflags(struct bridge_softc *sc, void *arg) req->ifbr_addrmax = bif->bif_addrmax; req->ifbr_addrexceeded = bif->bif_addrexceeded; req->ifbr_pvid = bif->bif_pvid; + req->ifbr_vlanproto = bif->bif_vlanproto; /* Copy STP state options as flags */ if (bp->bp_operedge) @@ -1941,6 +1970,9 @@ bridge_ioctl_sifpvid(struct bridge_softc *sc, void *arg) struct ifbreq *req = arg; struct bridge_iflist *bif; + if ((sc->sc_flags & IFBRF_VLANFILTER) == 0) + return (EXTERROR(EINVAL, "VLAN filtering not enabled")); + bif = bridge_lookup_member(sc, req->ifbr_ifsname); if (bif == NULL) return (EXTERROR(ENOENT, "Interface is not a bridge member")); @@ -1948,8 +1980,6 @@ bridge_ioctl_sifpvid(struct bridge_softc *sc, void *arg) if (req->ifbr_pvid > DOT1Q_VID_MAX) return (EXTERROR(EINVAL, "Invalid VLAN ID")); - if (req->ifbr_pvid != DOT1Q_VID_NULL) - bif->bif_flags |= IFBIF_VLANFILTER; bif->bif_pvid = req->ifbr_pvid; return (0); } @@ -1960,6 +1990,9 @@ bridge_ioctl_sifvlanset(struct bridge_softc *sc, void *arg) struct ifbif_vlan_req *req = arg; struct bridge_iflist *bif; + if ((sc->sc_flags & IFBRF_VLANFILTER) == 0) + return (EXTERROR(EINVAL, "VLAN filtering not enabled")); + bif = bridge_lookup_member(sc, req->bv_ifname); if (bif == NULL) return (EXTERROR(ENOENT, "Interface is not a bridge member")); @@ -1991,12 +2024,6 @@ bridge_ioctl_sifvlanset(struct bridge_softc *sc, void *arg) "Unsupported BRDGSIFVLANSET operation")); } - /* - * The only reason to modify the VLAN access list is to use VLAN - * filtering on this interface, so enable it automatically. - */ - bif->bif_flags |= IFBIF_VLANFILTER; - return (0); } @@ -2190,6 +2217,68 @@ bridge_ioctl_stxhc(struct bridge_softc *sc, void *arg) return (bstp_set_holdcount(&sc->sc_stp, param->ifbrp_txhc)); } +static int +bridge_ioctl_gflags(struct bridge_softc *sc, void *arg) +{ + struct ifbrparam *param = arg; + + param->ifbrp_flags = sc->sc_flags; + + return (0); +} + +static int +bridge_ioctl_sflags(struct bridge_softc *sc, void *arg) +{ + struct ifbrparam *param = arg; + + sc->sc_flags = param->ifbrp_flags; + + return (0); +} + +static int +bridge_ioctl_gdefpvid(struct bridge_softc *sc, void *arg) +{ + struct ifbrparam *param = arg; + + param->ifbrp_defpvid = sc->sc_defpvid; + + return (0); +} + +static int +bridge_ioctl_sdefpvid(struct bridge_softc *sc, void *arg) +{ + struct ifbrparam *param = arg; + + /* Reject invalid VIDs, but allow 0 to mean 'none'. */ + if (param->ifbrp_defpvid > DOT1Q_VID_MAX) + return (EINVAL); + + sc->sc_defpvid = param->ifbrp_defpvid; + + return (0); +} + +static int +bridge_ioctl_svlanproto(struct bridge_softc *sc, void *arg) +{ + struct ifbreq *req = arg; + struct bridge_iflist *bif; + + bif = bridge_lookup_member(sc, req->ifbr_ifsname); + if (bif == NULL) + return (EXTERROR(ENOENT, "Interface is not a bridge member")); + + if (req->ifbr_vlanproto != ETHERTYPE_VLAN && + req->ifbr_vlanproto != ETHERTYPE_QINQ) + return (EXTERROR(EINVAL, "Invalid VLAN protocol")); + + bif->bif_vlanproto = req->ifbr_vlanproto; + + return (0); +} /* * bridge_ifdetach: * @@ -2325,7 +2414,7 @@ bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m, * outgoing interface matches the VLAN ID of the frame, remove * the VLAN header. */ - if ((bif->bif_flags & IFBIF_VLANFILTER) && + if ((sc->sc_flags & IFBRF_VLANFILTER) && bif->bif_pvid != DOT1Q_VID_NULL && VLANTAGOF(m) == bif->bif_pvid) { m->m_flags &= ~M_VLANTAG; @@ -2333,12 +2422,15 @@ bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m, } /* - * If underlying interface can not do VLAN tag insertion itself - * then attach a packet tag that holds it. + * There are two cases where we have to insert our own tag: + * if the member interface doesn't support hardware tagging, + * or if the tag proto is not 802.1q. */ if ((m->m_flags & M_VLANTAG) && - (dst_ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0) { - m = ether_vlanencap(m, m->m_pkthdr.ether_vtag); + ((dst_ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0 || + bif->bif_vlanproto != ETHERTYPE_VLAN)) { + m = ether_vlanencap_proto(m, m->m_pkthdr.ether_vtag, + bif->bif_vlanproto); if (m == NULL) { if_printf(dst_ifp, "unable to prepend VLAN header\n"); @@ -2766,9 +2858,29 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) NET_EPOCH_ASSERT(); + /* We need the Ethernet header later, so make sure we have it now. */ + if (m->m_len < ETHER_HDR_LEN) { + m = m_pullup(m, ETHER_HDR_LEN); + if (m == NULL) { + if_inc_counter(sc->sc_ifp, IFCOUNTER_IERRORS, 1); + m_freem(m); + return (NULL); + } + } + eh = mtod(m, struct ether_header *); vlan = VLANTAGOF(m); + /* + * If this frame has a VLAN tag and the receiving interface has a + * vlan(4) trunk, then it is is destined for vlan(4), not for us. + * This means if vlan(4) and bridge(4) are configured on the same + * interface, vlan(4) is preferred, which is what users typically + * expect. + */ + if (vlan != DOT1Q_VID_NULL && ifp->if_vlantrunk != NULL) + return (m); + bif = ifp->if_bridge; if (bif) sc = bif->bif_sc; @@ -2969,19 +3081,13 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) do { GRAB_OUR_PACKETS(bifp) } while (0); /* - * Check the interface the packet arrived on. For tagged frames, - * we need to do this even if member_ifaddrs is disabled because - * vlan(4) might need to handle the traffic. + * If member_ifaddrs is enabled, see if the packet is destined for + * one of the members' addresses. */ - if (V_member_ifaddrs || (vlan && ifp->if_vlantrunk)) + if (V_member_ifaddrs) { + /* Check the interface the packet arrived on. */ do { GRAB_OUR_PACKETS(ifp) } while (0); - /* - * We only need to check other members interface if member_ifaddrs - * is enabled; otherwise we should have never traffic destined for - * a member's lladdr. - */ - if (V_member_ifaddrs) { CK_LIST_FOREACH(bif2, &sc->sc_iflist, bif_next) { GRAB_OUR_PACKETS(bif2->bif_ifp) } @@ -3185,9 +3291,21 @@ bridge_vfilter_in(const struct bridge_iflist *sbif, struct mbuf *m) return (false); /* If VLAN filtering isn't enabled, pass everything. */ - if ((sbif->bif_flags & IFBIF_VLANFILTER) == 0) + if ((sbif->bif_sc->sc_flags & IFBRF_VLANFILTER) == 0) return (true); + /* If Q-in-Q is disabled, check for stacked tags. */ + if ((sbif->bif_flags & IFBIF_QINQ) == 0) { + struct ether_header *eh; + uint16_t proto; + + eh = mtod(m, struct ether_header *); + proto = ntohs(eh->ether_type); + + if (proto == ETHERTYPE_VLAN || proto == ETHERTYPE_QINQ) + return (false); + } + if (vlan == DOT1Q_VID_NULL) { /* * The frame doesn't have a tag. If the interface does not @@ -3231,7 +3349,7 @@ bridge_vfilter_out(const struct bridge_iflist *dbif, const struct mbuf *m) NET_EPOCH_ASSERT(); /* If VLAN filtering isn't enabled, pass everything. */ - if ((dbif->bif_flags & IFBIF_VLANFILTER) == 0) + if ((dbif->bif_sc->sc_flags & IFBRF_VLANFILTER) == 0) return (true); vlan = VLANTAGOF(m); diff --git a/sys/net/if_bridgevar.h b/sys/net/if_bridgevar.h index c458dcc152a0..b0f579f688ac 100644 --- a/sys/net/if_bridgevar.h +++ b/sys/net/if_bridgevar.h @@ -127,6 +127,19 @@ #define BRDGSIFPVID 31 /* set if PVID */ #define BRDGSIFVLANSET 32 /* set if vlan set */ #define BRDGGIFVLANSET 33 /* get if vlan set */ +#define BRDGGFLAGS 34 /* get bridge flags (ifbrparam) */ +#define BRDGSFLAGS 35 /* set bridge flags (ifbrparam) */ +#define BRDGGDEFPVID 36 /* get default pvid (ifbrparam) */ +#define BRDGSDEFPVID 37 /* set default pvid (ifbrparam) */ +#define BRDGSIFVLANPROTO 38 /* set if vlan protocol (ifbreq) */ + +/* BRDGSFLAGS, Bridge flags (non-interface-specific) */ +typedef uint32_t ifbr_flags_t; + +#define IFBRF_VLANFILTER (1U<<0) /* VLAN filtering enabled */ +#define IFBRF_DEFQINQ (1U<<1) /* 802.1ad Q-in-Q allowed by default */ + +#define IFBRFBITS "\020\01VLANFILTER\02DEFQINQ" /* * Generic bridge control request. @@ -145,6 +158,7 @@ struct ifbreq { uint32_t ifbr_addrmax; /* member if addr max */ uint32_t ifbr_addrexceeded; /* member if addr violations */ ether_vlanid_t ifbr_pvid; /* member if PVID */ + uint16_t ifbr_vlanproto; /* member if VLAN protocol */ uint8_t pad[32]; }; @@ -161,11 +175,11 @@ struct ifbreq { #define IFBIF_BSTP_ADMEDGE 0x0200 /* member stp admin edge enabled */ #define IFBIF_BSTP_ADMCOST 0x0400 /* member stp admin path cost */ #define IFBIF_PRIVATE 0x0800 /* if is a private segment */ -#define IFBIF_VLANFILTER 0x1000 /* if does vlan filtering */ +#define IFBIF_QINQ 0x1000 /* if allows 802.1ad Q-in-Q */ #define IFBIFBITS "\020\001LEARNING\002DISCOVER\003STP\004SPAN" \ "\005STICKY\014PRIVATE\006EDGE\007AUTOEDGE\010PTP" \ - "\011AUTOPTP\015VLANFILTER" + "\011AUTOPTP\015QINQ" #define IFBIFMASK ~(IFBIF_BSTP_EDGE|IFBIF_BSTP_AUTOEDGE|IFBIF_BSTP_PTP| \ IFBIF_BSTP_AUTOPTP|IFBIF_BSTP_ADMEDGE| \ IFBIF_BSTP_ADMCOST) /* not saved */ @@ -237,7 +251,11 @@ struct ifbrparam { #define ifbrp_fwddelay ifbrp_ifbrpu.ifbrpu_int8 /* fwd time (sec) */ #define ifbrp_maxage ifbrp_ifbrpu.ifbrpu_int8 /* max age (sec) */ #define ifbrp_cexceeded ifbrp_ifbrpu.ifbrpu_int32 /* # of cache dropped - * adresses */ + * addresses */ +#define ifbrp_flags ifbrp_ifbrpu.ifbrpu_int32 /* bridge flags */ +#define ifbrp_defpvid ifbrp_ifbrpu.ifbrpu_int16 /* default pvid */ +#define ifbrp_vlanproto ifbrp_ifbrpu.ifbrpu_int8 /* vlan protocol */ + /* * Bridge current operational parameters structure. */ diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 7051e31565d4..a213a84e17db 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -58,6 +58,7 @@ #include <sys/smp.h> #include <sys/socket.h> #include <sys/sockio.h> +#include <sys/sysctl.h> #include <sys/taskqueue.h> #include <net/bpf.h> @@ -97,6 +98,15 @@ static unsigned int next_index = 0; #define EPAIR_LOCK() mtx_lock(&epair_n_index_mtx) #define EPAIR_UNLOCK() mtx_unlock(&epair_n_index_mtx) +SYSCTL_DECL(_net_link); +static SYSCTL_NODE(_net_link, OID_AUTO, epair, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "Pair of virtual cross-over connected Ethernet-like interfaces"); + +static bool use_ether_gen_addr = true; +SYSCTL_BOOL(_net_link_epair, OID_AUTO, ether_gen_addr, CTLFLAG_RWTUN, + &use_ether_gen_addr, false, + "Generate MAC with FreeBSD OUI using ether_gen_addr(9)"); + struct epair_softc; struct epair_queue { struct mtx mtx; @@ -496,15 +506,29 @@ epair_clone_match(struct if_clone *ifc, const char *name) } static void +epair_generate_mac_byname(struct epair_softc *sc, uint8_t eaddr[]) +{ + struct ether_addr gen_eaddr; + int i; + + ether_gen_addr_byname(if_name(sc->ifp), &gen_eaddr); + for (i = 0; i < ETHER_ADDR_LEN; i++) + eaddr[i] = gen_eaddr.octet[i]; +} + +static void epair_clone_add(struct if_clone *ifc, struct epair_softc *scb) { struct ifnet *ifp; uint8_t eaddr[ETHER_ADDR_LEN]; /* 00:00:00:00:00:00 */ ifp = scb->ifp; - /* Copy epairNa etheraddr and change the last byte. */ - memcpy(eaddr, scb->oifp->if_hw_addr, ETHER_ADDR_LEN); - eaddr[5] = 0x0b; + if (!use_ether_gen_addr) { + /* Copy epairNa etheraddr and change the last byte. */ + memcpy(eaddr, scb->oifp->if_hw_addr, ETHER_ADDR_LEN); + eaddr[5] = 0x0b; + } else + epair_generate_mac_byname(scb, eaddr); ether_ifattach(ifp, eaddr); if_clone_addif(ifc, ifp); @@ -719,7 +743,10 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, /* Finish initialization of interface <n>a. */ ifp = sca->ifp; epair_setup_ifp(sca, name, unit); - epair_generate_mac(sca, eaddr); + if (!use_ether_gen_addr) + epair_generate_mac(sca, eaddr); + else + epair_generate_mac_byname(sca, eaddr); ether_ifattach(ifp, eaddr); diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index fe3e7bbd7fff..fe015632f33e 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -322,6 +322,8 @@ ovpn_sockaddr_compare(const struct sockaddr *a, if (a6->sin6_port != b6->sin6_port) return (false); + if (a6->sin6_scope_id != b6->sin6_scope_id) + return (false); return (memcmp(&a6->sin6_addr, &b6->sin6_addr, sizeof(a6->sin6_addr)) == 0); @@ -392,6 +394,8 @@ ovpn_nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *sa) { int af; + memset(sa, 0, sizeof(*sa)); + if (! nvlist_exists_number(nvl, "af")) return (EINVAL); if (! nvlist_exists_binary(nvl, "address")) @@ -432,6 +436,10 @@ ovpn_nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *sa) memcpy(&in6->sin6_addr, addr, sizeof(in6->sin6_addr)); in6->sin6_port = nvlist_get_number(nvl, "port"); + + if (nvlist_exists_number(nvl, "scopeid")) + in6->sin6_scope_id = nvlist_get_number(nvl, "scopeid"); + break; } #endif @@ -468,6 +476,7 @@ ovpn_add_sockaddr(nvlist_t *parent, const char *name, const struct sockaddr *s) nvlist_add_number(nvl, "port", s6->sin6_port); nvlist_add_binary(nvl, "address", &s6->sin6_addr, sizeof(s6->sin6_addr)); + nvlist_add_number(nvl, "scopeid", s6->sin6_scope_id); break; } default: @@ -725,7 +734,8 @@ ovpn_new_peer(struct ifnet *ifp, const nvlist_t *nvl) NET_EPOCH_ENTER(et); ret = in6_selectsrc_addr(curthread->td_proc->p_fibnum, &TO_IN6(&peer->remote)->sin6_addr, - 0, NULL, &TO_IN6(&peer->local)->sin6_addr, NULL); + TO_IN6(&peer->remote)->sin6_scope_id, NULL, + &TO_IN6(&peer->local)->sin6_addr, NULL); NET_EPOCH_EXIT(et); if (ret != 0) { goto error; @@ -2275,6 +2285,15 @@ ovpn_encap(struct ovpn_softc *sc, uint32_t peerid, struct mbuf *m) memcpy(&ip6->ip6_dst, &in6_remote->sin6_addr, sizeof(ip6->ip6_dst)); + if (IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src)) { + /* Local and remote must have the same scope. */ + ip6->ip6_src.__u6_addr.__u6_addr16[1] = + htons(in6_remote->sin6_scope_id & 0xffff); + } + if (IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_dst)) + ip6->ip6_dst.__u6_addr.__u6_addr16[1] = + htons(in6_remote->sin6_scope_id & 0xffff); + udp = mtodo(m, sizeof(*ip6)); udp->uh_sum = in6_cksum_pseudo(ip6, m->m_pkthdr.len - sizeof(struct ip6_hdr), diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 8dae95c2cc2e..c397f0b67896 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2338,6 +2338,10 @@ VNET_DECLARE(uma_zone_t, pf_udp_mapping_z); #define V_pf_udp_mapping_z VNET(pf_udp_mapping_z) VNET_DECLARE(uma_zone_t, pf_state_scrub_z); #define V_pf_state_scrub_z VNET(pf_state_scrub_z) +VNET_DECLARE(uma_zone_t, pf_anchor_z); +#define V_pf_anchor_z VNET(pf_anchor_z) +VNET_DECLARE(uma_zone_t, pf_eth_anchor_z); +#define V_pf_eth_anchor_z VNET(pf_eth_anchor_z) extern void pf_purge_thread(void *); extern void pf_unload_vnet_purge(void); diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h index c440223b81f8..51e68c310915 100644 --- a/sys/netinet/ip_fw.h +++ b/sys/netinet/ip_fw.h @@ -167,149 +167,149 @@ typedef struct _ip_fw3_opheader { */ enum ipfw_opcodes { /* arguments (4 byte each) */ - O_NOP, - - O_IP_SRC, /* u32 = IP */ - O_IP_SRC_MASK, /* ip = IP/mask */ - O_IP_SRC_ME, /* none */ - O_IP_SRC_SET, /* u32=base, arg1=len, bitmap */ - - O_IP_DST, /* u32 = IP */ - O_IP_DST_MASK, /* ip = IP/mask */ - O_IP_DST_ME, /* none */ - O_IP_DST_SET, /* u32=base, arg1=len, bitmap */ - - O_IP_SRCPORT, /* (n)port list:mask 4 byte ea */ - O_IP_DSTPORT, /* (n)port list:mask 4 byte ea */ - O_PROTO, /* arg1=protocol */ - - O_MACADDR2, /* 2 mac addr:mask */ - O_MAC_TYPE, /* same as srcport */ - - O_LAYER2, /* none */ - O_IN, /* none */ - O_FRAG, /* none */ - - O_RECV, /* none */ - O_XMIT, /* none */ - O_VIA, /* none */ - - O_IPOPT, /* arg1 = 2*u8 bitmap */ - O_IPLEN, /* arg1 = len */ - O_IPID, /* arg1 = id */ - - O_IPTOS, /* arg1 = id */ - O_IPPRECEDENCE, /* arg1 = precedence << 5 */ - O_IPTTL, /* arg1 = TTL */ - - O_IPVER, /* arg1 = version */ - O_UID, /* u32 = id */ - O_GID, /* u32 = id */ - O_ESTAB, /* none (tcp established) */ - O_TCPFLAGS, /* arg1 = 2*u8 bitmap */ - O_TCPWIN, /* arg1 = desired win */ - O_TCPSEQ, /* u32 = desired seq. */ - O_TCPACK, /* u32 = desired seq. */ - O_ICMPTYPE, /* u32 = icmp bitmap */ - O_TCPOPTS, /* arg1 = 2*u8 bitmap */ - - O_VERREVPATH, /* none */ - O_VERSRCREACH, /* none */ - - O_PROBE_STATE, /* v0:arg1=kidx, v1:kidx=kidx */ - O_KEEP_STATE, /* v0:arg1=kidx, v1:kidx=kidx */ - O_LIMIT, /* ipfw_insn_limit */ - O_LIMIT_PARENT, /* dyn_type, not an opcode. */ + O_NOP = 0, + + O_IP_SRC = 1, /* u32 = IP */ + O_IP_SRC_MASK = 2, /* ip = IP/mask */ + O_IP_SRC_ME = 3, /* none */ + O_IP_SRC_SET = 4, /* u32=base, arg1=len, bitmap */ + + O_IP_DST = 5, /* u32 = IP */ + O_IP_DST_MASK = 6, /* ip = IP/mask */ + O_IP_DST_ME = 7, /* none */ + O_IP_DST_SET = 8, /* u32=base, arg1=len, bitmap */ + + O_IP_SRCPORT = 9, /* (n)port list:mask 4 byte ea */ + O_IP_DSTPORT = 10, /* (n)port list:mask 4 byte ea */ + O_PROTO = 11, /* arg1=protocol */ + + O_MACADDR2 = 12, /* 2 mac addr:mask */ + O_MAC_TYPE = 13, /* same as srcport */ + + O_LAYER2 = 14, /* none */ + O_IN = 15, /* none */ + O_FRAG = 16, /* none */ + + O_RECV = 17, /* none */ + O_XMIT = 18, /* none */ + O_VIA = 19, /* none */ + + O_IPOPT = 20, /* arg1 = 2*u8 bitmap */ + O_IPLEN = 21, /* arg1 = len */ + O_IPID = 22, /* arg1 = id */ + + O_IPTOS = 23, /* arg1 = id */ + O_IPPRECEDENCE = 24, /* arg1 = precedence << 5 */ + O_IPTTL = 25, /* arg1 = TTL */ + + O_IPVER = 26, /* arg1 = version */ + O_UID = 27, /* u32 = id */ + O_GID = 28, /* u32 = id */ + O_ESTAB = 29, /* none (tcp established) */ + O_TCPFLAGS = 30, /* arg1 = 2*u8 bitmap */ + O_TCPWIN = 31, /* arg1 = desired win */ + O_TCPSEQ = 32, /* u32 = desired seq. */ + O_TCPACK = 33, /* u32 = desired seq. */ + O_ICMPTYPE = 34, /* u32 = icmp bitmap */ + O_TCPOPTS = 35, /* arg1 = 2*u8 bitmap */ + + O_VERREVPATH = 36, /* none */ + O_VERSRCREACH = 37, /* none */ + + O_PROBE_STATE = 38, /* v0:arg1=kidx, v1:kidx=kidx */ + O_KEEP_STATE = 39, /* v0:arg1=kidx, v1:kidx=kidx */ + O_LIMIT = 40, /* ipfw_insn_limit */ + O_LIMIT_PARENT = 41, /* dyn_type, not an opcode. */ /* * These are really 'actions'. */ - O_LOG, /* ipfw_insn_log */ - O_PROB, /* u32 = match probability */ + O_LOG = 42, /* ipfw_insn_log */ + O_PROB = 43, /* u32 = match probability */ - O_CHECK_STATE, /* v0:arg1=kidx, v1:kidx=kidx */ - O_ACCEPT, /* none */ - O_DENY, /* none */ - O_REJECT, /* arg1=icmp arg (same as deny) */ - O_COUNT, /* none */ - O_SKIPTO, /* v0:arg1=next rule number */ + O_CHECK_STATE = 44, /* v0:arg1=kidx, v1:kidx=kidx */ + O_ACCEPT = 45, /* none */ + O_DENY = 46, /* none */ + O_REJECT = 47, /* arg1=icmp arg (same as deny) */ + O_COUNT = 48, /* none */ + O_SKIPTO = 49, /* v0:arg1=next rule number */ /* v1:kidx= next rule number */ - O_PIPE, /* arg1=pipe number */ - O_QUEUE, /* arg1=queue number */ - O_DIVERT, /* arg1=port number */ - O_TEE, /* arg1=port number */ - O_FORWARD_IP, /* fwd sockaddr */ - O_FORWARD_MAC, /* fwd mac */ - O_NAT, /* nope */ - O_REASS, /* none */ + O_PIPE = 50, /* arg1=pipe number */ + O_QUEUE = 51, /* arg1=queue number */ + O_DIVERT = 52, /* arg1=port number */ + O_TEE = 53, /* arg1=port number */ + O_FORWARD_IP = 54, /* fwd sockaddr */ + O_FORWARD_MAC = 55, /* fwd mac */ + O_NAT = 56, /* nope */ + O_REASS = 57, /* none */ /* * More opcodes. */ - O_IPSEC, /* has ipsec history */ - O_IP_SRC_LOOKUP, /* v0:arg1=table number, u32=value */ + O_IPSEC = 58, /* has ipsec history */ + O_IP_SRC_LOOKUP = 59, /* v0:arg1=table number, u32=value */ /* v1:kidx=name, u32=value, arg1=key */ - O_IP_DST_LOOKUP, /* arg1=table number, u32=value */ + O_IP_DST_LOOKUP = 60, /* arg1=table number, u32=value */ /* v1:kidx=name, u32=value, arg1=key */ - O_ANTISPOOF, /* none */ - O_JAIL, /* u32 = id */ - O_ALTQ, /* u32 = altq classif. qid */ - O_DIVERTED, /* arg1=bitmap (1:loop, 2:out) */ - O_TCPDATALEN, /* arg1 = tcp data len */ - O_IP6_SRC, /* address without mask */ - O_IP6_SRC_ME, /* my addresses */ - O_IP6_SRC_MASK, /* address with the mask */ - O_IP6_DST, - O_IP6_DST_ME, - O_IP6_DST_MASK, - O_FLOW6ID, /* for flow id tag in the ipv6 pkt */ - O_ICMP6TYPE, /* icmp6 packet type filtering */ - O_EXT_HDR, /* filtering for ipv6 extension header */ - O_IP6, + O_ANTISPOOF = 61, /* none */ + O_JAIL = 62, /* u32 = id */ + O_ALTQ = 63, /* u32 = altq classif. qid */ + O_DIVERTED = 64, /* arg1=bitmap (1:loop, 2:out) */ + O_TCPDATALEN = 65, /* arg1 = tcp data len */ + O_IP6_SRC = 66, /* address without mask */ + O_IP6_SRC_ME = 67, /* my addresses */ + O_IP6_SRC_MASK = 68, /* address with the mask */ + O_IP6_DST = 69, + O_IP6_DST_ME = 70, + O_IP6_DST_MASK = 71, + O_FLOW6ID = 72, /* for flow id tag in the ipv6 pkt */ + O_ICMP6TYPE = 73, /* icmp6 packet type filtering */ + O_EXT_HDR = 74, /* filtering for ipv6 extension header */ + O_IP6 = 75, /* * actions for ng_ipfw */ - O_NETGRAPH, /* send to ng_ipfw */ - O_NGTEE, /* copy to ng_ipfw */ + O_NETGRAPH = 76, /* send to ng_ipfw */ + O_NGTEE = 77, /* copy to ng_ipfw */ - O_IP4, + O_IP4 = 78, - O_UNREACH6, /* arg1=icmpv6 code arg (deny) */ + O_UNREACH6 = 79, /* arg1=icmpv6 code arg (deny) */ - O_TAG, /* arg1=tag number */ - O_TAGGED, /* arg1=tag number */ + O_TAG = 80, /* arg1=tag number */ + O_TAGGED = 81, /* arg1=tag number */ - O_SETFIB, /* arg1=FIB number */ - O_FIB, /* arg1=FIB desired fib number */ + O_SETFIB = 82, /* arg1=FIB number */ + O_FIB = 83, /* arg1=FIB desired fib number */ - O_SOCKARG, /* socket argument */ + O_SOCKARG = 84, /* socket argument */ - O_CALLRETURN, /* v0:arg1=called rule number */ + O_CALLRETURN = 85, /* v0:arg1=called rule number */ /* v1:kidx=called rule number */ - O_FORWARD_IP6, /* fwd sockaddr_in6 */ + O_FORWARD_IP6 = 86, /* fwd sockaddr_in6 */ - O_DSCP, /* 2 u32 = DSCP mask */ - O_SETDSCP, /* arg1=DSCP value */ - O_IP_FLOW_LOOKUP, /* v0:arg1=table number, u32=value */ + O_DSCP = 87, /* 2 u32 = DSCP mask */ + O_SETDSCP = 88, /* arg1=DSCP value */ + O_IP_FLOW_LOOKUP = 89, /* v0:arg1=table number, u32=value */ /* v1:kidx=name, u32=value */ - O_EXTERNAL_ACTION, /* v0:arg1=id of external action handler */ + O_EXTERNAL_ACTION = 90, /* v0:arg1=id of external action handler */ /* v1:kidx=id of external action handler */ - O_EXTERNAL_INSTANCE, /* v0:arg1=id of eaction handler instance */ + O_EXTERNAL_INSTANCE = 91, /* v0:arg1=id of eaction handler instance */ /* v1:kidx=id of eaction handler instance */ - O_EXTERNAL_DATA, /* variable length data */ + O_EXTERNAL_DATA = 92, /* variable length data */ - O_SKIP_ACTION, /* none */ - O_TCPMSS, /* arg1=MSS value */ + O_SKIP_ACTION = 93, /* none */ + O_TCPMSS = 94, /* arg1=MSS value */ - O_MAC_SRC_LOOKUP, /* kidx=name, u32=value, arg1=key */ - O_MAC_DST_LOOKUP, /* kidx=name, u32=value, arg1=key */ + O_MAC_SRC_LOOKUP = 95, /* kidx=name, u32=value, arg1=key */ + O_MAC_DST_LOOKUP = 96, /* kidx=name, u32=value, arg1=key */ - O_SETMARK, /* u32 = value */ - O_MARK, /* 2 u32 = value, bitmask */ + O_SETMARK = 97, /* u32 = value */ + O_MARK = 98, /* 2 u32 = value, bitmask */ O_LAST_OPCODE /* not an opcode! */ }; diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index bc5b42ee6f2c..2dfb7faf56e3 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1250,7 +1250,7 @@ send: * fack acks recoverypoint. */ if ((tp->t_flags & TF_LRD) && SEQ_GEQ(p->rxmit, p->end)) - p->rxmit = tp->snd_recover; + p->rxmit = SEQ_MAX(p->rxmit, tp->snd_recover); tp->sackhint.sack_bytes_rexmit += len; } if (IN_RECOVERY(tp->t_flags)) { diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 4405098a8620..b6c55fac50b3 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -283,7 +283,7 @@ tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_start, tcp_seq rcv_end) INP_WLOCK_ASSERT(tptoinpcb(tp)); /* Check arguments. */ - KASSERT(SEQ_LEQ(rcv_start, rcv_end), ("rcv_start <= rcv_end")); + KASSERT(SEQ_LEQ(rcv_start, rcv_end), ("SEG_GT(rcv_start, rcv_end)")); if ((rcv_start == rcv_end) && (tp->rcv_numsacks >= 1) && @@ -498,8 +498,8 @@ tcp_sackhole_free(struct tcpcb *tp, struct sackhole *hole) tp->snd_numholes--; atomic_subtract_int(&V_tcp_sack_globalholes, 1); - KASSERT(tp->snd_numholes >= 0, ("tp->snd_numholes >= 0")); - KASSERT(V_tcp_sack_globalholes >= 0, ("tcp_sack_globalholes >= 0")); + KASSERT(tp->snd_numholes >= 0, ("tp->snd_numholes < 0")); + KASSERT(V_tcp_sack_globalholes >= 0, ("tcp_sack_globalholes < 0")); } /* @@ -583,6 +583,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) */ if (SEQ_LT(tp->snd_una, th_ack) && !TAILQ_EMPTY(&tp->snd_holes)) { left_edge_delta = th_ack - tp->snd_una; + delivered_data += left_edge_delta; sack_blocks[num_sack_blks].start = tp->snd_una; sack_blocks[num_sack_blks++].end = th_ack; /* @@ -590,7 +591,6 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) * due to DSACK blocks */ if (SEQ_LT(tp->snd_fack, th_ack)) { - delivered_data += th_ack - tp->snd_una; tp->snd_fack = th_ack; sack_changed = SACK_CHANGE; } @@ -684,7 +684,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) delivered_data += sblkp->end - sblkp->start; tp->sackhint.hole_bytes += temp->end - temp->start; KASSERT(tp->sackhint.hole_bytes >= 0, - ("sackhint hole bytes >= 0")); + ("sackhint hole bytes < 0")); tp->snd_fack = sblkp->end; sblkp--; sack_changed = SACK_NEWLOSS; @@ -783,7 +783,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) tp->sackhint.sack_bytes_rexmit -= (SEQ_MIN(cur->rxmit, cur->end) - cur->start); KASSERT(tp->sackhint.sack_bytes_rexmit >= 0, - ("sackhint bytes rtx >= 0")); + ("sackhint bytes rtx < 0")); sack_changed = SACK_CHANGE; if (SEQ_LEQ(sblkp->start, cur->start)) { /* Data acks at least the beginning of hole. */ @@ -816,7 +816,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) cur->end = sblkp->start; cur->rxmit = SEQ_MIN(cur->rxmit, cur->end); if ((tp->t_flags & TF_LRD) && SEQ_GEQ(cur->rxmit, cur->end)) - cur->rxmit = tp->snd_recover; + cur->rxmit = SEQ_MAX(cur->rxmit, tp->snd_recover); } else { /* * ACKs some data in middle of a hole; need @@ -843,7 +843,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) cur->rxmit = SEQ_MIN(cur->rxmit, cur->end); if ((tp->t_flags & TF_LRD) && SEQ_GEQ(cur->rxmit, cur->end)) - cur->rxmit = tp->snd_recover; + cur->rxmit = SEQ_MAX(cur->rxmit, tp->snd_recover); delivered_data += (sblkp->end - sblkp->start); } } @@ -874,13 +874,13 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) if (TAILQ_EMPTY(&tp->snd_holes)) { KASSERT(tp->sackhint.hole_bytes == 0, - ("SACK scoreboard empty, but accounting non-zero\n")); + ("SACK scoreboard empty, but sackhint hole bytes != 0")); tp->sackhint.sack_bytes_rexmit = 0; tp->sackhint.sacked_bytes = 0; tp->sackhint.lost_bytes = 0; } else { KASSERT(tp->sackhint.hole_bytes > 0, - ("SACK scoreboard not empty, but has no bytes\n")); + ("SACK scoreboard not empty, but sackhint hole bytes <= 0")); tp->sackhint.delivered_data = delivered_data; tp->sackhint.sacked_bytes += delivered_data - left_edge_delta; KASSERT((tp->sackhint.sacked_bytes >= 0), ("sacked_bytes < 0")); @@ -918,9 +918,9 @@ tcp_free_sackholes(struct tcpcb *tp) tp->sackhint.hole_bytes = 0; tp->sackhint.lost_bytes = 0; - KASSERT(tp->snd_numholes == 0, ("tp->snd_numholes == 0")); + KASSERT(tp->snd_numholes == 0, ("tp->snd_numholes != 0")); KASSERT(tp->sackhint.nexthole == NULL, - ("tp->sackhint.nexthole == NULL")); + ("tp->sackhint.nexthole != NULL")); } /* @@ -1061,11 +1061,15 @@ tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt) } } } - KASSERT(SEQ_LT(hole->start, hole->end), ("%s: hole.start >= hole.end", __func__)); + KASSERT(SEQ_LT(hole->start, hole->end), + ("%s: SEQ_GEQ(hole.start, hole.end)", __func__)); if (!(V_tcp_do_newsack)) { - KASSERT(SEQ_LT(hole->start, tp->snd_fack), ("%s: hole.start >= snd.fack", __func__)); - KASSERT(SEQ_LT(hole->end, tp->snd_fack), ("%s: hole.end >= snd.fack", __func__)); - KASSERT(SEQ_LT(hole->rxmit, tp->snd_fack), ("%s: hole.rxmit >= snd.fack", __func__)); + KASSERT(SEQ_LT(hole->start, tp->snd_fack), + ("%s: SEG_GEQ(hole.start, snd.fack)", __func__)); + KASSERT(SEQ_LT(hole->end, tp->snd_fack), + ("%s: SEG_GEQ(hole.end, snd.fack)", __func__)); + KASSERT(SEQ_LT(hole->rxmit, tp->snd_fack), + ("%s: SEQ_GEQ(hole.rxmit, snd.fack)", __func__)); if (SEQ_GEQ(hole->start, hole->end) || SEQ_GEQ(hole->start, tp->snd_fack) || SEQ_GEQ(hole->end, tp->snd_fack) || diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index d1c4ba58bf55..fb013d3d17f0 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -509,11 +509,9 @@ void ctf_do_dropwithreset(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t rstreason, int32_t tlen) { - if (tp != NULL) { - tcp_dropwithreset(m, th, tp, tlen, rstreason); + tcp_dropwithreset(m, th, tp, tlen, rstreason); + if (tp != NULL) INP_WUNLOCK(tptoinpcb(tp)); - } else - tcp_dropwithreset(m, th, NULL, tlen, rstreason); } void diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c index c129c8c49921..3f810533b7fc 100644 --- a/sys/netpfil/ipfw/ip_fw2.c +++ b/sys/netpfil/ipfw/ip_fw2.c @@ -3680,6 +3680,7 @@ vnet_ipfw_init(const void *unused) IPFW_LOCK_INIT(chain); + ipfw_dyn_init(chain); /* fill and insert the default rule */ rule = ipfw_alloc_rule(chain, sizeof(struct ip_fw)); rule->flags |= IPFW_RULE_NOOPT; @@ -3689,7 +3690,6 @@ vnet_ipfw_init(const void *unused) chain->default_rule = rule; ipfw_add_protected_rule(chain, rule, 0); - ipfw_dyn_init(chain); ipfw_eaction_init(chain, first); ipfw_init_skipto_cache(chain); ipfw_bpf_init(first); diff --git a/sys/netpfil/ipfw/ip_fw_dynamic.c b/sys/netpfil/ipfw/ip_fw_dynamic.c index 40598cef8076..cfb686594c7c 100644 --- a/sys/netpfil/ipfw/ip_fw_dynamic.c +++ b/sys/netpfil/ipfw/ip_fw_dynamic.c @@ -1323,6 +1323,33 @@ dyn_lookup_ipv6_parent_locked(const struct ipfw_flow_id *pkt, uint32_t zoneid, #endif /* INET6 */ +static int +dyn_handle_orphaned(struct ip_fw *old_rule, struct dyn_data *data) +{ + struct ip_fw *rule; + const ipfw_insn *cmd, *old_cmd; + + old_cmd = ACTION_PTR(old_rule); + switch (old_cmd->opcode) { + case O_SETMARK: + case O_SKIPTO: + /* + * Rule pointer was changed. For O_SKIPTO action it can be + * dangerous to keep use old rule. If new rule has the same + * action and the same destination number, then use this dynamic + * state. Otherwise it is better to create new one. + */ + rule = V_layer3_chain.map[data->f_pos]; + cmd = ACTION_PTR(rule); + if (cmd->opcode != old_cmd->opcode || + cmd->len != old_cmd->len || cmd->arg1 != old_cmd->arg1 || + insntoc(cmd, u32)->d[0] != insntoc(old_cmd, u32)->d[0]) + return (-1); + break; + } + return (0); +} + /* * Lookup dynamic state. * pkt - filled by ipfw_chk() ipfw_flow_id; @@ -1426,8 +1453,13 @@ ipfw_dyn_lookup_state(const struct ip_fw_args *args, const void *ulp, * changed to point to the penultimate rule. */ MPASS(V_layer3_chain.n_rules > 1); - data->chain_id = V_layer3_chain.id; - data->f_pos = V_layer3_chain.n_rules - 2; + if (dyn_handle_orphaned(rule, data) == 0) { + data->chain_id = V_layer3_chain.id; + data->f_pos = V_layer3_chain.n_rules - 2; + } else { + rule = NULL; + info->direction = MATCH_NONE; + } } else { rule = NULL; info->direction = MATCH_NONE; @@ -3109,6 +3141,43 @@ ipfw_dump_states(struct ip_fw_chain *chain, struct sockopt_data *sd) #undef DYN_EXPORT_STATES } +/* + * When we have enabled V_dyn_keep_states, states that become ORPHANED + * will keep pointer to original rule. Then this rule pointer is used + * to apply rule action after ipfw_dyn_lookup_state(). + * Some rule actions use IPFW_INC_RULE_COUNTER() directly to this rule + * pointer, but other actions use chain->map[f_pos] instead. The last + * case leads to incrementing counters on the wrong rule, because + * ORPHANED states have not parent rule in chain->map[]. + * To solve this we add protected rule: + * count ip from any to any not // comment + * It will be matched only by packets that are handled by ORPHANED states. + */ +static void +dyn_add_protected_rule(struct ip_fw_chain *chain) +{ + static const char *comment = + "orphaned dynamic states counter"; + struct ip_fw *rule; + ipfw_insn *cmd; + size_t l; + + l = roundup(strlen(comment) + 1, sizeof(uint32_t)); + rule = ipfw_alloc_rule(chain, sizeof(*rule) + sizeof(ipfw_insn) + l); + cmd = rule->cmd; + cmd->opcode = O_NOP; + cmd->len = 1 + l/sizeof(uint32_t); + cmd->len |= F_NOT; /* make rule to be not matched */ + strcpy((char *)(cmd + 1), comment); + cmd += F_LEN(cmd); + + cmd->len = 1; + cmd->opcode = O_COUNT; + rule->act_ofs = cmd - rule->cmd; + rule->cmd_len = rule->act_ofs + 1; + ipfw_add_protected_rule(chain, rule, 0); +} + void ipfw_dyn_init(struct ip_fw_chain *chain) { @@ -3171,6 +3240,8 @@ ipfw_dyn_init(struct ip_fw_chain *chain) callout_init(&V_dyn_timeout, 1); callout_reset(&V_dyn_timeout, hz, dyn_tick, curvnet); IPFW_ADD_OBJ_REWRITER(IS_DEFAULT_VNET(curvnet), dyn_opcodes); + + dyn_add_protected_rule(chain); } void diff --git a/sys/netpfil/ipfw/ip_fw_private.h b/sys/netpfil/ipfw/ip_fw_private.h index 79b3ed43f63b..c490d2849a7d 100644 --- a/sys/netpfil/ipfw/ip_fw_private.h +++ b/sys/netpfil/ipfw/ip_fw_private.h @@ -489,6 +489,7 @@ struct obj_idx { struct rule_check_info { uint16_t flags; /* rule-specific check flags */ +#define IPFW_RCIFLAG_HAS_STATE 0x0001 uint16_t object_opcodes; /* num of opcodes referencing objects */ uint16_t urule_numoff; /* offset of rulenum in bytes */ uint8_t version; /* rule version */ diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c index 19f5fff2749a..5d57759ffb00 100644 --- a/sys/netpfil/ipfw/ip_fw_sockopt.c +++ b/sys/netpfil/ipfw/ip_fw_sockopt.c @@ -1311,6 +1311,9 @@ ipfw_check_rule(struct ip_fw_rule *rule, size_t size, return (check_ipfw_rule_body(rule->cmd, rule->cmd_len, ci)); } +#define CHECK_TARG(a, c) \ + ((a) == IP_FW_TARG && ((c)->flags & IPFW_RCIFLAG_HAS_STATE)) + enum ipfw_opcheck_result ipfw_check_opcode(ipfw_insn **pcmd, int *plen, struct rule_check_info *ci) { @@ -1326,6 +1329,7 @@ ipfw_check_opcode(ipfw_insn **pcmd, int *plen, struct rule_check_info *ci) if (cmdlen != F_INSN_SIZE(ipfw_insn_kidx)) return (BAD_SIZE); ci->object_opcodes++; + ci->flags |= IPFW_RCIFLAG_HAS_STATE; break; case O_PROTO: case O_IP_SRC_ME: @@ -1410,6 +1414,8 @@ ipfw_check_opcode(ipfw_insn **pcmd, int *plen, struct rule_check_info *ci) cmd->arg1 & 0x7FFF); return (FAILED); } + if (CHECK_TARG(cmd->arg1, ci)) + goto bad_targ; return (CHECK_ACTION); case O_UID: @@ -1518,11 +1524,16 @@ ipfw_check_opcode(ipfw_insn **pcmd, int *plen, struct rule_check_info *ci) case O_QUEUE: if (cmdlen != F_INSN_SIZE(ipfw_insn)) return (BAD_SIZE); + if (CHECK_TARG(cmd->arg1, ci)) + goto bad_targ; return (CHECK_ACTION); case O_FORWARD_IP: if (cmdlen != F_INSN_SIZE(ipfw_insn_sa)) return (BAD_SIZE); + if (insntoc(cmd, sa)->sa.sin_addr.s_addr == INADDR_ANY && + (ci->flags & IPFW_RCIFLAG_HAS_STATE)) + goto bad_targ; return (CHECK_ACTION); #ifdef INET6 case O_FORWARD_IP6: @@ -1537,6 +1548,8 @@ ipfw_check_opcode(ipfw_insn **pcmd, int *plen, struct rule_check_info *ci) return (FAILED); if (cmdlen != F_INSN_SIZE(ipfw_insn)) return (BAD_SIZE); + if (CHECK_TARG(cmd->arg1, ci)) + goto bad_targ; return (CHECK_ACTION); case O_NETGRAPH: case O_NGTEE: @@ -1544,12 +1557,16 @@ ipfw_check_opcode(ipfw_insn **pcmd, int *plen, struct rule_check_info *ci) return (FAILED); if (cmdlen != F_INSN_SIZE(ipfw_insn)) return (BAD_SIZE); + if (CHECK_TARG(cmd->arg1, ci)) + goto bad_targ; return (CHECK_ACTION); case O_NAT: if (!IPFW_NAT_LOADED) return (FAILED); if (cmdlen != F_INSN_SIZE(ipfw_insn_nat)) return (BAD_SIZE); + if (CHECK_TARG(cmd->arg1, ci)) + goto bad_targ; return (CHECK_ACTION); case O_SKIPTO: @@ -1557,6 +1574,11 @@ ipfw_check_opcode(ipfw_insn **pcmd, int *plen, struct rule_check_info *ci) case O_SETMARK: if (cmdlen != F_INSN_SIZE(ipfw_insn_u32)) return (BAD_SIZE); + /* O_CALLRETURN + F_NOT means 'return' opcode. */ + if (cmd->opcode != O_CALLRETURN || (cmd->len & F_NOT) == 0) { + if (CHECK_TARG(insntoc(cmd, u32)->d[0], ci)) + goto bad_targ; + } return (CHECK_ACTION); case O_CHECK_STATE: @@ -1577,6 +1599,8 @@ ipfw_check_opcode(ipfw_insn **pcmd, int *plen, struct rule_check_info *ci) case O_REASS: if (cmdlen != F_INSN_SIZE(ipfw_insn)) return (BAD_SIZE); + if (cmd->opcode == O_SETDSCP && CHECK_TARG(cmd->arg1, ci)) + goto bad_targ; return (CHECK_ACTION); #ifdef INET6 case O_IP6_SRC: @@ -1627,6 +1651,13 @@ ipfw_check_opcode(ipfw_insn **pcmd, int *plen, struct rule_check_info *ci) } } return (SUCCESS); +bad_targ: + /* + * For dynamic states we can not correctly initialize tablearg value, + * because we don't go through rule's opcodes except rule action. + */ + printf("ipfw: tablearg is not allowed with dynamic states\n"); + return (FAILED); } static __noinline int diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index f6ee02626624..3fa7789efcfe 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -409,14 +409,14 @@ static void pf_mtag_free(struct m_tag *); static void pf_packet_rework_nat(struct pf_pdesc *, int, struct pf_state_key *); #ifdef INET -static void pf_route(struct pf_krule *, +static int pf_route(struct pf_krule *, struct ifnet *, struct pf_kstate *, struct pf_pdesc *, struct inpcb *); #endif /* INET */ #ifdef INET6 static void pf_change_a6(struct pf_addr *, u_int16_t *, struct pf_addr *, u_int8_t); -static void pf_route6(struct pf_krule *, +static int pf_route6(struct pf_krule *, struct ifnet *, struct pf_kstate *, struct pf_pdesc *, struct inpcb *); #endif /* INET6 */ @@ -621,7 +621,7 @@ static void pf_packet_rework_nat(struct pf_pdesc *pd, int off, struct pf_state_key *nk) { - switch (pd->proto) { + switch (pd->virtual_proto) { case IPPROTO_TCP: { struct tcphdr *th = &pd->hdr.tcp; @@ -1254,6 +1254,21 @@ pf_initialize(void) MTX_DEF | MTX_DUPOK); } + /* Anchors */ + V_pf_anchor_z = uma_zcreate("pf anchors", + sizeof(struct pf_kanchor), NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, 0); + V_pf_limits[PF_LIMIT_ANCHORS].zone = V_pf_anchor_z; + uma_zone_set_max(V_pf_anchor_z, PF_ANCHOR_HIWAT); + uma_zone_set_warning(V_pf_anchor_z, "PF anchor limit reached"); + + V_pf_eth_anchor_z = uma_zcreate("pf Ethernet anchors", + sizeof(struct pf_keth_anchor), NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, 0); + V_pf_limits[PF_LIMIT_ETH_ANCHORS].zone = V_pf_eth_anchor_z; + uma_zone_set_max(V_pf_eth_anchor_z, PF_ANCHOR_HIWAT); + uma_zone_set_warning(V_pf_eth_anchor_z, "PF Ethernet anchor limit reached"); + /* ALTQ */ TAILQ_INIT(&V_pf_altqs[0]); TAILQ_INIT(&V_pf_altqs[1]); @@ -6376,7 +6391,7 @@ pf_translate_compat(struct pf_test_ctx *ctx) KASSERT(ctx->sk != NULL, ("%s: null sk", __func__)); KASSERT(ctx->nk != NULL, ("%s: null nk", __func__)); - switch (pd->proto) { + switch (pd->virtual_proto) { case IPPROTO_TCP: if (PF_ANEQ(&pd->nsaddr, &nk->addr[pd->sidx], pd->af) || nk->port[pd->sidx] != pd->nsport) { @@ -8914,7 +8929,7 @@ pf_routable(struct pf_addr *addr, sa_family_t af, struct pfi_kkif *kif, } #ifdef INET -static void +static int pf_route(struct pf_krule *r, struct ifnet *oifp, struct pf_kstate *s, struct pf_pdesc *pd, struct inpcb *inp) { @@ -8929,6 +8944,7 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, uint16_t tmp; int r_dir; bool skip_test = false; + int action = PF_PASS; KASSERT(pd->m && r && oifp, ("%s: invalid parameters", __func__)); @@ -8950,6 +8966,7 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, m0 = pd->m; pd->m = NULL; SDT_PROBE1(pf, ip, route_to, drop, __LINE__); + action = PF_DROP; goto bad_locked; } @@ -8963,11 +8980,12 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, } if (ifp == oifp) { /* When the 2nd interface is not skipped */ - return; + return (action); } else { m0 = pd->m; pd->m = NULL; SDT_PROBE1(pf, ip, route_to, drop, __LINE__); + action = PF_DROP; goto bad; } } else { @@ -8975,7 +8993,7 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, if (((m0 = m_dup(pd->m, M_NOWAIT)) == NULL)) { if (s) PF_STATE_UNLOCK(s); - return; + return (action); } } } else { @@ -8984,7 +9002,7 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, pf_dummynet(pd, s, r, &pd->m); if (s) PF_STATE_UNLOCK(s); - return; + return (action); } else { if (r_dir == PF_IN) { skip_test = true; @@ -9024,6 +9042,7 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, pf_send_icmp(m0, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, 0, pd->af, r, pd->act.rtableid); + action = PF_DROP; goto bad_locked; } ip->ip_ttl -= IPTTLDEC; @@ -9070,6 +9089,7 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, if (ifp == NULL) { m0 = pd->m; pd->m = NULL; + action = PF_DROP; SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad; } @@ -9080,9 +9100,11 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, if (pd->dir == PF_IN && !skip_test) { if (pf_test(AF_INET, PF_OUT, PFIL_FWD, ifp, &m0, inp, &pd->act) != PF_PASS) { + action = PF_DROP; SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad; } else if (m0 == NULL) { + action = PF_DROP; SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto done; } @@ -9090,6 +9112,7 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, DPFPRINTF(PF_DEBUG_URGENT, "%s: m0->m_len < sizeof(struct ip)", __func__); SDT_PROBE1(pf, ip, route_to, drop, __LINE__); + action = PF_DROP; goto bad; } ip = mtod(m0, struct ip *); @@ -9171,12 +9194,14 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, ifp->if_mtu, pd->af, r, pd->act.rtableid); } SDT_PROBE1(pf, ip, route_to, drop, __LINE__); + action = PF_DROP; goto bad; } error = ip_fragment(ip, &m0, ifp->if_mtu, ifp->if_hwassist); if (error) { SDT_PROBE1(pf, ip, route_to, drop, __LINE__); + action = PF_DROP; goto bad; } @@ -9203,7 +9228,9 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, done: if (pd->act.rt != PF_DUPTO) pd->m = NULL; - return; + else + action = PF_PASS; + return (action); bad_locked: if (s) @@ -9215,7 +9242,7 @@ bad: #endif /* INET */ #ifdef INET6 -static void +static int pf_route6(struct pf_krule *r, struct ifnet *oifp, struct pf_kstate *s, struct pf_pdesc *pd, struct inpcb *inp) { @@ -9226,6 +9253,7 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, struct ifnet *ifp = NULL; int r_dir; bool skip_test = false; + int action = PF_PASS; KASSERT(pd->m && r && oifp, ("%s: invalid parameters", __func__)); @@ -9246,6 +9274,7 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, pd->pf_mtag->routed++ > 3) { m0 = pd->m; pd->m = NULL; + action = PF_DROP; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad_locked; } @@ -9260,10 +9289,11 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, } if (ifp == oifp) { /* When the 2nd interface is not skipped */ - return; + return (action); } else { m0 = pd->m; pd->m = NULL; + action = PF_DROP; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; } @@ -9272,7 +9302,7 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, if (((m0 = m_dup(pd->m, M_NOWAIT)) == NULL)) { if (s) PF_STATE_UNLOCK(s); - return; + return (action); } } } else { @@ -9281,7 +9311,7 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, pf_dummynet(pd, s, r, &pd->m); if (s) PF_STATE_UNLOCK(s); - return; + return (action); } else { if (r_dir == PF_IN) { skip_test = true; @@ -9321,6 +9351,7 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, pf_send_icmp(m0, ICMP6_TIME_EXCEEDED, ICMP6_TIME_EXCEED_TRANSIT, 0, pd->af, r, pd->act.rtableid); + action = PF_DROP; goto bad_locked; } ip6->ip6_hlim -= IPV6_HLIMDEC; @@ -9375,6 +9406,7 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, if (ifp == NULL) { m0 = pd->m; pd->m = NULL; + action = PF_DROP; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; } @@ -9385,9 +9417,11 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, if (pd->dir == PF_IN && !skip_test) { if (pf_test(AF_INET6, PF_OUT, PFIL_FWD | PF_PFIL_NOREFRAGMENT, ifp, &m0, inp, &pd->act) != PF_PASS) { + action = PF_DROP; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; } else if (m0 == NULL) { + action = PF_DROP; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto done; } @@ -9395,6 +9429,7 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, DPFPRINTF(PF_DEBUG_URGENT, "%s: m0->m_len < sizeof(struct ip6_hdr)", __func__); + action = PF_DROP; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; } @@ -9470,6 +9505,7 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, pf_send_icmp(m0, ICMP6_PACKET_TOO_BIG, 0, ifp->if_mtu, pd->af, r, pd->act.rtableid); } + action = PF_DROP; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; } @@ -9477,7 +9513,9 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, done: if (pd->act.rt != PF_DUPTO) pd->m = NULL; - return; + else + action = PF_PASS; + return (action); bad_locked: if (s) @@ -11033,15 +11071,18 @@ done: break; } #ifdef INET - if (pd.naf == AF_INET) - pf_route(r, kif->pfik_ifp, s, &pd, inp); + if (pd.naf == AF_INET) { + action = pf_route(r, kif->pfik_ifp, s, &pd, + inp); + } #endif /* INET */ #ifdef INET6 - if (pd.naf == AF_INET6) - pf_route6(r, kif->pfik_ifp, s, &pd, inp); + if (pd.naf == AF_INET6) { + action = pf_route6(r, kif->pfik_ifp, s, &pd, + inp); +} #endif /* INET6 */ *m0 = pd.m; - action = PF_PASS; goto out; break; default: @@ -11050,13 +11091,15 @@ done: #ifdef INET case AF_INET: /* pf_route() returns unlocked. */ - pf_route(r, kif->pfik_ifp, s, &pd, inp); + action = pf_route(r, kif->pfik_ifp, s, &pd, + inp); break; #endif /* INET */ #ifdef INET6 case AF_INET6: /* pf_route6() returns unlocked. */ - pf_route6(r, kif->pfik_ifp, s, &pd, inp); + action = pf_route6(r, kif->pfik_ifp, s, &pd, + inp); break; #endif /* INET6 */ } diff --git a/sys/netpfil/pf/pf.h b/sys/netpfil/pf/pf.h index cfff58064922..51b3fd6390e1 100644 --- a/sys/netpfil/pf/pf.h +++ b/sys/netpfil/pf/pf.h @@ -120,7 +120,8 @@ enum { enum { PF_NOPFROUTE, PF_FASTROUTE, PF_ROUTETO, PF_DUPTO, PF_REPLYTO }; enum { PF_LIMIT_STATES, PF_LIMIT_SRC_NODES, PF_LIMIT_FRAGS, - PF_LIMIT_TABLE_ENTRIES, PF_LIMIT_MAX }; + PF_LIMIT_TABLE_ENTRIES, PF_LIMIT_ANCHORS, PF_LIMIT_ETH_ANCHORS, + PF_LIMIT_MAX }; #define PF_POOL_IDMASK 0x0f enum { PF_POOL_NONE, PF_POOL_BITMASK, PF_POOL_RANDOM, PF_POOL_SRCHASH, PF_POOL_ROUNDROBIN }; @@ -490,6 +491,7 @@ struct pf_osfp_ioctl { #define PF_ANCHOR_NAME_SIZE 64 #define PF_ANCHOR_MAXPATH (MAXPATHLEN - PF_ANCHOR_NAME_SIZE - 1) +#define PF_ANCHOR_HIWAT 512 #define PF_OPTIMIZER_TABLE_PFX "__automatic_" struct pf_rule { diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 178ee01649c6..b6f5d74b5b42 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -331,6 +331,8 @@ pfattach_vnet(void) V_pf_limits[PF_LIMIT_STATES].limit = PFSTATE_HIWAT; V_pf_limits[PF_LIMIT_SRC_NODES].limit = PFSNODE_HIWAT; + V_pf_limits[PF_LIMIT_ANCHORS].limit = PF_ANCHOR_HIWAT; + V_pf_limits[PF_LIMIT_ETH_ANCHORS].limit = PF_ANCHOR_HIWAT; RB_INIT(&V_pf_anchors); pf_init_kruleset(&pf_main_ruleset); @@ -4973,6 +4975,7 @@ DIOCCHANGEADDR_error: goto fail; } PF_RULES_WLOCK(); + io->pfrio_nadd = 0; error = pfr_add_addrs(&io->pfrio_table, pfras, io->pfrio_size, &io->pfrio_nadd, io->pfrio_flags | PFR_FLAG_USERIOCTL); diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index c5de1e84a287..09754359ec2d 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -2082,6 +2082,123 @@ pf_handle_clear_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) return (error); } +TAILQ_HEAD(pfr_addrq, pfr_addr_item); +struct nl_parsed_table_addrs { + struct pfr_table table; + uint32_t flags; + struct pfr_addr addrs[256]; + size_t addr_count; + int nadd; + int ndel; +}; +#define _OUT(_field) offsetof(struct pfr_addr, _field) +static const struct nlattr_parser nla_p_pfr_addr[] = { + { .type = PFR_A_AF, .off = _OUT(pfra_af), .cb = nlattr_get_uint8 }, + { .type = PFR_A_NET, .off = _OUT(pfra_net), .cb = nlattr_get_uint8 }, + { .type = PFR_A_NOT, .off = _OUT(pfra_not), .cb = nlattr_get_bool }, + { .type = PFR_A_ADDR, .off = _OUT(pfra_u), .cb = nlattr_get_in6_addr }, +}; +#undef _OUT +NL_DECLARE_ATTR_PARSER(pfra_addr_parser, nla_p_pfr_addr); + +static int +nlattr_get_pfr_addr(struct nlattr *nla, struct nl_pstate *npt, const void *arg, + void *target) +{ + struct nl_parsed_table_addrs *attrs = target; + struct pfr_addr addr = { 0 }; + int error; + + if (attrs->addr_count >= nitems(attrs->addrs)) + return (E2BIG); + + error = nlattr_get_nested(nla, npt, &pfra_addr_parser, &addr); + if (error != 0) + return (error); + + memcpy(&attrs->addrs[attrs->addr_count], &addr, sizeof(addr)); + attrs->addr_count++; + + return (0); +} + +NL_DECLARE_ATTR_PARSER(nested_table_parser, nla_p_table); + +#define _OUT(_field) offsetof(struct nl_parsed_table_addrs, _field) +static const struct nlattr_parser nla_p_table_addr[] = { + { .type = PF_TA_TABLE, .off = _OUT(table), .arg = &nested_table_parser, .cb = nlattr_get_nested }, + { .type = PF_TA_ADDR, .cb = nlattr_get_pfr_addr }, + { .type = PF_TA_FLAGS, .off = _OUT(flags), .cb = nlattr_get_uint32 }, +}; +NL_DECLARE_PARSER(table_addr_parser, struct genlmsghdr, nlf_p_empty, nla_p_table_addr); +#undef _OUT + +static int +pf_handle_table_add_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + struct nl_parsed_table_addrs attrs = { 0 }; + struct nl_writer *nw = npt->nw; + struct genlmsghdr *ghdr_new; + int error; + + error = nl_parse_nlmsg(hdr, &table_addr_parser, npt, &attrs); + if (error != 0) + return (error); + + PF_RULES_WLOCK(); + error = pfr_add_addrs(&attrs.table, &attrs.addrs[0], + attrs.addr_count, &attrs.nadd, attrs.flags | PFR_FLAG_USERIOCTL); + PF_RULES_WUNLOCK(); + + if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr))) + return (ENOMEM); + + ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); + ghdr_new->cmd = PFNL_CMD_TABLE_ADD_ADDR; + ghdr_new->version = 0; + ghdr_new->reserved = 0; + + nlattr_add_u32(nw, PF_TA_NBR_ADDED, attrs.nadd); + + if (!nlmsg_end(nw)) + return (ENOMEM); + + return (error); +} + +static int +pf_handle_table_del_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + struct nl_parsed_table_addrs attrs = { 0 }; + struct nl_writer *nw = npt->nw; + struct genlmsghdr *ghdr_new; + int error; + + error = nl_parse_nlmsg(hdr, &table_addr_parser, npt, &attrs); + if (error != 0) + return (error); + + PF_RULES_WLOCK(); + error = pfr_del_addrs(&attrs.table, &attrs.addrs[0], + attrs.addr_count, &attrs.ndel, attrs.flags | PFR_FLAG_USERIOCTL); + PF_RULES_WUNLOCK(); + + if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr))) + return (ENOMEM); + + ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); + ghdr_new->cmd = PFNL_CMD_TABLE_DEL_ADDR; + ghdr_new->version = 0; + ghdr_new->reserved = 0; + + nlattr_add_u32(nw, PF_TA_NBR_DELETED, attrs.ndel); + + if (!nlmsg_end(nw)) + return (ENOMEM); + + return (error); +} + static const struct nlhdr_parser *all_parsers[] = { &state_parser, &addrule_parser, @@ -2096,6 +2213,7 @@ static const struct nlhdr_parser *all_parsers[] = { &add_addr_parser, &ruleset_parser, &table_parser, + &table_addr_parser, }; static uint16_t family_id; @@ -2318,6 +2436,20 @@ static const struct genl_cmd pf_cmds[] = { .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, }, + { + .cmd_num = PFNL_CMD_TABLE_ADD_ADDR, + .cmd_name = "TABLE_ADD_ADDRS", + .cmd_cb = pf_handle_table_add_addrs, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, + .cmd_priv = PRIV_NETINET_PF, + }, + { + .cmd_num = PFNL_CMD_TABLE_DEL_ADDR, + .cmd_name = "TABLE_DEL_ADDRS", + .cmd_cb = pf_handle_table_del_addrs, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, + .cmd_priv = PRIV_NETINET_PF, + }, }; void diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index d263a0b22deb..87daac393821 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -67,6 +67,8 @@ enum { PFNL_CMD_GET_TSTATS = 29, PFNL_CMD_CLR_TSTATS = 30, PFNL_CMD_CLR_ADDRS = 31, + PFNL_CMD_TABLE_ADD_ADDR = 32, + PFNL_CMD_TABLE_DEL_ADDR = 33, __PFNL_CMD_MAX, }; #define PFNL_CMD_MAX (__PFNL_CMD_MAX -1) @@ -461,6 +463,23 @@ enum pf_tstats_t { PF_TS_NZERO = 9, /* u64 */ }; +enum pfr_addr_t { + PFR_A_UNSPEC, + PFR_A_AF = 1, /* uint8_t */ + PFR_A_NET = 2, /* uint8_t */ + PFR_A_NOT = 3, /* bool */ + PFR_A_ADDR = 4, /* in6_addr */ +}; + +enum pf_table_addrs_t { + PF_TA_UNSPEC, + PF_TA_TABLE = 1, /* nested, pf_table_t */ + PF_TA_ADDR = 2, /* nested, pfr_addr_t */ + PF_TA_FLAGS = 3, /* u32 */ + PF_TA_NBR_ADDED = 4, /* u32 */ + PF_TA_NBR_DELETED = 5, /* u32 */ +}; + #ifdef _KERNEL void pf_nl_register(void); diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 8cea9557633c..a684d778ab42 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -118,6 +118,8 @@ VNET_DEFINE_STATIC(uma_zone_t, pf_frnode_z); #define V_pf_frnode_z VNET(pf_frnode_z) VNET_DEFINE_STATIC(uma_zone_t, pf_frag_z); #define V_pf_frag_z VNET(pf_frag_z) +VNET_DEFINE(uma_zone_t, pf_anchor_z); +VNET_DEFINE(uma_zone_t, pf_eth_anchor_z); TAILQ_HEAD(pf_fragqueue, pf_fragment); TAILQ_HEAD(pf_cachequeue, pf_fragment); diff --git a/sys/netpfil/pf/pf_ruleset.c b/sys/netpfil/pf/pf_ruleset.c index 43b51f2933f4..039908a53126 100644 --- a/sys/netpfil/pf/pf_ruleset.c +++ b/sys/netpfil/pf/pf_ruleset.c @@ -238,7 +238,7 @@ pf_create_kanchor(struct pf_kanchor *parent, const char *aname) ((parent != NULL) && (strlen(parent->path) >= PF_ANCHOR_MAXPATH))) return (NULL); - anchor = rs_malloc(sizeof(*anchor)); + anchor = uma_zalloc(V_pf_anchor_z, M_NOWAIT | M_ZERO); if (anchor == NULL) return (NULL); @@ -259,7 +259,7 @@ pf_create_kanchor(struct pf_kanchor *parent, const char *aname) printf("%s: RB_INSERT1 " "'%s' '%s' collides with '%s' '%s'\n", __func__, anchor->path, anchor->name, dup->path, dup->name); - rs_free(anchor); + uma_zfree(V_pf_anchor_z, anchor); return (NULL); } @@ -273,7 +273,7 @@ pf_create_kanchor(struct pf_kanchor *parent, const char *aname) anchor->name, dup->path, dup->name); RB_REMOVE(pf_kanchor_global, &V_pf_anchors, anchor); - rs_free(anchor); + uma_zfree(V_pf_anchor_z, anchor); return (NULL); } } @@ -350,7 +350,7 @@ pf_remove_if_empty_kruleset(struct pf_kruleset *ruleset) if ((parent = ruleset->anchor->parent) != NULL) RB_REMOVE(pf_kanchor_node, &parent->children, ruleset->anchor); - rs_free(ruleset->anchor); + uma_zfree(V_pf_anchor_z, ruleset->anchor); if (parent == NULL) return; ruleset = &parent->ruleset; @@ -613,7 +613,7 @@ pf_find_or_create_keth_ruleset(const char *path) rs_free(p); return (NULL); } - anchor = (struct pf_keth_anchor *)rs_malloc(sizeof(*anchor)); + anchor = uma_zalloc(V_pf_eth_anchor_z, M_NOWAIT | M_ZERO); if (anchor == NULL) { rs_free(p); return (NULL); @@ -631,7 +631,7 @@ pf_find_or_create_keth_ruleset(const char *path) printf("%s: RB_INSERT1 " "'%s' '%s' collides with '%s' '%s'\n", __func__, anchor->path, anchor->name, dup->path, dup->name); - rs_free(anchor); + uma_zfree(V_pf_eth_anchor_z, anchor); rs_free(p); return (NULL); } @@ -645,7 +645,7 @@ pf_find_or_create_keth_ruleset(const char *path) anchor->name, dup->path, dup->name); RB_REMOVE(pf_keth_anchor_global, &V_pf_keth_anchors, anchor); - rs_free(anchor); + uma_zfree(V_pf_eth_anchor_z, anchor); rs_free(p); return (NULL); } @@ -754,7 +754,7 @@ pf_remove_if_empty_keth_ruleset(struct pf_keth_ruleset *ruleset) if ((parent = ruleset->anchor->parent) != NULL) RB_REMOVE(pf_keth_anchor_node, &parent->children, ruleset->anchor); - rs_free(ruleset->anchor); + uma_zfree(V_pf_eth_anchor_z, ruleset->anchor); if (parent == NULL) return; ruleset = &parent->ruleset; diff --git a/sys/netpfil/pf/pf_table.c b/sys/netpfil/pf/pf_table.c index ecc185f89ad7..73ec18fa7646 100644 --- a/sys/netpfil/pf/pf_table.c +++ b/sys/netpfil/pf/pf_table.c @@ -294,7 +294,7 @@ pfr_add_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size, else pfr_destroy_kentries(&workq); if (nadd != NULL) - *nadd = xadd; + *nadd += xadd; pfr_destroy_ktable(tmpkt, 0); return (0); _bad: diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index 8e43f267f368..af827c33ee58 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -488,7 +488,7 @@ void mac_sysvshm_init(struct shmid_kernel *); void mac_thread_userret(struct thread *td); -#if defined(MAC) && defined(DEBUG_VFS_LOCKS) +#if defined(MAC) && defined(INVARIANTS) void mac_vnode_assert_locked(struct vnode *vp, const char *func); #else #define mac_vnode_assert_locked(vp, func) do { } while (0) diff --git a/sys/security/mac/mac_vfs.c b/sys/security/mac/mac_vfs.c index a50c6f0c8f26..dc2bfa7c643b 100644 --- a/sys/security/mac/mac_vfs.c +++ b/sys/security/mac/mac_vfs.c @@ -1078,7 +1078,7 @@ vn_setlabel(struct vnode *vp, struct label *intlabel, struct ucred *cred) return (0); } -#ifdef DEBUG_VFS_LOCKS +#ifdef INVARIANTS void mac_vnode_assert_locked(struct vnode *vp, const char *func) { diff --git a/sys/sys/exterr_cat.h b/sys/sys/exterr_cat.h index 80cff53b3576..43f31e1d5dd6 100644 --- a/sys/sys/exterr_cat.h +++ b/sys/sys/exterr_cat.h @@ -20,6 +20,7 @@ #define EXTERR_CAT_GENIO 6 #define EXTERR_CAT_BRIDGE 7 #define EXTERR_CAT_SWAP 8 +#define EXTERR_CAT_VFSSYSCALL 9 #endif diff --git a/sys/sys/proc.h b/sys/sys/proc.h index af9cafa99dd0..9140cee56885 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -763,7 +763,6 @@ struct proc { LIST_HEAD(, mqueue_notifier) p_mqnotifier; /* (c) mqueue notifiers.*/ struct kdtrace_proc *p_dtrace; /* (*) DTrace-specific data. */ struct cv p_pwait; /* (*) wait cv for exit/exec. */ - uint64_t p_prev_runtime; /* (c) Resource usage accounting. */ struct racct *p_racct; /* (b) Resource accounting. */ int p_throttled; /* (c) Flag for racct pcpu throttling */ /* diff --git a/sys/sys/racct.h b/sys/sys/racct.h index c6020b82c865..92b50353774e 100644 --- a/sys/sys/racct.h +++ b/sys/sys/racct.h @@ -141,13 +141,17 @@ extern bool racct_enable; /* * The 'racct' structure defines resource consumption for a particular - * subject, such as process or jail. + * subject, such as process or jail. It also contains the total + * cpu time and real time of the subject, recorded at the most recent + * time that RACCT_PCPU was updated. * * This structure must be filled with zeroes initially. */ struct racct { int64_t r_resources[RACCT_MAX + 1]; LIST_HEAD(, rctl_rule_link) r_rule_links; + uint64_t r_runtime; + struct timeval r_time; }; SYSCTL_DECL(_kern_racct); diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index a416fddcddc3..074769d55c2d 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -538,7 +538,7 @@ extern struct vnodeop_desc *vnodeop_descs[]; #define VOPARG_OFFSETTO(s_type, s_offset, struct_p) \ ((s_type)(((char*)(struct_p)) + (s_offset))) -#ifdef DEBUG_VFS_LOCKS +#ifdef INVARIANTS /* * Support code to aid in debugging VFS locking problems. Not totally * reliable since if the thread sleeps between changing the lock @@ -572,7 +572,7 @@ void assert_vop_unlocked(struct vnode *vp, const char *str); VNPASS(!seqc_in_modify(_vp->v_seqc), _vp); \ } while (0) -#else /* !DEBUG_VFS_LOCKS */ +#else /* !INVARIANTS */ #define ASSERT_VI_LOCKED(vp, str) ((void)0) #define ASSERT_VI_UNLOCKED(vp, str) ((void)0) @@ -583,7 +583,7 @@ void assert_vop_unlocked(struct vnode *vp, const char *str); #define ASSERT_VOP_IN_SEQC(vp) ((void)0) #define ASSERT_VOP_NOT_IN_SEQC(vp) ((void)0) -#endif /* DEBUG_VFS_LOCKS */ +#endif /* INVARIANTS */ /* * This call works for vnodes in the kernel. @@ -956,7 +956,7 @@ void vop_symlink_pre(void *a); void vop_symlink_post(void *a, int rc); int vop_sigdefer(struct vop_vector *vop, struct vop_generic_args *a); -#ifdef DEBUG_VFS_LOCKS +#ifdef INVARIANTS void vop_fdatasync_debugpre(void *a); void vop_fdatasync_debugpost(void *a, int rc); void vop_fplookup_vexec_debugpre(void *a); diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk index e829105197cc..74b11e6cb27d 100644 --- a/sys/tools/vnode_if.awk +++ b/sys/tools/vnode_if.awk @@ -86,7 +86,7 @@ function add_debug_code(name, arg, pos, ind) function add_debugpre(name) { if (lockdata[name, "debugpre"]) { - printc("#ifdef DEBUG_VFS_LOCKS"); + printc("#ifdef INVARIANTS"); printc("\t"lockdata[name, "debugpre"]"(a);"); printc("#endif"); } @@ -95,7 +95,7 @@ function add_debugpre(name) function add_debugpost(name) { if (lockdata[name, "debugpost"]) { - printc("#ifdef DEBUG_VFS_LOCKS"); + printc("#ifdef INVARIANTS"); printc("\t"lockdata[name, "debugpost"]"(a, rc);"); printc("#endif"); } @@ -340,7 +340,7 @@ while ((getline < srcfile) > 0) { for (i = 0; i < numargs; ++i) printh("\ta.a_" args[i] " = " args[i] ";"); if (can_inline(name)) { - printh("\n#if !defined(DEBUG_VFS_LOCKS) && !defined(INVARIANTS) && !defined(KTR)"); + printh("\n#if !defined(INVARIANTS) && !defined(KTR)"); printh("\tif (!SDT_PROBES_ENABLED())"); printh("\t\treturn (" args[0]"->v_op->"name"(&a));"); printh("\telse"); diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 67cd6fb4b738..b5212ce5875f 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -14522,10 +14522,8 @@ getdirtybuf(struct buf *bp, BUF_UNLOCK(bp); if (waitfor != MNT_WAIT) return (NULL); -#ifdef DEBUG_VFS_LOCKS if (bp->b_vp->v_type != VCHR) ASSERT_BO_WLOCKED(bp->b_bufobj); -#endif bp->b_vflags |= BV_BKGRDWAIT; rw_sleep(&bp->b_xflags, lock, PRIBIO, "getbuf", 0); return (NULL); diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 33e1bc3ed88b..897a21032907 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -508,9 +508,7 @@ ffs_lock( case LK_EXCLUSIVE: flags = ap->a_flags; for (;;) { -#ifdef DEBUG_VFS_LOCKS VNPASS(vp->v_holdcnt != 0, vp); -#endif /* DEBUG_VFS_LOCKS */ lkp = vp->v_vnlock; result = lockmgr_lock_flags(lkp, flags, &VI_MTX(vp)->lock_object, ap->a_file, ap->a_line); diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index fd0539c40c0d..9221aa63184d 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -230,7 +230,6 @@ ufs_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, bmask = VFSTOUFS(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; -#ifdef DEBUG_VFS_LOCKS /* * Assert that the directory vnode is locked, and locked * exclusively for the last component lookup for modifying @@ -248,7 +247,6 @@ ufs_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, if ((nameiop == CREATE || nameiop == DELETE || nameiop == RENAME) && (flags & (LOCKPARENT | ISLASTCN)) == (LOCKPARENT | ISLASTCN)) ASSERT_VOP_ELOCKED(vdp, "ufs_lookup2"); -#endif restart: bp = NULL; diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index b132eea658d0..ac125902b74b 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -1278,10 +1278,8 @@ dqget(struct vnode *vp, uint64_t id, struct ufsmount *ump, int type, struct uio auio; int dqvplocked, error; -#ifdef DEBUG_VFS_LOCKS if (vp != NULLVP) ASSERT_VOP_ELOCKED(vp, "dqget"); -#endif if (vp != NULLVP && *dqp != NODQUOT) { return (0); @@ -1553,10 +1551,8 @@ dqsync(struct vnode *vp, struct dquot *dq) struct mount *mp; struct ufsmount *ump; -#ifdef DEBUG_VFS_LOCKS if (vp != NULL) ASSERT_VOP_ELOCKED(vp, "dqsync"); -#endif mp = NULL; error = 0; diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index b239a6ffb4ce..abad5efb8a79 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -394,11 +394,15 @@ vm_page_blacklist_load(char **list, char **end) ptr = preload_fetch_addr(mod); len = preload_fetch_size(mod); } - *list = ptr; - if (ptr != NULL) + + if (ptr != NULL && len > 0) { + *list = ptr; *end = ptr + len - 1; - else + } else { + *list = NULL; *end = NULL; + } + return; } @@ -4713,7 +4717,7 @@ vm_page_grab_pflags(int allocflags) pflags = allocflags & ~(VM_ALLOC_NOWAIT | VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL | - VM_ALLOC_NOBUSY | VM_ALLOC_IGN_SBUSY); + VM_ALLOC_NOBUSY | VM_ALLOC_IGN_SBUSY | VM_ALLOC_NOCREAT); if ((allocflags & VM_ALLOC_NOWAIT) == 0) pflags |= VM_ALLOC_WAITFAIL; if ((allocflags & VM_ALLOC_IGN_SBUSY) != 0) diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 24e3bef07f7c..de8a6c52c08f 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -502,7 +502,7 @@ vnode_pager_setsize(struct vnode *vp, vm_ooffset_t nsize) if ((object = vp->v_object) == NULL) return; -#ifdef DEBUG_VFS_LOCKS +#ifdef INVARIANTS { struct mount *mp; diff --git a/tests/sys/cddl/zfs/tests/zfsd/Makefile b/tests/sys/cddl/zfs/tests/zfsd/Makefile index e34e24b40906..588ca6e6c145 100644 --- a/tests/sys/cddl/zfs/tests/zfsd/Makefile +++ b/tests/sys/cddl/zfs/tests/zfsd/Makefile @@ -30,6 +30,8 @@ ${PACKAGE}FILES+= zfsd_hotspare_006_pos.ksh ${PACKAGE}FILES+= zfsd_hotspare_007_pos.ksh ${PACKAGE}FILES+= zfsd_hotspare_008_neg.ksh ${PACKAGE}FILES+= zfsd_import_001_pos.ksh +${PACKAGE}FILES+= zfsd_offline_001_neg.ksh +${PACKAGE}FILES+= zfsd_offline_002_neg.ksh ${PACKAGE}FILES+= zfsd_replace_001_pos.ksh ${PACKAGE}FILES+= zfsd_replace_002_pos.ksh ${PACKAGE}FILES+= zfsd_replace_003_pos.ksh diff --git a/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_001_neg.ksh b/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_001_neg.ksh new file mode 100644 index 000000000000..de7996976504 --- /dev/null +++ b/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_001_neg.ksh @@ -0,0 +1,64 @@ +#!/usr/local/bin/ksh93 -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2025 ConnectWise. All rights reserved. +# Use is subject to license terms. + +. $STF_SUITE/tests/hotspare/hotspare.kshlib + +verify_runnable "global" + +function cleanup +{ + $ZPOOL status $TESTPOOL + if poolexists $TESTPOOL ; then + destroy_pool $TESTPOOL + fi + + partition_cleanup +} + +function verify_assertion +{ + log_must $ZPOOL offline $TESTPOOL $FAULT_DISK + + # Wait a few seconds before verifying the state + $SLEEP 10 + log_must check_state $TESTPOOL "$FAULT_DISK" "OFFLINE" +} + +log_onexit cleanup + +log_assert "ZFSD will not automatically reactivate a disk which has been administratively offlined" + +ensure_zfsd_running + +typeset FAULT_DISK=$DISK0 +typeset POOLDEVS="$DISK0 $DISK1 $DISK2" +set -A MY_KEYWORDS mirror raidz1 +for keyword in "${MY_KEYWORDS[@]}" ; do + log_must create_pool $TESTPOOL $keyword $POOLDEVS + verify_assertion + + destroy_pool "$TESTPOOL" +done diff --git a/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_002_neg.ksh b/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_002_neg.ksh new file mode 100644 index 000000000000..7d8dfc62d365 --- /dev/null +++ b/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_002_neg.ksh @@ -0,0 +1,66 @@ +#!/usr/local/bin/ksh93 -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2025 ConnectWise. All rights reserved. +# Use is subject to license terms. + +. $STF_SUITE/tests/hotspare/hotspare.kshlib + +verify_runnable "global" + +function cleanup +{ + $ZPOOL status $TESTPOOL + if poolexists $TESTPOOL ; then + destroy_pool $TESTPOOL + fi + + partition_cleanup +} + +function verify_assertion +{ + log_must $ZPOOL offline $TESTPOOL $FAULT_DISK + + # Wait a few seconds before verifying the state + $SLEEP 10 + log_must check_state $TESTPOOL "$FAULT_DISK" "OFFLINE" + log_must check_state $TESTPOOL "$SPARE_DISK" "AVAIL" +} + +log_onexit cleanup + +log_assert "ZFSD will not automatically activate a spare when a disk has been administratively offlined" + +ensure_zfsd_running + +typeset FAULT_DISK=$DISK0 +typeset SPARE_DISK=$DISK3 +typeset POOLDEVS="$DISK0 $DISK1 $DISK2" +set -A MY_KEYWORDS mirror raidz1 +for keyword in "${MY_KEYWORDS[@]}" ; do + log_must create_pool $TESTPOOL $keyword $POOLDEVS spare $SPARE_DISK + verify_assertion + + destroy_pool "$TESTPOOL" +done diff --git a/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh b/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh index fe4ac4866ed3..b9924500a298 100755 --- a/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh +++ b/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh @@ -483,6 +483,64 @@ zfsd_autoreplace_003_pos_cleanup() ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } +atf_test_case zfsd_offline_001_neg cleanup +zfsd_offline_001_neg_head() +{ + atf_set "descr" "ZFSD will not automatically reactivate a disk which has been administratively offlined" + atf_set "require.progs" "ksh93 zpool zfs" +} +zfsd_offline_001_neg_body() +{ + . $(atf_get_srcdir)/../../include/default.cfg + . $(atf_get_srcdir)/../hotspare/hotspare.cfg + . $(atf_get_srcdir)/zfsd.cfg + + verify_disk_count "$DISKS" 3 + verify_zfsd_running + ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" + ksh93 $(atf_get_srcdir)/zfsd_offline_001_neg.ksh + if [[ $? != 0 ]]; then + save_artifacts + atf_fail "Testcase failed" + fi +} +zfsd_offline_001_neg_cleanup() +{ + . $(atf_get_srcdir)/../../include/default.cfg + . $(atf_get_srcdir)/zfsd.cfg + + ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" +} + +atf_test_case zfsd_offline_002_neg cleanup +zfsd_offline_002_neg_head() +{ + atf_set "descr" "ZFSD will not automatically activate a spare when a disk has been administratively offlined" + atf_set "require.progs" "ksh93 zpool zfs" +} +zfsd_offline_002_neg_body() +{ + . $(atf_get_srcdir)/../../include/default.cfg + . $(atf_get_srcdir)/../hotspare/hotspare.cfg + . $(atf_get_srcdir)/zfsd.cfg + + verify_disk_count "$DISKS" 4 + verify_zfsd_running + ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" + ksh93 $(atf_get_srcdir)/zfsd_offline_002_neg.ksh + if [[ $? != 0 ]]; then + save_artifacts + atf_fail "Testcase failed" + fi +} +zfsd_offline_002_neg_cleanup() +{ + . $(atf_get_srcdir)/../../include/default.cfg + . $(atf_get_srcdir)/zfsd.cfg + + ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" +} + atf_test_case zfsd_replace_001_pos cleanup zfsd_replace_001_pos_head() { @@ -676,6 +734,8 @@ atf_init_test_cases() atf_add_test_case zfsd_autoreplace_001_neg atf_add_test_case zfsd_autoreplace_002_pos atf_add_test_case zfsd_autoreplace_003_pos + atf_add_test_case zfsd_offline_001_neg + atf_add_test_case zfsd_offline_002_neg atf_add_test_case zfsd_replace_001_pos atf_add_test_case zfsd_replace_002_pos atf_add_test_case zfsd_replace_003_pos diff --git a/tests/sys/fs/fusefs/pre-init.cc b/tests/sys/fs/fusefs/pre-init.cc index e990d3cafffa..2d3257500304 100644 --- a/tests/sys/fs/fusefs/pre-init.cc +++ b/tests/sys/fs/fusefs/pre-init.cc @@ -44,12 +44,26 @@ using namespace testing; /* Tests for behavior that happens before the server responds to FUSE_INIT */ class PreInit: public FuseTest { +public: void SetUp() { m_no_auto_init = true; FuseTest::SetUp(); } }; +/* + * Tests for behavior that happens before the server responds to FUSE_INIT, + * parameterized on default_permissions + */ +class PreInitP: public PreInit, + public WithParamInterface<bool> +{ +void SetUp() { + m_default_permissions = GetParam(); + PreInit::SetUp(); +} +}; + static void* unmount1(void* arg __unused) { ssize_t r; @@ -152,3 +166,61 @@ TEST_F(PreInit, signal_during_unmount_before_init) sem_post(&sem0); m_mock->join_daemon(); } + +/* + * If some process attempts VOP_GETATTR for the mountpoint before init is + * complete, fusefs should wait, just like it does for other VOPs. + * + * To verify that fuse_vnop_getattr does indeed wait for FUSE_INIT to complete, + * invoke the test like this: + * +> sudo cpuset -c -l 0 dtrace -i 'fbt:fusefs:fuse_internal_init_callback:' -i 'fbt:fusefs:fuse_vnop_getattr:' -c "./pre-init --gtest_filter=PI/PreInitP.getattr_before_init/0" +... +dtrace: pid 4224 has exited +CPU ID FUNCTION:NAME + 0 68670 fuse_vnop_getattr:entry + 0 68893 fuse_internal_init_callback:entry + 0 68894 fuse_internal_init_callback:return + 0 68671 fuse_vnop_getattr:return + * + * Note that fuse_vnop_getattr was entered first, but exitted last. + */ +TEST_P(PreInitP, getattr_before_init) +{ + struct stat sb; + nlink_t nlink = 12345; + + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_INIT); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([&](auto in, auto& out) { + SET_OUT_HEADER_LEN(out, init); + out.body.init.major = FUSE_KERNEL_VERSION; + out.body.init.minor = FUSE_KERNEL_MINOR_VERSION; + out.body.init.flags = in.body.init.flags & m_init_flags; + out.body.init.max_write = m_maxwrite; + out.body.init.max_readahead = m_maxreadahead; + out.body.init.time_gran = m_time_gran; + nap(); /* Allow stat() to run first */ + }))); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_GETATTR && + in.header.nodeid == FUSE_ROOT_ID); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto& in, auto& out) { + SET_OUT_HEADER_LEN(out, attr); + out.body.attr.attr.ino = in.header.nodeid; + out.body.attr.attr.mode = S_IFDIR | 0644; + out.body.attr.attr.nlink = nlink; + out.body.attr.attr_valid = UINT64_MAX; + }))); + + EXPECT_EQ(0, stat("mountpoint", &sb)); + EXPECT_EQ(nlink, sb.st_nlink); +} + +INSTANTIATE_TEST_SUITE_P(PI, PreInitP, Bool()); diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index 31299c562510..906f586d2483 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -919,18 +919,18 @@ vlan_pvid_body() bridge=$(vnet_mkbridge) - ifconfig ${bridge} up + ifconfig ${bridge} vlanfilter up ifconfig ${epone}a up ifconfig ${eptwo}a up - ifconfig ${bridge} addm ${epone}a untagged ${epone}a 20 - ifconfig ${bridge} addm ${eptwo}a untagged ${eptwo}a 20 + ifconfig ${bridge} addm ${epone}a untagged 20 + ifconfig ${bridge} addm ${eptwo}a untagged 20 # With VLAN filtering enabled, traffic should be passed. atf_check -s exit:0 -o ignore jexec one ping -c 3 -t 1 192.0.2.2 atf_check -s exit:0 -o ignore jexec two ping -c 3 -t 1 192.0.2.1 # Removed the untagged VLAN on one port; traffic should not be passed. - ifconfig ${bridge} -untagged ${epone}a + ifconfig ${bridge} -ifuntagged ${epone}a atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2 atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1 } @@ -958,16 +958,16 @@ vlan_pvid_filtered_body() vnet_mkjail one ${epone}b vnet_mkjail two ${eptwo}b - jexec one ifconfig ${epone}b 192.0.2.1/24 up - jexec two ifconfig ${eptwo}b 192.0.2.2/24 up + atf_check -s exit:0 jexec one ifconfig ${epone}b 192.0.2.1/24 up + atf_check -s exit:0 jexec two ifconfig ${eptwo}b 192.0.2.2/24 up bridge=$(vnet_mkbridge) - ifconfig ${bridge} up - ifconfig ${epone}a up - ifconfig ${eptwo}a up - ifconfig ${bridge} addm ${epone}a untagged ${epone}a 20 - ifconfig ${bridge} addm ${eptwo}a untagged ${eptwo}a 30 + atf_check -s exit:0 ifconfig ${bridge} vlanfilter up + atf_check -s exit:0 ifconfig ${epone}a up + atf_check -s exit:0 ifconfig ${eptwo}a up + atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a untagged 20 + atf_check -s exit:0 ifconfig ${bridge} addm ${eptwo}a untagged 30 atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2 atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1 @@ -997,18 +997,20 @@ vlan_pvid_tagged_body() vnet_mkjail two ${eptwo}b # Create two tagged interfaces on the appropriate VLANs - jexec one ifconfig ${epone}b up - jexec one ifconfig ${epone}b.20 create 192.0.2.1/24 up - jexec two ifconfig ${eptwo}b up - jexec two ifconfig ${eptwo}b.20 create 192.0.2.2/24 up + atf_check -s exit:0 jexec one ifconfig ${epone}b up + atf_check -s exit:0 jexec one ifconfig ${epone}b.20 \ + create 192.0.2.1/24 up + atf_check -s exit:0 jexec two ifconfig ${eptwo}b up + atf_check -s exit:0 jexec two ifconfig ${eptwo}b.20 \ + create 192.0.2.2/24 up bridge=$(vnet_mkbridge) - ifconfig ${bridge} up - ifconfig ${epone}a up - ifconfig ${eptwo}a up - ifconfig ${bridge} addm ${epone}a untagged ${epone}a 20 - ifconfig ${bridge} addm ${eptwo}a untagged ${eptwo}a 20 + atf_check -s exit:0 ifconfig ${bridge} vlanfilter up + atf_check -s exit:0 ifconfig ${epone}a up + atf_check -s exit:0 ifconfig ${eptwo}a up + atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a untagged 20 + atf_check -s exit:0 ifconfig ${bridge} addm ${eptwo}a untagged 20 # Tagged frames should not be passed. atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2 @@ -1042,18 +1044,18 @@ vlan_pvid_1q_body() # This forces the bridge to add and remove .1q tags to bridge the # traffic. - jexec one ifconfig ${epone}b 192.0.2.1/24 up - jexec two ifconfig ${eptwo}b up - jexec two ifconfig ${eptwo}b.20 create 192.0.2.2/24 up + atf_check -s exit:0 jexec one ifconfig ${epone}b 192.0.2.1/24 up + atf_check -s exit:0 jexec two ifconfig ${eptwo}b up + atf_check -s exit:0 jexec two ifconfig ${eptwo}b.20 create 192.0.2.2/24 up bridge=$(vnet_mkbridge) - ifconfig ${bridge} addm ${epone}a untagged ${epone}a 20 - ifconfig ${bridge} addm ${eptwo}a + atf_check -s exit:0 ifconfig ${bridge} vlanfilter up + atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a untagged 20 + atf_check -s exit:0 ifconfig ${bridge} addm ${eptwo}a tagged 20 - ifconfig ${bridge} up - ifconfig ${epone}a up - ifconfig ${eptwo}a up + atf_check -s exit:0 ifconfig ${epone}a up + atf_check -s exit:0 ifconfig ${eptwo}a up atf_check -s exit:0 -o ignore jexec one ping -c 3 -t 1 192.0.2.2 atf_check -s exit:0 -o ignore jexec two ping -c 3 -t 1 192.0.2.1 @@ -1085,18 +1087,20 @@ vlan_filtering_body() vnet_mkjail one ${epone}b vnet_mkjail two ${eptwo}b - jexec one ifconfig ${epone}b up - jexec one ifconfig ${epone}b.20 create 192.0.2.1/24 up - jexec two ifconfig ${eptwo}b up - jexec two ifconfig ${eptwo}b.20 create 192.0.2.2/24 up + atf_check -s exit:0 jexec one ifconfig ${epone}b up + atf_check -s exit:0 jexec one ifconfig ${epone}b.20 \ + create 192.0.2.1/24 up + atf_check -s exit:0 jexec two ifconfig ${eptwo}b up + atf_check -s exit:0 jexec two ifconfig ${eptwo}b.20 \ + create 192.0.2.2/24 up bridge=$(vnet_mkbridge) - ifconfig ${bridge} up - ifconfig ${epone}a up - ifconfig ${eptwo}a up - ifconfig ${bridge} addm ${epone}a vlanfilter ${epone}a - ifconfig ${bridge} addm ${eptwo}a vlanfilter ${eptwo}a + atf_check -s exit:0 ifconfig ${bridge} vlanfilter up + atf_check -s exit:0 ifconfig ${epone}a up + atf_check -s exit:0 ifconfig ${eptwo}a up + atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a + atf_check -s exit:0 ifconfig ${bridge} addm ${eptwo}a # Right now there are no VLANs on the access list, so everything # should be blocked. @@ -1106,25 +1110,25 @@ vlan_filtering_body() # Set the untagged vlan on both ports to 20 and make sure traffic is # still blocked. We intentionally do not pass tagged traffic for the # untagged vlan. - atf_check -s exit:0 ifconfig ${bridge} untagged ${epone}a 20 - atf_check -s exit:0 ifconfig ${bridge} untagged ${eptwo}a 20 + atf_check -s exit:0 ifconfig ${bridge} ifuntagged ${epone}a 20 + atf_check -s exit:0 ifconfig ${bridge} ifuntagged ${eptwo}a 20 atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2 atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1 - atf_check -s exit:0 ifconfig ${bridge} -untagged ${epone}a - atf_check -s exit:0 ifconfig ${bridge} -untagged ${eptwo}a + atf_check -s exit:0 ifconfig ${bridge} -ifuntagged ${epone}a + atf_check -s exit:0 ifconfig ${bridge} -ifuntagged ${eptwo}a # Add VLANs 10-30 to the access list; now access should be allowed. - ifconfig ${bridge} +tagged ${epone}a 10-30 - ifconfig ${bridge} +tagged ${eptwo}a 10-30 + atf_check -s exit:0 ifconfig ${bridge} +iftagged ${epone}a 10-30 + atf_check -s exit:0 ifconfig ${bridge} +iftagged ${eptwo}a 10-30 atf_check -s exit:0 -o ignore jexec one ping -c 3 -t 1 192.0.2.2 atf_check -s exit:0 -o ignore jexec two ping -c 3 -t 1 192.0.2.1 # Remove vlan 20 from the access list, now access should be blocked # again. - ifconfig ${bridge} -tagged ${epone}a 20 - ifconfig ${bridge} -tagged ${eptwo}a 20 + atf_check -s exit:0 ifconfig ${bridge} -iftagged ${epone}a 20 + atf_check -s exit:0 ifconfig ${bridge} -iftagged ${eptwo}a 20 atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2 atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1 } @@ -1135,58 +1139,59 @@ vlan_filtering_cleanup() } # -# Test the ifconfig 'tagged' option. +# Test the ifconfig 'iftagged' option. # -atf_test_case "vlan_ifconfig_tagged" "cleanup" -vlan_ifconfig_tagged_head() +atf_test_case "vlan_ifconfig_iftagged" "cleanup" +vlan_ifconfig_iftagged_head() { - atf_set descr 'test the ifconfig tagged option' + atf_set descr 'test the ifconfig iftagged option' atf_set require.user root } -vlan_ifconfig_tagged_body() +vlan_ifconfig_iftagged_body() { vnet_init vnet_init_bridge ep=$(vnet_mkepair) bridge=$(vnet_mkbridge) + atf_check -s exit:0 ifconfig ${bridge} vlanfilter up - ifconfig ${bridge} addm ${ep}a vlanfilter ${ep}a up - ifconfig ${ep}a up + atf_check -s exit:0 ifconfig ${bridge} addm ${ep}a + atf_check -s exit:0 ifconfig ${ep}a up # To start with, no vlans should be configured. atf_check -s exit:0 -o not-match:"tagged" ifconfig ${bridge} # Add vlans 100-149. - atf_check -s exit:0 ifconfig ${bridge} tagged ${ep}a 100-149 + atf_check -s exit:0 ifconfig ${bridge} iftagged ${ep}a 100-149 atf_check -s exit:0 -o match:"tagged 100-149" ifconfig ${bridge} # Replace the vlan list with 139-199. - atf_check -s exit:0 ifconfig ${bridge} tagged ${ep}a 139-199 + atf_check -s exit:0 ifconfig ${bridge} iftagged ${ep}a 139-199 atf_check -s exit:0 -o match:"tagged 139-199" ifconfig ${bridge} # Add vlans 100-170. - atf_check -s exit:0 ifconfig ${bridge} +tagged ${ep}a 100-170 + atf_check -s exit:0 ifconfig ${bridge} +iftagged ${ep}a 100-170 atf_check -s exit:0 -o match:"tagged 100-199" ifconfig ${bridge} # Remove vlans 104, 105, and 150-159 - atf_check -s exit:0 ifconfig ${bridge} -tagged ${ep}a 104,105,150-159 + atf_check -s exit:0 ifconfig ${bridge} -iftagged ${ep}a 104,105,150-159 atf_check -s exit:0 -o match:"tagged 100-103,106-149,160-199" \ ifconfig ${bridge} # Remove the entire vlan list. - atf_check -s exit:0 ifconfig ${bridge} tagged ${ep}a none + atf_check -s exit:0 ifconfig ${bridge} iftagged ${ep}a none atf_check -s exit:0 -o not-match:"tagged" ifconfig ${bridge} # Test some invalid vlans sets. for bad_vlan in -1 0 4096 4097 foo 0-10 4000-5000 foo-40 40-foo; do atf_check -s exit:1 -e ignore \ - ifconfig ${bridge} tagged "$bad_vlan" + ifconfig ${bridge} iftagged "$bad_vlan" done } -vlan_ifconfig_tagged_cleanup() +vlan_ifconfig_iftagged_cleanup() { vnet_cleanup } @@ -1210,18 +1215,19 @@ vlan_svi_body() vnet_mkjail one ${epone}b - jexec one ifconfig ${epone}b up - jexec one ifconfig ${epone}b.20 create 192.0.2.1/24 up + atf_check -s exit:0 jexec one ifconfig ${epone}b up + atf_check -s exit:0 jexec one ifconfig ${epone}b.20 \ + create 192.0.2.1/24 up bridge=$(vnet_mkbridge) - ifconfig ${bridge} up - ifconfig ${epone}a up - ifconfig ${bridge} addm ${epone}a tagged ${epone}a 20 + atf_check -s exit:0 ifconfig ${bridge} vlanfilter up + atf_check -s exit:0 ifconfig ${epone}a up + atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a tagged 20 svi=$(vnet_mkvlan) - ifconfig ${svi} vlan 20 vlandev ${bridge} - ifconfig ${svi} inet 192.0.2.2/24 up + atf_check -s exit:0 ifconfig ${svi} vlan 20 vlandev ${bridge} + atf_check -s exit:0 ifconfig ${svi} inet 192.0.2.2/24 up atf_check -s exit:0 -o ignore ping -c 3 -t 1 192.0.2.1 } @@ -1255,21 +1261,25 @@ vlan_qinq_body() # Create a QinQ trunk between the two jails. The outer (provider) tag # is 5, and the inner tag is 10. - jexec one ifconfig ${epone}b up - jexec one ifconfig ${epone}b.5 create vlanproto 802.1ad up - jexec one ifconfig ${epone}b.5.10 create inet 192.0.2.1/24 up + atf_check -s exit:0 jexec one ifconfig ${epone}b up + atf_check -s exit:0 jexec one \ + ifconfig ${epone}b.5 create vlanproto 802.1ad up + atf_check -s exit:0 jexec one \ + ifconfig ${epone}b.5.10 create inet 192.0.2.1/24 up - jexec two ifconfig ${eptwo}b up - jexec two ifconfig ${eptwo}b.5 create vlanproto 802.1ad up - jexec two ifconfig ${eptwo}b.5.10 create inet 192.0.2.2/24 up + atf_check -s exit:0 jexec two ifconfig ${eptwo}b up + atf_check -s exit:0 jexec two ifconfig \ + ${eptwo}b.5 create vlanproto 802.1ad up + atf_check -s exit:0 jexec two ifconfig \ + ${eptwo}b.5.10 create inet 192.0.2.2/24 up bridge=$(vnet_mkbridge) - ifconfig ${bridge} up - ifconfig ${epone}a up - ifconfig ${eptwo}a up - ifconfig ${bridge} addm ${epone}a vlanfilter ${epone}a - ifconfig ${bridge} addm ${eptwo}a vlanfilter ${eptwo}a + atf_check -s exit:0 ifconfig ${bridge} vlanfilter defqinq up + atf_check -s exit:0 ifconfig ${epone}a up + atf_check -s exit:0 ifconfig ${eptwo}a up + atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a + atf_check -s exit:0 ifconfig ${bridge} addm ${eptwo}a # Right now there are no VLANs on the access list, so everything # should be blocked. @@ -1277,10 +1287,16 @@ vlan_qinq_body() atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1 # Add the provider tag to the access list; now traffic should be passed. - ifconfig ${bridge} +tagged ${epone}a 5 - ifconfig ${bridge} +tagged ${eptwo}a 5 + atf_check -s exit:0 ifconfig ${bridge} +iftagged ${epone}a 5 + atf_check -s exit:0 ifconfig ${bridge} +iftagged ${eptwo}a 5 atf_check -s exit:0 -o ignore jexec one ping -c 3 -t 1 192.0.2.2 atf_check -s exit:0 -o ignore jexec two ping -c 3 -t 1 192.0.2.1 + + # Remove the qinq flag from one of the interfaces; traffic should + # be blocked again. + atf_check -s exit:0 ifconfig ${bridge} -qinq ${epone}a + atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2 + atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1 } vlan_qinq_cleanup() @@ -1311,6 +1327,59 @@ bridge_svi_in_bridge_cleanup() vnet_cleanup } +atf_test_case "vlan_defuntagged" "cleanup" +vlan_defuntagged_head() +{ + atf_set descr 'defuntagged (defpvid) bridge option' + atf_set require.user root +} + +vlan_defuntagged_body() +{ + vnet_init + vnet_init_bridge + + bridge=$(vnet_mkbridge) + atf_check -s exit:0 ifconfig ${bridge} vlanfilter + + # Invalid VLAN IDs + atf_check -s exit:1 -ematch:"invalid vlan id: 0" \ + ifconfig ${bridge} defuntagged 0 + atf_check -s exit:1 -ematch:"invalid vlan id: 4095" \ + ifconfig ${bridge} defuntagged 4095 + atf_check -s exit:1 -ematch:"invalid vlan id: 5000" \ + ifconfig ${bridge} defuntagged 5000 + + # Check the bridge option is set and cleared correctly + atf_check -s exit:0 -onot-match:"defuntagged=" \ + ifconfig ${bridge} + + atf_check -s exit:0 ifconfig ${bridge} defuntagged 10 + atf_check -s exit:0 -omatch:"defuntagged=10$" \ + ifconfig ${bridge} + + atf_check -s exit:0 ifconfig ${bridge} -defuntagged + atf_check -s exit:0 -onot-match:"defuntagged=" \ + ifconfig ${bridge} + + # Check the untagged option is correctly set on a member + atf_check -s exit:0 ifconfig ${bridge} defuntagged 10 + + epair=$(vnet_mkepair) + atf_check -s exit:0 ifconfig ${bridge} addm ${epair}a + + tag=$(ifconfig ${bridge} | sed -Ene \ + "/member: ${epair}a/ { N;s/.*untagged ([0-9]+).*/\\1/p;q; }") + if [ "$tag" != "10" ]; then + atf_fail "wrong untagged vlan: ${tag}" + fi +} + +vlan_defuntagged_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "bridge_transmit_ipv4_unicast" @@ -1335,8 +1404,9 @@ atf_init_test_cases() atf_add_test_case "vlan_pvid_filtered" atf_add_test_case "vlan_pvid_tagged" atf_add_test_case "vlan_filtering" - atf_add_test_case "vlan_ifconfig_tagged" + atf_add_test_case "vlan_ifconfig_iftagged" atf_add_test_case "vlan_svi" atf_add_test_case "vlan_qinq" + atf_add_test_case "vlan_defuntagged" atf_add_test_case "bridge_svi_in_bridge" } diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index c42344da1a3b..0281e7fc273d 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -499,6 +499,81 @@ atf_test_case "6in6" "cleanup" ovpn_cleanup } +atf_test_case "linklocal" "cleanup" +linklocal_head() +{ + atf_set descr 'Use IPv6 link-local addresses' + atf_set require.user root + atf_set require.progs openvpn +} + +linklocal_body() +{ + ovpn_init + + l=$(vnet_mkepair) + + vnet_mkjail a ${l}a + jexec a ifconfig ${l}a inet6 fe80::a/64 up no_dad + vnet_mkjail b ${l}b + jexec b ifconfig ${l}b inet6 fe80::b/64 up no_dad + + # Sanity check + atf_check -s exit:0 -o ignore jexec a ping6 -c 1 fe80::b%${l}a + + ovpn_start a " + dev ovpn0 + dev-type tun + proto udp6 + + cipher AES-256-GCM + auth SHA256 + + local fe80::a%${l}a + server-ipv6 2001:db8:1::/64 + + ca $(atf_get_srcdir)/ca.crt + cert $(atf_get_srcdir)/server.crt + key $(atf_get_srcdir)/server.key + dh $(atf_get_srcdir)/dh.pem + + mode server + script-security 2 + auth-user-pass-verify /usr/bin/true via-env + topology subnet + + keepalive 100 600 + " + ovpn_start b " + dev tun0 + dev-type tun + + client + + remote fe80::a%${l}b + auth-user-pass $(atf_get_srcdir)/user.pass + + ca $(atf_get_srcdir)/ca.crt + cert $(atf_get_srcdir)/client.crt + key $(atf_get_srcdir)/client.key + dh $(atf_get_srcdir)/dh.pem + + keepalive 100 600 + " + + # Give the tunnel time to come up + sleep 10 + jexec a ifconfig + + atf_check -s exit:0 -o ignore jexec b ping6 -c 3 2001:db8:1::1 + atf_check -s exit:0 -o ignore jexec b ping6 -c 3 -z 16 2001:db8:1::1 +} + +linklocal_cleanup() +{ + ovpn_cleanup +} + atf_test_case "timeout_client" "cleanup" timeout_client_head() { @@ -1412,6 +1487,7 @@ atf_init_test_cases() atf_add_test_case "6in4" atf_add_test_case "6in6" atf_add_test_case "4in6" + atf_add_test_case "linklocal" atf_add_test_case "timeout_client" atf_add_test_case "explicit_exit" atf_add_test_case "multi_client" diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 404d5adfb07a..616ffe560b3a 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -55,6 +55,7 @@ ATF_TESTS_SH+= altq \ tcp \ tos +ATF_TESTS_PYTEST+= frag4.py ATF_TESTS_PYTEST+= frag6.py ATF_TESTS_PYTEST+= header.py ATF_TESTS_PYTEST+= icmp.py diff --git a/tests/sys/netpfil/pf/frag4.py b/tests/sys/netpfil/pf/frag4.py new file mode 100644 index 000000000000..3303d2ee7780 --- /dev/null +++ b/tests/sys/netpfil/pf/frag4.py @@ -0,0 +1,72 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2025 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +import pytest +from utils import DelayedSend +from atf_python.sys.net.tools import ToolsHelper +from atf_python.sys.net.vnet import VnetTestTemplate + +class TestFrag4_NoReassemble(VnetTestTemplate): + REQUIRED_MODULES = [ "pf" ] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1", "if2"]}, + "vnet3": {"ifaces": ["if2"]}, + "if1": {"prefixes4": [("192.0.2.1/24", "192.0.2.2/24")]}, + "if2": {"prefixes4": [("198.51.100.1/24", "198.51.100.2/24")]}, + } + + def vnet2_handler(self, vnet): + outifname = vnet.iface_alias_map["if2"].name + + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "set reassemble no", + "nat on %s from 192.0.2.0/24 to any -> (%s)" % (outifname, outifname), + "pass out" + ]) + + ToolsHelper.print_output("/sbin/sysctl net.inet.ip.forwarding=1") + + def vnet3_handler(self, vnet): + # We deliberately don't set the default gateway here, so if we get a + # reply from this we know we did NAT in vnet2 + pass + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_udp_frag(self): + ToolsHelper.print_output("/sbin/route add default 192.0.2.2") + ToolsHelper.print_output("/sbin/ping -c 3 198.51.100.2") + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + + pkt = sp.IP(dst="198.51.100.2", frag=123) \ + / sp.UDP(dport=12345, sport=54321) + reply = sp.sr1(pkt, timeout=3) + # We don't expect a reply + assert not reply diff --git a/tests/sys/netpfil/pf/nat.sh b/tests/sys/netpfil/pf/nat.sh index 16c981f97399..5ea1dd6d8b2f 100644 --- a/tests/sys/netpfil/pf/nat.sh +++ b/tests/sys/netpfil/pf/nat.sh @@ -782,6 +782,7 @@ empty_pool_head() { atf_set descr 'NAT with empty pool' atf_set require.user root + atf_set require.progs python3 scapy } empty_pool_body() diff --git a/tests/sys/netpfil/pf/nat64.py b/tests/sys/netpfil/pf/nat64.py index a5890fc4a161..0908c90c34a0 100644 --- a/tests/sys/netpfil/pf/nat64.py +++ b/tests/sys/netpfil/pf/nat64.py @@ -326,3 +326,31 @@ class TestNAT64(VnetTestTemplate): packets = sp.sniff(iface=ifname, timeout=5) for r in packets: r.show() + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_ttl_zero(self): + """ + PR 288274: we can use an mbuf after free on TTL = 0 + """ + ifname = self.vnet.iface_alias_map["if1"].name + gw_mac = self.vnet.iface_alias_map["if1"].epairb.ether + ToolsHelper.print_output("/sbin/route -6 add default 2001:db8::1") + + import scapy.all as sp + + pkt = sp.Ether(dst=gw_mac) \ + / sp.IPv6(dst="64:ff9b::192.0.2.2", hlim=0) \ + / sp.SCTP(sport=1111, dport=2222) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, \ + a_rwnd=1500, params=[ \ + sp.SCTPChunkParamIPv4Addr() \ + ]) + pkt.show() + sp.hexdump(pkt) + s = DelayedSend(pkt, sendif=ifname) + + packets = sp.sniff(iface=ifname, timeout=5) + for r in packets: + r.show() + diff --git a/tests/sys/netpfil/pf/nat64.sh b/tests/sys/netpfil/pf/nat64.sh index da95a7bf9893..f92a69f2abce 100644 --- a/tests/sys/netpfil/pf/nat64.sh +++ b/tests/sys/netpfil/pf/nat64.sh @@ -200,7 +200,7 @@ tcp_in_body() # Sanity check & delay for nc startup atf_check -s exit:0 -o ignore \ - ping6 -c 1 64:ff9b::192.0.2.2 + ping6 -c 3 64:ff9b::192.0.2.2 rcv=$(nc -w 3 -6 64:ff9b::c000:202 1234) if [ "${rcv}" != "foo" ]; @@ -230,7 +230,7 @@ tcp_out_body() # Sanity check & delay for nc startup atf_check -s exit:0 -o ignore \ - ping6 -c 1 64:ff9b::192.0.2.2 + ping6 -c 3 64:ff9b::192.0.2.2 rcv=$(nc -w 3 -6 64:ff9b::c000:202 1234) if [ "${rcv}" != "foo" ]; @@ -260,7 +260,7 @@ udp_in_body() # Sanity check & delay for nc startup atf_check -s exit:0 -o ignore \ - ping6 -c 1 64:ff9b::192.0.2.2 + ping6 -c 3 64:ff9b::192.0.2.2 rcv=$(echo bar | nc -w 3 -6 -u 64:ff9b::c000:202 1234) if [ "${rcv}" != "foo" ]; @@ -290,7 +290,7 @@ udp_out_body() # Sanity check & delay for nc startup atf_check -s exit:0 -o ignore \ - ping6 -c 1 64:ff9b::192.0.2.2 + ping6 -c 3 64:ff9b::192.0.2.2 rcv=$(echo bar | nc -w 3 -6 -u 64:ff9b::c000:202 1234) if [ "${rcv}" != "foo" ]; @@ -323,7 +323,7 @@ sctp_in_body() # Sanity check & delay for nc startup atf_check -s exit:0 -o ignore \ - ping6 -c 1 64:ff9b::192.0.2.2 + ping6 -c 3 64:ff9b::192.0.2.2 rcv=$(echo bar | nc --sctp -w 3 -6 64:ff9b::c000:202 1234) if [ "${rcv}" != "foo" ]; @@ -356,7 +356,7 @@ sctp_out_body() # Sanity check & delay for nc startup atf_check -s exit:0 -o ignore \ - ping6 -c 1 64:ff9b::192.0.2.2 + ping6 -c 3 64:ff9b::192.0.2.2 rcv=$(echo bar | nc --sctp -w 3 -6 64:ff9b::c000:202 1234) if [ "${rcv}" != "foo" ]; diff --git a/tests/sys/netpfil/pf/route_to.sh b/tests/sys/netpfil/pf/route_to.sh index fd1653cce311..765403dcb79c 100644 --- a/tests/sys/netpfil/pf/route_to.sh +++ b/tests/sys/netpfil/pf/route_to.sh @@ -865,6 +865,7 @@ empty_pool_head() { atf_set descr 'Route-to with empty pool' atf_set require.user root + atf_set require.progs python3 scapy } empty_pool_body() @@ -899,6 +900,7 @@ table_loop_head() { atf_set descr 'Check that iterating over tables poperly loops' atf_set require.user root + atf_set require.progs python3 scapy } table_loop_body() diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py index da42ce527195..f492f26b63a1 100644 --- a/tests/sys/netpfil/pf/sctp.py +++ b/tests/sys/netpfil/pf/sctp.py @@ -271,6 +271,9 @@ class TestSCTP(VnetTestTemplate): "pass inet proto sctp to 192.0.2.0/24", "pass on lo"]) + # Give the server some time to come up + time.sleep(3) + # Sanity check, we can communicate with the primary address. client = SCTPClient("192.0.2.3", 1234) client.send(b"hello", 0) @@ -309,6 +312,9 @@ class TestSCTP(VnetTestTemplate): "pass on lo", "pass inet proto sctp from 192.0.2.0/24"]) + # Give the server some time to come up + time.sleep(3) + # Sanity check, we can communicate with the primary address. client = SCTPClient("192.0.2.3", 1234, "192.0.2.1") client.send(b"hello", 0) @@ -379,6 +385,9 @@ class TestSCTP(VnetTestTemplate): "pass on lo", "pass inet proto sctp to 192.0.2.0/24"]) + # Give the server some time to come up + time.sleep(3) + # Sanity check, we can communicate with the primary address. client = SCTPClient("192.0.2.3", 1234) client.send(b"hello", 0) @@ -410,6 +419,9 @@ class TestSCTP(VnetTestTemplate): "pass on lo", "pass inet proto sctp to 192.0.2.0/24"]) + # Give the server some time to come up + time.sleep(3) + # Sanity check, we can communicate with the primary address. client = SCTPClient("192.0.2.3", 1234) client.send(b"hello", 0) @@ -440,6 +452,9 @@ class TestSCTP(VnetTestTemplate): "pass on lo", "pass inet proto sctp to 192.0.2.0/24"]) + # Give the server some time to come up + time.sleep(3) + # Set up a connection, which will try to create states for all addresses # we have assigned client = SCTPClient("192.0.2.3", 1234) @@ -464,6 +479,9 @@ class TestSCTP(VnetTestTemplate): "pass inet proto sctp to 192.0.2.3", "pass on lo"]) + # Give the server some time to come up + time.sleep(3) + # Sanity check, we can communicate with the primary address. client = SCTPClient("192.0.2.3", 1234) client.send(b"hello", 0) @@ -502,6 +520,9 @@ class TestSCTP(VnetTestTemplate): "pass inet proto sctp to 192.0.2.3 keep state (allow-related)", "pass on lo"]) + # Give the server some time to come up + time.sleep(3) + # Sanity check, we can communicate with the primary address. client = SCTPClient("192.0.2.3", 1234) client.send(b"hello", 0) @@ -558,6 +579,9 @@ class TestSCTPv6(VnetTestTemplate): "pass on lo", "pass inet6 proto sctp to 2001:db8::0/64"]) + # Give the server some time to come up + time.sleep(3) + # Sanity check, we can communicate with the primary address. client = SCTPClient("2001:db8::3", 1234) client.send(b"hello", 0) @@ -596,6 +620,9 @@ class TestSCTPv6(VnetTestTemplate): "pass on lo", "pass inet6 proto sctp from 2001:db8::/64"]) + # Give the server some time to come up + time.sleep(3) + # Sanity check, we can communicate with the primary address. client = SCTPClient("2001:db8::3", 1234, "2001:db8::1") client.send(b"hello", 0) @@ -665,6 +692,9 @@ class TestSCTPv6(VnetTestTemplate): "pass on lo", "pass inet6 proto sctp to 2001:db8::0/64"]) + # Give the server some time to come up + time.sleep(3) + # Sanity check, we can communicate with the primary address. client = SCTPClient("2001:db8::3", 1234) client.send(b"hello", 0) @@ -696,6 +726,9 @@ class TestSCTPv6(VnetTestTemplate): "pass on lo", "pass inet6 proto sctp to 2001:db8::0/64"]) + # Give the server some time to come up + time.sleep(3) + # Sanity check, we can communicate with the primary address. client = SCTPClient("2001:db8::3", 1234) client.send(b"hello", 0) diff --git a/tests/sys/netpfil/pf/src_track.sh b/tests/sys/netpfil/pf/src_track.sh index f4031e9dd8ad..68e7e72f5018 100755 --- a/tests/sys/netpfil/pf/src_track.sh +++ b/tests/sys/netpfil/pf/src_track.sh @@ -508,6 +508,7 @@ mixed_af_head() { atf_set descr 'Test mixed address family source tracking' atf_set require.user root + atf_set require.progs python3 scapy } mixed_af_body() diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh index 5e5fccdaca20..c773518e95e4 100644 --- a/tests/sys/netpfil/pf/table.sh +++ b/tests/sys/netpfil/pf/table.sh @@ -610,6 +610,47 @@ flush_cleanup() pft_cleanup } +atf_test_case "large" "cleanup" +large_head() +{ + atf_set descr 'Test loading a large list of addresses' + atf_set require.user root +} + +large_body() +{ + pft_init + pwd=$(pwd) + + vnet_mkjail alcatraz + + for i in `seq 1 255`; do + for j in `seq 1 255`; do + echo "1.2.${i}.${j}" >> ${pwd}/foo.lst + done + done + expected=$(wc -l foo.lst | awk '{ print $1; }') + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "table <foo>" \ + "pass in from <foo>" \ + "pass" + + atf_check -s exit:0 \ + -e match:"${expected}/${expected} addresses added." \ + jexec alcatraz pfctl -t foo -T add -f ${pwd}/foo.lst + actual=$(jexec alcatraz pfctl -t foo -T show | wc -l | awk '{ print $1; }') + if [[ $actual -ne $expected ]]; then + atf_fail "Unexpected number of table entries $expected $acual" + fi +} + +large_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4_counters" @@ -625,4 +666,5 @@ atf_init_test_cases() atf_add_test_case "precreate" atf_add_test_case "anchor" atf_add_test_case "flush" + atf_add_test_case "large" } diff --git a/tools/build/cross-build/include/common/libutil.h b/tools/build/cross-build/include/common/libutil.h index 15afd2fbca15..3cda32379965 100644 --- a/tools/build/cross-build/include/common/libutil.h +++ b/tools/build/cross-build/include/common/libutil.h @@ -39,4 +39,4 @@ #include_next <libutil.h> #endif -int expand_number(const char *_buf, uint64_t *_num); +int expand_number(const char *_buf, int64_t *_num); diff --git a/tools/build/cross-build/include/linux/libutil.h b/tools/build/cross-build/include/linux/libutil.h index 8f9ca406edc1..a1d6508be82d 100644 --- a/tools/build/cross-build/include/linux/libutil.h +++ b/tools/build/cross-build/include/linux/libutil.h @@ -46,7 +46,7 @@ struct pidfh; __BEGIN_DECLS int humanize_number(char *buf, size_t len, int64_t bytes, const char *suffix, int scale, int flags); -int expand_number(const char *_buf, uint64_t *_num); +int expand_number(const char *_buf, int64_t *_num); int flopen(const char *_path, int _flags, ...); int flopenat(int dirfd, const char *path, int flags, ...); diff --git a/tools/build/make.py b/tools/build/make.py index ec42cb70dd21..2f36a3e23e32 100755 --- a/tools/build/make.py +++ b/tools/build/make.py @@ -34,12 +34,24 @@ # On FreeBSD you can use it the same way as just calling make: # `MAKEOBJDIRPREFIX=~/obj ./tools/build/make.py buildworld -DWITH_FOO` # -# On Linux and MacOS you will either need to set XCC/XCXX/XLD/XCPP or pass -# --cross-bindir to specify the path to the cross-compiler bindir: -# `MAKEOBJDIRPREFIX=~/obj ./tools/build/make.py -# --cross-bindir=/path/to/cross/compiler buildworld -DWITH_FOO TARGET=foo -# TARGET_ARCH=bar` +# On Linux and MacOS you may need to explicitly indicate the cross toolchain +# to use. You can do this by: +# - setting XCC/XCXX/XLD/XCPP to the paths of each tool +# - using --cross-bindir to specify the path to the cross-compiler bindir: +# `MAKEOBJDIRPREFIX=~/obj ./tools/build/make.py +# --cross-bindir=/path/to/cross/compiler buildworld -DWITH_FOO TARGET=foo +# TARGET_ARCH=bar` +# - using --cross-toolchain to specify the package containing the cross-compiler +# (MacOS only currently): +# `MAKEOBJDIRPREFIX=~/obj ./tools/build/make.py +# --cross-toolchain=llvm@NN buildworld -DWITH_FOO TARGET=foo +# TARGET_ARCH=bar` +# +# On MacOS, this tool will search for an llvm toolchain installed via brew and +# use it as the cross toolchain if an explicit toolchain is not specified. + import argparse +import functools import os import shlex import shutil @@ -159,7 +171,8 @@ def check_required_make_env_var(varname, binary_name, bindir): return if not bindir: sys.exit("Could not infer value for $" + varname + ". Either set $" + - varname + " or pass --cross-bindir=/cross/compiler/dir/bin") + varname + " or pass --cross-bindir=/cross/compiler/dir/bin" + + " or --cross-toolchain=<package>") # try to infer the path to the tool guess = os.path.join(bindir, binary_name) if not os.path.isfile(guess): @@ -178,24 +191,45 @@ def check_xtool_make_env_var(varname, binary_name): return global parsed_args if parsed_args.cross_bindir is None: - parsed_args.cross_bindir = default_cross_toolchain() + cross_bindir = cross_toolchain_bindir(binary_name, + parsed_args.cross_toolchain) + else: + cross_bindir = parsed_args.cross_bindir return check_required_make_env_var(varname, binary_name, - parsed_args.cross_bindir) + cross_bindir) + + +@functools.cache +def brew_prefix(package: str) -> str: + path = subprocess.run(["brew", "--prefix", package], stdout=subprocess.PIPE, + stderr=subprocess.PIPE).stdout.strip() + debug("Inferred", package, "dir as", path) + return path.decode("utf-8") +def binary_path(bindir: str, binary_name: str) -> "Optional[str]": + try: + if bindir and Path(bindir, "bin", binary_name).exists(): + return str(Path(bindir, "bin")) + except OSError: + pass + return None -def default_cross_toolchain(): +def cross_toolchain_bindir(binary_name: str, package: "Optional[str]") -> str: # default to homebrew-installed clang on MacOS if available if sys.platform.startswith("darwin"): if shutil.which("brew"): - llvm_dir = subprocess.run([ - "brew", "--prefix", "llvm"], - stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.strip() - debug("Inferred LLVM dir as", llvm_dir) - try: - if llvm_dir and Path(llvm_dir.decode("utf-8"), "bin").exists(): - return str(Path(llvm_dir.decode("utf-8"), "bin")) - except OSError: - return None + if not package: + package = "llvm" + bindir = binary_path(brew_prefix(package), binary_name) + if bindir: + return bindir + + # brew installs lld as a separate package for LLVM 19 and later + if binary_name == "ld.lld": + lld_package = package.replace("llvm", "lld") + bindir = binary_path(brew_prefix(lld_package), binary_name) + if bindir: + return bindir return None @@ -215,6 +249,10 @@ if __name__ == "__main__": help="Compiler type to find in --cross-bindir (only " "needed if XCC/XCPP/XLD are not set)" "Note: using CC is currently highly experimental") + parser.add_argument("--cross-toolchain", default=None, + help="Name of package containing cc/c++/cpp/ld to build " + "target binaries (only needed if XCC/XCPP/XLD " + "are not set)") parser.add_argument("--host-compiler-type", choices=("cc", "clang", "gcc"), default="cc", help="Compiler type to find in --host-bindir (only " diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 580be4362a18..58ca2a49b801 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2837,6 +2837,9 @@ OLD_FILES+=usr/lib/libgssapi_krb5.a OLD_FILES+=usr/lib/libgssapi_krb5.so OLD_LIBS+=usr/lib/libgssapi_krb5.so.10 OLD_FILES+=usr/lib/libgssapi_krb5_p.a +OLD_FILES+=usr/lib/libgssapi_mech.a +OLD_FILES+=usr/lib/libgssapi_mech.so +OLD_LIBS+=usr/lib/libgssapi_mech.so.10 OLD_FILES+=usr/lib/libgssapi_ntlm.a OLD_FILES+=usr/lib/libgssapi_ntlm.so OLD_LIBS+=usr/lib/libgssapi_ntlm.so.10 @@ -4919,6 +4922,9 @@ OLD_LIBS+=usr/lib/libcom_err.so.5 OLD_FILES+=usr/lib/libcom_err_p.a OLD_LIBS+=usr/lib/libgssapi_krb5.so.10 OLD_FILES+=usr/lib/libgssapi_krb5_p.a +OLD_FILES+=usr/lib/libgssapi_mech.a +OLD_FILES+=usr/lib/libgssapi_mech.so +OLD_LIBS+=usr/lib/libgssapi_mech.so.10 OLD_FILES+=usr/lib/libgssapi_ntlm.a OLD_FILES+=usr/lib/libgssapi_ntlm.so OLD_LIBS+=usr/lib/libgssapi_ntlm.so.10 diff --git a/tools/build/options/WITHOUT_MITKRB5 b/tools/build/options/WITHOUT_MITKRB5 new file mode 100644 index 000000000000..14a9e5932ef2 --- /dev/null +++ b/tools/build/options/WITHOUT_MITKRB5 @@ -0,0 +1 @@ +Set this to build KTH Heimdal instead of MIT Kerberos 5. diff --git a/usr.bin/bmake/Makefile b/usr.bin/bmake/Makefile index bbceea3ae8c2..a8bcdfd9f859 100644 --- a/usr.bin/bmake/Makefile +++ b/usr.bin/bmake/Makefile @@ -99,6 +99,8 @@ COPTS.filemon_ktrace.c+= -Wno-error=unused-parameter SUBDIR.${MK_TESTS}+= unit-tests .endif +MAN1= ${MAN} + .if ${MK_GEN_MAN:Uno} == "yes" # we use this to generate ${MAN} diff --git a/usr.bin/bmake/Makefile.config b/usr.bin/bmake/Makefile.config index 8ff6c81b8c78..2415f9d3882c 100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@ -6,7 +6,7 @@ SRCTOP?= ${.CURDIR:H:H} # things set by configure -_MAKE_VERSION?=20250707 +_MAKE_VERSION?=20250804 prefix?= /usr srcdir= ${SRCTOP}/contrib/bmake diff --git a/usr.bin/bmake/unit-tests/Makefile b/usr.bin/bmake/unit-tests/Makefile index d4ee6f33f862..66bdc04321e8 100644 --- a/usr.bin/bmake/unit-tests/Makefile +++ b/usr.bin/bmake/unit-tests/Makefile @@ -1,9 +1,9 @@ # This is a generated file, do NOT edit! # See contrib/bmake/bsd.after-import.mk # -# $Id: Makefile,v 1.240 2025/06/30 18:40:54 sjg Exp $ +# $Id: Makefile,v 1.245 2025/08/05 16:18:07 sjg Exp $ # -# $NetBSD: Makefile,v 1.369 2025/06/29 09:40:13 rillig Exp $ +# $NetBSD: Makefile,v 1.372 2025/08/04 22:44:49 sjg Exp $ # # Unit tests for make(1) # @@ -237,6 +237,7 @@ TESTS+= jobs-error-nested-make TESTS+= lint TESTS+= make-exported TESTS+= meta-cmd-cmp +TESTS+= meta-output TESTS+= moderrs TESTS+= modmisc .if ${.MAKE.UID} > 0 @@ -595,6 +596,7 @@ SED_CMDS.directive-include-guard= \ -e '/^ParseDependency/d' \ -e '/^ParseEOF:/d' SED_CMDS.export= -e '/^[^=_A-Za-z0-9]*=/d' +SED_CMDS.export+= -e '/^DIFF/d' .if ${.MAKE.OS:NCygwin} == "" SED_CMDS.export+= -e '/^WINDIR=/d' -e '/^SYSTEMROOT=/d' .endif @@ -805,6 +807,7 @@ EGREP= grep -E EGREP?= egrep MAKE_TEST_ENV= EGREP="${EGREP}" +MAKE_TEST_ENV+= DIFF="${TOOL_DIFF}" DIFF_FLAGS="${DIFF_FLAGS}" MAKE_TEST_ENV+= MALLOC_OPTIONS="JA" # for jemalloc 100 MAKE_TEST_ENV+= MALLOC_CONF="junk:true" # for jemalloc 510 MAKE_TEST_ENV+= TMPDIR=${TMPDIR} diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c index dfd2e89a7e78..7112e0dddb91 100644 --- a/usr.bin/id/id.c +++ b/usr.bin/id/id.c @@ -40,13 +40,14 @@ #include <errno.h> #include <grp.h> #include <pwd.h> +#include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> -static void id_print(struct passwd *, int, int, int); +static void id_print(struct passwd *); static void pline(struct passwd *); static void pretty(struct passwd *); #ifdef USE_BSM_AUDIT @@ -202,14 +203,7 @@ main(int argc, char *argv[]) exit(0); } - if (pw) { - id_print(pw, 1, 0, 0); - } - else { - id = getuid(); - pw = getpwuid(id); - id_print(pw, 0, 1, 1); - } + id_print(pw); exit(0); } @@ -254,7 +248,7 @@ pretty(struct passwd *pw) } static void -id_print(struct passwd *pw, int use_ggl, int p_euid, int p_egid) +id_print(struct passwd *pw) { struct group *gr; gid_t gid, egid, lastgid; @@ -263,21 +257,24 @@ id_print(struct passwd *pw, int use_ggl, int p_euid, int p_egid) long ngroups_max; gid_t *groups; const char *fmt; + bool print_dbinfo; - if (pw != NULL) { + print_dbinfo = pw != NULL; + if (print_dbinfo) { uid = pw->pw_uid; gid = pw->pw_gid; } else { uid = getuid(); gid = getgid(); + pw = getpwuid(uid); } ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; if ((groups = malloc(sizeof(gid_t) * ngroups_max)) == NULL) err(1, "malloc"); - if (use_ggl && pw != NULL) { + if (print_dbinfo) { ngroups = ngroups_max; getgrouplist(pw->pw_name, gid, groups, &ngroups); } @@ -285,19 +282,23 @@ id_print(struct passwd *pw, int use_ggl, int p_euid, int p_egid) ngroups = getgroups(ngroups_max, groups); } + /* + * We always resolve uids and gids where we can to a name, even if we + * are printing the running process credentials, to be nice. + */ if (pw != NULL) printf("uid=%u(%s)", uid, pw->pw_name); - else - printf("uid=%u", getuid()); + else + printf("uid=%u", uid); printf(" gid=%u", gid); if ((gr = getgrgid(gid))) (void)printf("(%s)", gr->gr_name); - if (p_euid && (euid = geteuid()) != uid) { + if (!print_dbinfo && (euid = geteuid()) != uid) { (void)printf(" euid=%u", euid); if ((pw = getpwuid(euid))) (void)printf("(%s)", pw->pw_name); } - if (p_egid && (egid = getegid()) != gid) { + if (!print_dbinfo && (egid = getegid()) != gid) { (void)printf(" egid=%u", egid); if ((gr = getgrgid(egid))) (void)printf("(%s)", gr->gr_name); diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index fc60a82287df..a92eee3881b4 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -95,15 +95,17 @@ main(int argc, char *argv[]) * -r is the entire file, not 10 lines. */ #define ARG(units, forward, backward) { \ + int64_t num; \ if (style) \ usage(); \ - if (expand_number(optarg, &off)) \ + if (expand_number(optarg, &num)) \ err(1, "illegal offset -- %s", optarg); \ - if (off > INT64_MAX / units || off < INT64_MIN / units ) \ + if (num > INT64_MAX / units || num < INT64_MIN / units) \ errx(1, "illegal offset -- %s", optarg); \ - switch(optarg[0]) { \ + off = num * units; \ + switch (optarg[0]) { \ case '+': \ - if (off) \ + if (off != 0) \ off -= (units); \ style = (forward); \ break; \ @@ -121,7 +123,7 @@ main(int argc, char *argv[]) off = 0; while ((ch = getopt_long(argc, argv, "+Fb:c:fn:qrv", long_opts, NULL)) != -1) - switch(ch) { + switch (ch) { case 'F': /* -F is superset of (and implies) -f */ Fflag = fflag = 1; break; diff --git a/usr.bin/tail/tests/tail_test.sh b/usr.bin/tail/tests/tail_test.sh index 9c941f8a2c2f..74d6908f7568 100755 --- a/usr.bin/tail/tests/tail_test.sh +++ b/usr.bin/tail/tests/tail_test.sh @@ -423,6 +423,51 @@ no_lf_at_eof_body() atf_check -o inline:"a\nb\nc" tail -4 infile } +atf_test_case tail_b +tail_b_head() +{ + atf_set "descr" "Test -b option" +} +tail_b_body() +{ + (jot -b a 256 ; jot -b b 256 ; jot -b c 256) >infile + (jot -b b 256 ; jot -b c 256) >outfile + # infile is 3 blocks long, outfile contains the last two + atf_check -o file:outfile tail -b +2 infile # start at the 2nd block + atf_check -o file:outfile tail -b -2 infile # 2 blocks from the end + atf_check -o file:outfile tail -b 2 infile # 2 blocks from the end +} + +atf_test_case tail_c +tail_c_head() +{ + atf_set "descr" "Test -c option" +} +tail_c_body() +{ + (jot -b a 256 ; jot -b b 256 ; jot -b c 256) >infile + (jot -b b 256 ; jot -b c 256) >outfile + # infile is 1536 bytes long, outfile contains the last 1024 + atf_check -o file:outfile tail -c +513 infile # start at the 513th byte + atf_check -o file:outfile tail -c -1024 infile # 1024 bytes from the end + atf_check -o file:outfile tail -c 1024 infile # 1024 bytes from the end +} + +atf_test_case tail_n +tail_n_head() +{ + atf_set "descr" "Test -n option" +} +tail_n_body() +{ + (jot -b a 256 ; jot -b b 256 ; jot -b c 256) >infile + (jot -b b 256 ; jot -b c 256) >outfile + # infile is 768 lines long, outfile contains the last 512 + atf_check -o file:outfile tail -n +257 infile # start at the 257th line + atf_check -o file:outfile tail -n -512 infile # 512 lines from the end + atf_check -o file:outfile tail -n 512 infile # 512 lines from the end +} + atf_init_test_cases() { atf_add_test_case empty_r @@ -448,4 +493,7 @@ atf_init_test_cases() atf_add_test_case verbose_header atf_add_test_case si_number atf_add_test_case no_lf_at_eof + atf_add_test_case tail_b + atf_add_test_case tail_c + atf_add_test_case tail_n } diff --git a/usr.sbin/bhyve/amd64/pci_gvt-d.c b/usr.sbin/bhyve/amd64/pci_gvt-d.c index 60bf460d71ed..0ea53689f2b2 100644 --- a/usr.sbin/bhyve/amd64/pci_gvt-d.c +++ b/usr.sbin/bhyve/amd64/pci_gvt-d.c @@ -20,6 +20,7 @@ #include "amd64/e820.h" #include "pci_gvt-d-opregion.h" #include "pci_passthru.h" +#include "pciids_intel_gpus.h" #define KB (1024UL) #define MB (1024 * KB) @@ -32,15 +33,180 @@ #define PCI_VENDOR_INTEL 0x8086 #define PCIR_BDSM 0x5C /* Base of Data Stolen Memory register */ +#define PCIR_BDSM_GEN11 0xC0 #define PCIR_ASLS_CTL 0xFC /* Opregion start address register */ #define PCIM_BDSM_GSM_ALIGNMENT \ 0x00100000 /* Graphics Stolen Memory is 1 MB aligned */ +#define BDSM_GEN11_MMIO_ADDRESS 0x1080C0 + #define GVT_D_MAP_GSM 0 #define GVT_D_MAP_OPREGION 1 #define GVT_D_MAP_VBT 2 +static uint64_t +gvt_d_dsmbase_read(struct pci_devinst *pi, int baridx __unused, uint64_t offset, + int size) +{ + switch (size) { + case 1: + return (pci_get_cfgdata8(pi, PCIR_BDSM_GEN11 + offset)); + case 2: + return (pci_get_cfgdata16(pi, PCIR_BDSM_GEN11 + offset)); + case 4: + return (pci_get_cfgdata32(pi, PCIR_BDSM_GEN11 + offset)); + default: + return (UINT64_MAX); + } +} + +static void +gvt_d_dsmbase_write(struct pci_devinst *pi, int baridx __unused, + uint64_t offset, int size, uint64_t val) +{ + switch (size) { + case 1: + pci_set_cfgdata8(pi, PCIR_BDSM_GEN11 + offset, val); + break; + case 2: + pci_set_cfgdata16(pi, PCIR_BDSM_GEN11 + offset, val); + break; + case 4: + pci_set_cfgdata32(pi, PCIR_BDSM_GEN11 + offset, val); + break; + default: + break; + } +} + +static int +set_bdsm_gen3(struct pci_devinst *const pi, vm_paddr_t bdsm_gpa) +{ + struct passthru_softc *sc = pi->pi_arg; + uint32_t bdsm; + int error; + + bdsm = pci_host_read_config(passthru_get_sel(sc), PCIR_BDSM, 4); + + /* Protect the BDSM register in PCI space. */ + pci_set_cfgdata32(pi, PCIR_BDSM, + bdsm_gpa | (bdsm & (PCIM_BDSM_GSM_ALIGNMENT - 1))); + error = set_pcir_handler(sc, PCIR_BDSM, 4, passthru_cfgread_emulate, + passthru_cfgwrite_emulate); + if (error) { + warnx("%s: Failed to setup handler for BDSM register!", __func__); + return (error); + } + + return (0); +} + +static int +set_bdsm_gen11(struct pci_devinst *const pi, vm_paddr_t bdsm_gpa) +{ + struct passthru_softc *sc = pi->pi_arg; + uint64_t bdsm; + int error; + + bdsm = pci_host_read_config(passthru_get_sel(sc), PCIR_BDSM_GEN11, 8); + + /* Protect the BDSM register in PCI space. */ + pci_set_cfgdata32(pi, PCIR_BDSM_GEN11, + bdsm_gpa | (bdsm & (PCIM_BDSM_GSM_ALIGNMENT - 1))); + pci_set_cfgdata32(pi, PCIR_BDSM_GEN11 + 4, bdsm_gpa >> 32); + error = set_pcir_handler(sc, PCIR_BDSM_GEN11, 8, passthru_cfgread_emulate, + passthru_cfgwrite_emulate); + if (error) { + warnx("%s: Failed to setup handler for BDSM register!\n", __func__); + return (error); + } + + /* Protect the BDSM register in MMIO space. */ + error = passthru_set_bar_handler(sc, 0, BDSM_GEN11_MMIO_ADDRESS, sizeof(uint64_t), + gvt_d_dsmbase_read, gvt_d_dsmbase_write); + if (error) { + warnx("%s: Failed to setup handler for BDSM mirror!\n", __func__); + return (error); + } + + return (0); +} + +struct igd_ops { + int (*set_bdsm)(struct pci_devinst *const pi, vm_paddr_t bdsm_gpa); +}; + +static const struct igd_ops igd_ops_gen3 = { .set_bdsm = set_bdsm_gen3 }; + +static const struct igd_ops igd_ops_gen11 = { .set_bdsm = set_bdsm_gen11 }; + +struct igd_device { + uint32_t device_id; + const struct igd_ops *ops; +}; + +#define IGD_DEVICE(_device_id, _ops) \ + { \ + .device_id = (_device_id), \ + .ops = (_ops), \ + } + +static const struct igd_device igd_devices[] = { + INTEL_I915G_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_I915GM_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_I945G_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_I945GM_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_VLV_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_PNV_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_I965GM_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_GM45_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_G45_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_ILK_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_SNB_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_IVB_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_HSW_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_BDW_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_CHV_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_SKL_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_BXT_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_KBL_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_CFL_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_WHL_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_CML_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_GLK_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_CNL_IDS(IGD_DEVICE, &igd_ops_gen3), + INTEL_ICL_IDS(IGD_DEVICE, &igd_ops_gen11), + INTEL_EHL_IDS(IGD_DEVICE, &igd_ops_gen11), + INTEL_JSL_IDS(IGD_DEVICE, &igd_ops_gen11), + INTEL_TGL_IDS(IGD_DEVICE, &igd_ops_gen11), + INTEL_RKL_IDS(IGD_DEVICE, &igd_ops_gen11), + INTEL_ADLS_IDS(IGD_DEVICE, &igd_ops_gen11), + INTEL_ADLP_IDS(IGD_DEVICE, &igd_ops_gen11), + INTEL_ADLN_IDS(IGD_DEVICE, &igd_ops_gen11), + INTEL_RPLS_IDS(IGD_DEVICE, &igd_ops_gen11), + INTEL_RPLU_IDS(IGD_DEVICE, &igd_ops_gen11), + INTEL_RPLP_IDS(IGD_DEVICE, &igd_ops_gen11), +}; + +static const struct igd_ops * +get_igd_ops(struct pci_devinst *const pi) +{ + struct passthru_softc *sc = pi->pi_arg; + uint16_t device_id; + + device_id = pci_host_read_config(passthru_get_sel(sc), PCIR_DEVICE, + 0x02); + for (size_t i = 0; i < nitems(igd_devices); i++) { + if (igd_devices[i].device_id != device_id) + continue; + + return (igd_devices[i].ops); + } + + return (NULL); +} + static int gvt_d_probe(struct pci_devinst *const pi) { @@ -108,8 +274,8 @@ gvt_d_setup_gsm(struct pci_devinst *const pi) { struct passthru_softc *sc; struct passthru_mmio_mapping *gsm; + const struct igd_ops *igd_ops; size_t sysctl_len; - uint32_t bdsm; int error; sc = pi->pi_arg; @@ -170,12 +336,14 @@ gvt_d_setup_gsm(struct pci_devinst *const pi) "Warning: Unable to reuse host address of Graphics Stolen Memory. GPU passthrough might not work properly."); } - bdsm = pci_host_read_config(passthru_get_sel(sc), PCIR_BDSM, 4); - pci_set_cfgdata32(pi, PCIR_BDSM, - gsm->gpa | (bdsm & (PCIM_BDSM_GSM_ALIGNMENT - 1))); + igd_ops = get_igd_ops(pi); + if (igd_ops == NULL) { + warn("%s: Unknown IGD device. It's not supported yet!", + __func__); + return (-1); + } - return (set_pcir_handler(sc, PCIR_BDSM, 4, passthru_cfgread_emulate, - passthru_cfgwrite_emulate)); + return (igd_ops->set_bdsm(pi, gsm->gpa)); } static int diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index a82078f6e036..8ddcd8bd56e8 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -79,6 +79,14 @@ static int pcifd = -1; SET_DECLARE(passthru_dev_set, struct passthru_dev); +struct passthru_bar_handler { + TAILQ_ENTRY(passthru_bar_handler) chain; + uint64_t off; + uint64_t size; + passthru_read_handler read; + passthru_write_handler write; +}; + struct passthru_softc { struct pci_devinst *psc_pi; /* ROM is handled like a BAR */ @@ -96,6 +104,9 @@ struct passthru_softc { struct passthru_mmio_mapping psc_mmio_map[PASSTHRU_MMIO_MAX]; cfgread_handler psc_pcir_rhandler[PCI_REGMAX + 1]; cfgwrite_handler psc_pcir_whandler[PCI_REGMAX + 1]; + + TAILQ_HEAD(, + passthru_bar_handler) psc_bar_handler[PCI_BARMAX_WITH_ROM + 1]; }; static int @@ -741,6 +752,45 @@ set_pcir_handler(struct passthru_softc *sc, int reg, int len, return (0); } +int +passthru_set_bar_handler(struct passthru_softc *sc, int baridx, uint64_t off, + uint64_t size, passthru_read_handler rhandler, + passthru_write_handler whandler) +{ + struct passthru_bar_handler *handler_new; + struct passthru_bar_handler *handler; + + assert(sc->psc_bar[baridx].type == PCIBAR_IO || + sc->psc_bar[baridx].type == PCIBAR_MEM32 || + sc->psc_bar[baridx].type == PCIBAR_MEM64); + assert(sc->psc_bar[baridx].size >= off + size); + assert(off < off + size); + + handler_new = malloc(sizeof(struct passthru_bar_handler)); + if (handler_new == NULL) { + return (ENOMEM); + } + + handler_new->off = off; + handler_new->size = size; + handler_new->read = rhandler; + handler_new->write = whandler; + + TAILQ_FOREACH(handler, &sc->psc_bar_handler[baridx], chain) { + if (handler->off < handler_new->off) { + assert(handler->off + handler->size < handler_new->off); + continue; + } + assert(handler->off > handler_new->off + handler_new->size); + TAILQ_INSERT_BEFORE(handler, handler_new, chain); + return (0); + } + + TAILQ_INSERT_TAIL(&sc->psc_bar_handler[baridx], handler_new, chain); + + return (0); +} + static int passthru_legacy_config(nvlist_t *nvl, const char *opts) { @@ -947,6 +997,9 @@ passthru_init(struct pci_devinst *pi, nvlist_t *nvl) pi->pi_arg = sc; sc->psc_pi = pi; + for (uint8_t i = 0; i < PCI_BARMAX_WITH_ROM + 1; ++i) + TAILQ_INIT(&sc->psc_bar_handler[i]); + /* initialize config space */ if ((error = cfginit(pi, bus, slot, func)) != 0) goto done; @@ -1166,6 +1219,7 @@ passthru_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { struct passthru_softc *sc; + struct passthru_bar_handler *handler; struct pci_bar_ioreq pio; sc = pi->pi_arg; @@ -1173,9 +1227,27 @@ passthru_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, if (baridx == pci_msix_table_bar(pi)) { msix_table_write(sc, offset, size, value); } else { - assert(pi->pi_bar[baridx].type == PCIBAR_IO); assert(size == 1 || size == 2 || size == 4); - assert(offset <= UINT32_MAX && offset + size <= UINT32_MAX); + + TAILQ_FOREACH(handler, &sc->psc_bar_handler[baridx], chain) { + if (offset >= handler->off + handler->size) { + continue; + } else if (offset < handler->off) { + assert(offset + size < handler->off); + /* + * The list is sorted in ascending order, so all + * remaining handlers will have an even larger + * offset. + */ + break; + } + + assert(offset + size <= handler->off + handler->size); + + handler->write(pi, baridx, + offset - handler->off, size, value); + return; + } bzero(&pio, sizeof(pio)); pio.pbi_sel = sc->psc_sel; @@ -1193,6 +1265,7 @@ static uint64_t passthru_read(struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct passthru_softc *sc; + struct passthru_bar_handler *handler; struct pci_bar_ioreq pio; uint64_t val; @@ -1201,9 +1274,26 @@ passthru_read(struct pci_devinst *pi, int baridx, uint64_t offset, int size) if (baridx == pci_msix_table_bar(pi)) { val = msix_table_read(sc, offset, size); } else { - assert(pi->pi_bar[baridx].type == PCIBAR_IO); assert(size == 1 || size == 2 || size == 4); - assert(offset <= UINT32_MAX && offset + size <= UINT32_MAX); + + TAILQ_FOREACH(handler, &sc->psc_bar_handler[baridx], chain) { + if (offset >= handler->off + handler->size) { + continue; + } else if (offset < handler->off) { + assert(offset + size < handler->off); + /* + * The list is sorted in ascending order, so all + * remaining handlers will have an even larger + * offset. + */ + break; + } + + assert(offset + size <= handler->off + handler->size); + + return (handler->read(pi, baridx, + offset - handler->off, size)); + } bzero(&pio, sizeof(pio)); pio.pbi_sel = sc->psc_sel; @@ -1272,27 +1362,64 @@ passthru_msix_addr(struct pci_devinst *pi, int baridx, int enabled, } } -static void -passthru_mmio_addr(struct pci_devinst *pi, int baridx, int enabled, - uint64_t address) +static int +passthru_mmio_map(struct pci_devinst *pi, int baridx, int enabled, + uint64_t address, uint64_t off, uint64_t size) { struct passthru_softc *sc; sc = pi->pi_arg; if (!enabled) { if (vm_unmap_pptdev_mmio(pi->pi_vmctx, sc->psc_sel.pc_bus, - sc->psc_sel.pc_dev, - sc->psc_sel.pc_func, address, - sc->psc_bar[baridx].size) != 0) + sc->psc_sel.pc_dev, sc->psc_sel.pc_func, address + off, + size) != 0) { warnx("pci_passthru: unmap_pptdev_mmio failed"); + return (-1); + } } else { if (vm_map_pptdev_mmio(pi->pi_vmctx, sc->psc_sel.pc_bus, - sc->psc_sel.pc_dev, - sc->psc_sel.pc_func, address, - sc->psc_bar[baridx].size, - sc->psc_bar[baridx].addr) != 0) + sc->psc_sel.pc_dev, sc->psc_sel.pc_func, address + off, + size, sc->psc_bar[baridx].addr + off) != 0) { warnx("pci_passthru: map_pptdev_mmio failed"); + return (-1); + } } + + return (0); +} + +static void +passthru_mmio_addr(struct pci_devinst *pi, int baridx, int enabled, + uint64_t address) +{ + struct passthru_softc *sc; + struct passthru_bar_handler *handler; + uint64_t off; + + sc = pi->pi_arg; + + off = 0; + + /* The queue is sorted by offset in ascending order. */ + TAILQ_FOREACH(handler, &sc->psc_bar_handler[baridx], chain) { + uint64_t handler_off = trunc_page(handler->off); + uint64_t handler_end = round_page(handler->off + handler->size); + + /* + * When two handlers point to the same page, handler_off can be + * lower than off. That's fine because we have nothing to do in + * that case. + */ + if (handler_off > off) { + passthru_mmio_map(pi, baridx, enabled, address, off, + handler_off - off); + } + + off = handler_end; + } + + passthru_mmio_map(pi, baridx, enabled, address, off, + sc->psc_bar[baridx].size - off); } static void diff --git a/usr.sbin/bhyve/pci_passthru.h b/usr.sbin/bhyve/pci_passthru.h index a89ad287cbc5..9e7b27d95735 100644 --- a/usr.sbin/bhyve/pci_passthru.h +++ b/usr.sbin/bhyve/pci_passthru.h @@ -35,6 +35,10 @@ typedef int (*cfgread_handler)(struct passthru_softc *sc, struct pci_devinst *pi, int coff, int bytes, uint32_t *rv); typedef int (*cfgwrite_handler)(struct passthru_softc *sc, struct pci_devinst *pi, int coff, int bytes, uint32_t val); +typedef uint64_t (*passthru_read_handler)(struct pci_devinst *pi, int baridx, + uint64_t offset, int size); +typedef void (*passthru_write_handler)(struct pci_devinst *pi, int baridx, uint64_t offset, + int size, uint64_t val); uint32_t pci_host_read_config(const struct pcisel *sel, long reg, int width); void pci_host_write_config(const struct pcisel *sel, long reg, int width, @@ -49,3 +53,6 @@ struct passthru_mmio_mapping *passthru_get_mmio(struct passthru_softc *sc, struct pcisel *passthru_get_sel(struct passthru_softc *sc); int set_pcir_handler(struct passthru_softc *sc, int reg, int len, cfgread_handler rhandler, cfgwrite_handler whandler); +int passthru_set_bar_handler(struct passthru_softc *sc, int baridx, + uint64_t off, uint64_t size, passthru_read_handler rhandler, + passthru_write_handler whandler); diff --git a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 index beb1b102b194..9e54445a012b 100644 --- a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 +++ b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 @@ -26,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 31, 2024 +.Dd July 15, 2025 .Dt ATH3KFW 8 .Os .Sh NAME .Nm ath3kfw -.Nd download firmware for Atheros AR3011/AR3012 Bluetooth USB devices +.Nd load firmware for Atheros AR3011/AR3012 Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl DI diff --git a/usr.sbin/bluetooth/bcmfw/bcmfw.8 b/usr.sbin/bluetooth/bcmfw/bcmfw.8 index 50e9739340ee..28f0cbbafe00 100644 --- a/usr.sbin/bluetooth/bcmfw/bcmfw.8 +++ b/usr.sbin/bluetooth/bcmfw/bcmfw.8 @@ -25,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 31, 2024 +.Dd July 15, 2025 .Dt BCMFW 8 .Os .Sh NAME .Nm bcmfw -.Nd download firmware for Broadcom BCM2033 Bluetooth USB devices +.Nd load firmware for Broadcom BCM2033 Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl h diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index 87f34435d3f4..ac32a675aa63 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -26,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 15, 2024 +.Dd July 15, 2025 .Dt IWMBTFW 8 .Os .Sh NAME .Nm iwmbtfw -.Nd download firmware for Intel Wireless AC Bluetooth USB devices +.Nd load firmware for Intel Wireless AC Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl DI diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8 b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8 index c3c0b83d97e5..5cae9c9d288d 100644 --- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8 +++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8 @@ -23,13 +23,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 19, 2023 +.Dd July 15, 2025 .Dt RTLBTFW 8 .Os .Sh NAME .Nm rtlbtfw -.Nd firmware download utility for Realtek 87XX/88XX chip based Bluetooth -USB devices +.Nd load firmware for Realtek 87XX/88XX Bluetooth USB devices .Sh SYNOPSIS .Nm .Fl d Ar device_name diff --git a/usr.sbin/bsdconfig/Makefile b/usr.sbin/bsdconfig/Makefile index 5b03ebbe39f9..a3b72d248a14 100644 --- a/usr.sbin/bsdconfig/Makefile +++ b/usr.sbin/bsdconfig/Makefile @@ -1,5 +1,7 @@ .include <src.opts.mk> +PACKAGE= bsdconfig + SUBDIR= console \ diskmgmt \ docsinstall \ diff --git a/usr.sbin/bsdconfig/Makefile.inc b/usr.sbin/bsdconfig/Makefile.inc new file mode 100644 index 000000000000..156c588eb3de --- /dev/null +++ b/usr.sbin/bsdconfig/Makefile.inc @@ -0,0 +1 @@ +PACKAGE= bsdconfig diff --git a/usr.sbin/bsdconfig/console/Makefile.inc b/usr.sbin/bsdconfig/console/Makefile.inc new file mode 100644 index 000000000000..156c588eb3de --- /dev/null +++ b/usr.sbin/bsdconfig/console/Makefile.inc @@ -0,0 +1 @@ +PACKAGE= bsdconfig diff --git a/usr.sbin/bsdconfig/diskmgmt/Makefile.inc b/usr.sbin/bsdconfig/diskmgmt/Makefile.inc new file mode 100644 index 000000000000..156c588eb3de --- /dev/null +++ b/usr.sbin/bsdconfig/diskmgmt/Makefile.inc @@ -0,0 +1 @@ +PACKAGE= bsdconfig diff --git a/usr.sbin/bsdconfig/docsinstall/Makefile.inc b/usr.sbin/bsdconfig/docsinstall/Makefile.inc new file mode 100644 index 000000000000..156c588eb3de --- /dev/null +++ b/usr.sbin/bsdconfig/docsinstall/Makefile.inc @@ -0,0 +1 @@ +PACKAGE= bsdconfig diff --git a/usr.sbin/bsdconfig/dot/Makefile.inc b/usr.sbin/bsdconfig/dot/Makefile.inc new file mode 100644 index 000000000000..156c588eb3de --- /dev/null +++ b/usr.sbin/bsdconfig/dot/Makefile.inc @@ -0,0 +1 @@ +PACKAGE= bsdconfig diff --git a/usr.sbin/bsdconfig/includes/Makefile.inc b/usr.sbin/bsdconfig/includes/Makefile.inc new file mode 100644 index 000000000000..156c588eb3de --- /dev/null +++ b/usr.sbin/bsdconfig/includes/Makefile.inc @@ -0,0 +1 @@ +PACKAGE= bsdconfig diff --git a/usr.sbin/bsdconfig/mouse/Makefile.inc b/usr.sbin/bsdconfig/mouse/Makefile.inc new file mode 100644 index 000000000000..156c588eb3de --- /dev/null +++ b/usr.sbin/bsdconfig/mouse/Makefile.inc @@ -0,0 +1 @@ +PACKAGE= bsdconfig diff --git a/usr.sbin/bsdconfig/networking/Makefile.inc b/usr.sbin/bsdconfig/networking/Makefile.inc new file mode 100644 index 000000000000..01b5f23410c8 --- /dev/null +++ b/usr.sbin/bsdconfig/networking/Makefile.inc @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/usr.sbin/bsdconfig/packages/Makefile.inc b/usr.sbin/bsdconfig/packages/Makefile.inc new file mode 100644 index 000000000000..01b5f23410c8 --- /dev/null +++ b/usr.sbin/bsdconfig/packages/Makefile.inc @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/usr.sbin/bsdconfig/password/Makefile.inc b/usr.sbin/bsdconfig/password/Makefile.inc new file mode 100644 index 000000000000..01b5f23410c8 --- /dev/null +++ b/usr.sbin/bsdconfig/password/Makefile.inc @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/usr.sbin/bsdconfig/security/Makefile.inc b/usr.sbin/bsdconfig/security/Makefile.inc new file mode 100644 index 000000000000..156c588eb3de --- /dev/null +++ b/usr.sbin/bsdconfig/security/Makefile.inc @@ -0,0 +1 @@ +PACKAGE= bsdconfig diff --git a/usr.sbin/bsdconfig/share/Makefile.inc b/usr.sbin/bsdconfig/share/Makefile.inc new file mode 100644 index 000000000000..01b5f23410c8 --- /dev/null +++ b/usr.sbin/bsdconfig/share/Makefile.inc @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/usr.sbin/bsdconfig/startup/Makefile.inc b/usr.sbin/bsdconfig/startup/Makefile.inc new file mode 100644 index 000000000000..01b5f23410c8 --- /dev/null +++ b/usr.sbin/bsdconfig/startup/Makefile.inc @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/usr.sbin/bsdconfig/timezone/Makefile.inc b/usr.sbin/bsdconfig/timezone/Makefile.inc new file mode 100644 index 000000000000..01b5f23410c8 --- /dev/null +++ b/usr.sbin/bsdconfig/timezone/Makefile.inc @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/usr.sbin/bsdconfig/ttys/Makefile.inc b/usr.sbin/bsdconfig/ttys/Makefile.inc new file mode 100644 index 000000000000..156c588eb3de --- /dev/null +++ b/usr.sbin/bsdconfig/ttys/Makefile.inc @@ -0,0 +1 @@ +PACKAGE= bsdconfig diff --git a/usr.sbin/bsdconfig/usermgmt/Makefile.inc b/usr.sbin/bsdconfig/usermgmt/Makefile.inc new file mode 100644 index 000000000000..01b5f23410c8 --- /dev/null +++ b/usr.sbin/bsdconfig/usermgmt/Makefile.inc @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/usr.sbin/chroot/chroot.c b/usr.sbin/chroot/chroot.c index c978fc019c95..8a99a9bbf7cb 100644 --- a/usr.sbin/chroot/chroot.c +++ b/usr.sbin/chroot/chroot.c @@ -47,17 +47,58 @@ static void usage(void) __dead2; +static gid_t +resolve_group(const char *group) +{ + char *endp; + struct group *gp; + unsigned long gid; + + gp = getgrnam(group); + if (gp != NULL) + return (gp->gr_gid); + + /* + * Numeric IDs don't need a trip through the database to check them, + * POSIX seems to think we should generally accept a numeric ID as long + * as it's within the valid range. + */ + errno = 0; + gid = strtoul(group, &endp, 0); + if (errno == 0 && *endp == '\0' && (gid_t)gid >= 0 && gid <= GID_MAX) + return (gid); + + errx(1, "no such group '%s'", group); +} + +static uid_t +resolve_user(const char *user) +{ + char *endp; + struct passwd *pw; + unsigned long uid; + + pw = getpwnam(user); + if (pw != NULL) + return (pw->pw_uid); + + errno = 0; + uid = strtoul(user, &endp, 0); + if (errno == 0 && *endp == '\0' && (uid_t)uid >= 0 && uid <= UID_MAX) + return (uid); + + errx(1, "no such user '%s'", user); +} + int main(int argc, char *argv[]) { - struct group *gp; - struct passwd *pw; - char *endp, *p, *user, *group, *grouplist; - const char *shell; + const char *group, *p, *shell, *user; + char *grouplist; + long ngroups_max; gid_t gid, *gidlist; uid_t uid; int arg, ch, error, gids; - long ngroups_max; bool nonprivileged; gid = 0; @@ -95,19 +136,8 @@ main(int argc, char *argv[]) if (argc < 1) usage(); - if (group != NULL) { - if (isdigit((unsigned char)*group)) { - gid = (gid_t)strtoul(group, &endp, 0); - if (*endp != '\0') - goto getgroup; - } else { - getgroup: - if ((gp = getgrnam(group)) != NULL) - gid = gp->gr_gid; - else - errx(1, "no such group `%s'", group); - } - } + if (group != NULL) + gid = resolve_group(group); ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; if ((gidlist = malloc(sizeof(gid_t) * ngroups_max)) == NULL) @@ -122,35 +152,13 @@ main(int argc, char *argv[]) if (*p == '\0') continue; - if (isdigit((unsigned char)*p)) { - gidlist[gids] = (gid_t)strtoul(p, &endp, 0); - if (*endp != '\0') - goto getglist; - } else { - getglist: - if ((gp = getgrnam(p)) != NULL) - gidlist[gids] = gp->gr_gid; - else - errx(1, "no such group `%s'", p); - } - gids++; + gidlist[gids++] = resolve_group(p); } if (p != NULL && gids == ngroups_max) errx(1, "too many supplementary groups provided"); - if (user != NULL) { - if (isdigit((unsigned char)*user)) { - uid = (uid_t)strtoul(user, &endp, 0); - if (*endp != '\0') - goto getuser; - } else { - getuser: - if ((pw = getpwnam(user)) != NULL) - uid = pw->pw_uid; - else - errx(1, "no such user `%s'", user); - } - } + if (user != NULL) + uid = resolve_user(user); if (nonprivileged) { arg = PROC_NO_NEW_PRIVS_ENABLE; diff --git a/usr.sbin/ctld/Makefile b/usr.sbin/ctld/Makefile index 314554a99b56..61efe8a05cfb 100644 --- a/usr.sbin/ctld/Makefile +++ b/usr.sbin/ctld/Makefile @@ -5,27 +5,28 @@ CFLAGS+=-I${SRCTOP}/contrib/libucl/include PACKAGE= ctl PROG_CXX= ctld -SRCS= ctld.cc conf.cc discovery.cc isns.cc kernel.cc -SRCS+= login.cc parse.y token.l y.tab.h uclparse.cc +SRCS= ctld.cc conf.cc discovery.cc iscsi.cc isns.cc kernel.cc +SRCS+= login.cc nvmf.cc nvmf_discovery.cc +SRCS+= parse.y token.l y.tab.h uclparse.cc CFLAGS+= -I${.CURDIR} CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/sys/cam/ctl CFLAGS+= -I${SRCTOP}/sys/dev/iscsi CFLAGS+= -I${SRCTOP}/lib/libiscsiutil +CFLAGS+= -I${SRCTOP}/lib/libutil++ +CFLAGS+= -I${SRCTOP}/lib/libnvmf #CFLAGS+= -DICL_KERNEL_PROXY NO_WCAST_ALIGN= CXXWARNFLAGS.gcc= -Wno-shadow MAN= ctld.8 ctl.conf.5 -LIBADD= bsdxml iscsiutil md sbuf util ucl m nv +LIBADD= bsdxml iscsiutil nvmf md sbuf util ucl m nv util++ YFLAGS+= -v CLEANFILES= y.tab.c y.tab.h y.output NO_WMISSING_VARIABLE_DECLARATIONS= -.if ${MK_ISCSI} != "no" -CFLAGS+= -DWANT_ISCSI -.endif - .include <bsd.prog.mk> + +CXXWARNFLAGS.uclparse.cc= -Wno-shadow -Wno-cast-qual diff --git a/usr.sbin/ctld/conf.cc b/usr.sbin/ctld/conf.cc index f3285ebf9d56..ab76f8e2ed0b 100644 --- a/usr.sbin/ctld/conf.cc +++ b/usr.sbin/ctld/conf.cc @@ -39,8 +39,10 @@ #include <string.h> #include <cam/scsi/scsi_all.h> +#include <libutil++.hh> + #include "conf.h" -#include "ctld.h" +#include "ctld.hh" static struct conf *conf = NULL; static struct auth_group *auth_group = NULL; @@ -68,130 +70,96 @@ conf_finish(void) bool isns_add_server(const char *addr) { - return (isns_new(conf, addr)); + return (conf->add_isns(addr)); } void conf_set_debug(int debug) { - conf->conf_debug = debug; + conf->set_debug(debug); } void conf_set_isns_period(int period) { - conf->conf_isns_period = period; + conf->set_isns_period(period); } void conf_set_isns_timeout(int timeout) { - conf->conf_isns_timeout = timeout; + conf->set_isns_timeout(timeout); } void conf_set_maxproc(int maxproc) { - conf->conf_maxproc = maxproc; + conf->set_maxproc(maxproc); } bool conf_set_pidfile_path(const char *path) { - if (conf->conf_pidfile_path != NULL) { - log_warnx("pidfile specified more than once"); - return (false); - } - conf->conf_pidfile_path = checked_strdup(path); - return (true); + return (conf->set_pidfile_path(path)); } void conf_set_timeout(int timeout) { - conf->conf_timeout = timeout; + conf->set_timeout(timeout); } -static bool -_auth_group_set_type(struct auth_group *ag, const char *str) +bool +auth_group_add_chap(const char *user, const char *secret) { - int type; - - if (strcmp(str, "none") == 0) { - type = AG_TYPE_NO_AUTHENTICATION; - } else if (strcmp(str, "deny") == 0) { - type = AG_TYPE_DENY; - } else if (strcmp(str, "chap") == 0) { - type = AG_TYPE_CHAP; - } else if (strcmp(str, "chap-mutual") == 0) { - type = AG_TYPE_CHAP_MUTUAL; - } else { - log_warnx("invalid auth-type \"%s\" for %s", str, ag->ag_label); - return (false); - } - - if (ag->ag_type != AG_TYPE_UNKNOWN && ag->ag_type != type) { - log_warnx("cannot set auth-type to \"%s\" for %s; " - "already has a different type", str, ag->ag_label); - return (false); - } - - ag->ag_type = type; + return (auth_group->add_chap(user, secret)); +} - return (true); +bool +auth_group_add_chap_mutual(const char *user, const char *secret, + const char *user2, const char *secret2) +{ + return (auth_group->add_chap_mutual(user, secret, user2, secret2)); } bool -auth_group_add_chap(const char *user, const char *secret) +auth_group_add_host_address(const char *portal) { - return (auth_new_chap(auth_group, user, secret)); + return (auth_group->add_host_address(portal)); } bool -auth_group_add_chap_mutual(const char *user, const char *secret, - const char *user2, const char *secret2) +auth_group_add_host_nqn(const char *name) { - return (auth_new_chap_mutual(auth_group, user, secret, user2, secret2)); + return (auth_group->add_host_nqn(name)); } bool auth_group_add_initiator_name(const char *name) { - return (auth_name_new(auth_group, name)); + return (auth_group->add_initiator_name(name)); } bool auth_group_add_initiator_portal(const char *portal) { - return (auth_portal_new(auth_group, portal)); + return (auth_group->add_initiator_portal(portal)); } bool auth_group_set_type(const char *type) { - return (_auth_group_set_type(auth_group, type)); + return (auth_group->set_type(type)); } bool auth_group_start(const char *name) { - /* - * Make it possible to redefine the default auth-group. but - * only once. - */ - if (strcmp(name, "default") == 0) { - if (conf->conf_default_ag_defined) { - log_warnx("duplicated auth-group \"default\""); - return (false); - } - - conf->conf_default_ag_defined = true; - auth_group = auth_group_find(conf, "default"); - return (true); - } - - auth_group = auth_group_new(conf, name); - return (auth_group != NULL); + if (strcmp(name, "default") == 0) + auth_group = conf->define_default_auth_group(); + else + auth_group = conf->add_auth_group(name); + return (auth_group != nullptr); } void @@ -203,22 +171,10 @@ auth_group_finish(void) bool portal_group_start(const char *name) { - /* - * Make it possible to redefine the default portal-group. but - * only once. - */ - if (strcmp(name, "default") == 0) { - if (conf->conf_default_pg_defined) { - log_warnx("duplicated portal-group \"default\""); - return (false); - } - - conf->conf_default_pg_defined = true; - portal_group = portal_group_find(conf, "default"); - return (true); - } - - portal_group = portal_group_new(conf, name); + if (strcmp(name, "default") == 0) + portal_group = conf->define_default_portal_group(); + else + portal_group = conf->add_portal_group(name); return (portal_group != NULL); } @@ -231,141 +187,91 @@ portal_group_finish(void) bool portal_group_add_listen(const char *listen, bool iser) { - return (portal_group_add_portal(portal_group, listen, iser)); + return (portal_group->add_portal(listen, iser ? portal_protocol::ISER : + portal_protocol::ISCSI)); } bool portal_group_add_option(const char *name, const char *value) { - return (option_new(portal_group->pg_options, name, value)); + return (portal_group->add_option(name, value)); } bool portal_group_set_discovery_auth_group(const char *name) { - if (portal_group->pg_discovery_auth_group != NULL) { - log_warnx("discovery-auth-group for portal-group " - "\"%s\" specified more than once", - portal_group->pg_name); - return (false); - } - portal_group->pg_discovery_auth_group = auth_group_find(conf, name); - if (portal_group->pg_discovery_auth_group == NULL) { - log_warnx("unknown discovery-auth-group \"%s\" " - "for portal-group \"%s\"", name, portal_group->pg_name); - return (false); - } - return (true); + return (portal_group->set_discovery_auth_group(name)); } bool portal_group_set_dscp(u_int dscp) { - if (dscp >= 0x40) { - log_warnx("invalid DSCP value %u for portal-group \"%s\"", - dscp, portal_group->pg_name); - return (false); - } - - portal_group->pg_dscp = dscp; - return (true); + return (portal_group->set_dscp(dscp)); } bool portal_group_set_filter(const char *str) { - int filter; - - if (strcmp(str, "none") == 0) { - filter = PG_FILTER_NONE; - } else if (strcmp(str, "portal") == 0) { - filter = PG_FILTER_PORTAL; - } else if (strcmp(str, "portal-name") == 0) { - filter = PG_FILTER_PORTAL_NAME; - } else if (strcmp(str, "portal-name-auth") == 0) { - filter = PG_FILTER_PORTAL_NAME_AUTH; - } else { - log_warnx("invalid discovery-filter \"%s\" for portal-group " - "\"%s\"; valid values are \"none\", \"portal\", " - "\"portal-name\", and \"portal-name-auth\"", - str, portal_group->pg_name); - return (false); - } - - if (portal_group->pg_discovery_filter != PG_FILTER_UNKNOWN && - portal_group->pg_discovery_filter != filter) { - log_warnx("cannot set discovery-filter to \"%s\" for " - "portal-group \"%s\"; already has a different " - "value", str, portal_group->pg_name); - return (false); - } - - portal_group->pg_discovery_filter = filter; - - return (true); + return (portal_group->set_filter(str)); } void portal_group_set_foreign(void) { - portal_group->pg_foreign = true; + portal_group->set_foreign(); } bool portal_group_set_offload(const char *offload) { - - if (portal_group->pg_offload != NULL) { - log_warnx("cannot set offload to \"%s\" for " - "portal-group \"%s\"; already defined", - offload, portal_group->pg_name); - return (false); - } - - portal_group->pg_offload = checked_strdup(offload); - - return (true); + return (portal_group->set_offload(offload)); } bool portal_group_set_pcp(u_int pcp) { - if (pcp > 7) { - log_warnx("invalid PCP value %u for portal-group \"%s\"", - pcp, portal_group->pg_name); - return (false); - } - - portal_group->pg_pcp = pcp; - return (true); + return (portal_group->set_pcp(pcp)); } bool portal_group_set_redirection(const char *addr) { + return (portal_group->set_redirection(addr)); +} - if (portal_group->pg_redirection != NULL) { - log_warnx("cannot set redirection to \"%s\" for " - "portal-group \"%s\"; already defined", - addr, portal_group->pg_name); - return (false); - } +void +portal_group_set_tag(uint16_t tag) +{ + portal_group->set_tag(tag); +} - portal_group->pg_redirection = checked_strdup(addr); +bool +transport_group_start(const char *name) +{ + if (strcmp(name, "default") == 0) + portal_group = conf->define_default_transport_group(); + else + portal_group = conf->add_transport_group(name); + return (portal_group != NULL); +} - return (true); +bool +transport_group_add_listen_discovery_tcp(const char *listen) +{ + return portal_group->add_portal(listen, + portal_protocol::NVME_DISCOVERY_TCP); } -void -portal_group_set_tag(uint16_t tag) +bool +transport_group_add_listen_tcp(const char *listen) { - portal_group->pg_tag = tag; + return portal_group->add_portal(listen, portal_protocol::NVME_TCP); } bool lun_start(const char *name) { - lun = lun_new(conf, name); + lun = conf->add_lun(name); return (lun != NULL); } @@ -378,132 +284,61 @@ lun_finish(void) bool lun_add_option(const char *name, const char *value) { - return (option_new(lun->l_options, name, value)); + return (lun->add_option(name, value)); } bool lun_set_backend(const char *value) { - if (lun->l_backend != NULL) { - log_warnx("backend for lun \"%s\" specified more than once", - lun->l_name); - return (false); - } - - lun->l_backend = checked_strdup(value); - return (true); + return (lun->set_backend(value)); } bool lun_set_blocksize(size_t value) { - if (lun->l_blocksize != 0) { - log_warnx("blocksize for lun \"%s\" specified more than once", - lun->l_name); - return (false); - } - lun->l_blocksize = value; - return (true); + return (lun->set_blocksize(value)); } bool lun_set_device_type(const char *value) { - const char *errstr; - int device_type; - - if (strcasecmp(value, "disk") == 0 || - strcasecmp(value, "direct") == 0) - device_type = T_DIRECT; - else if (strcasecmp(value, "processor") == 0) - device_type = T_PROCESSOR; - else if (strcasecmp(value, "cd") == 0 || - strcasecmp(value, "cdrom") == 0 || - strcasecmp(value, "dvd") == 0 || - strcasecmp(value, "dvdrom") == 0) - device_type = T_CDROM; - else { - device_type = strtonum(value, 0, 15, &errstr); - if (errstr != NULL) { - log_warnx("invalid device-type \"%s\" for lun \"%s\"", value, - lun->l_name); - } - return (false); - } - - lun->l_device_type = device_type; - return (true); + return (lun->set_device_type(value)); } bool lun_set_device_id(const char *value) { - if (lun->l_device_id != NULL) { - log_warnx("device_id for lun \"%s\" specified more than once", - lun->l_name); - return (false); - } - - lun->l_device_id = checked_strdup(value); - return (true); + return (lun->set_device_id(value)); } bool lun_set_path(const char *value) { - if (lun->l_path != NULL) { - log_warnx("path for lun \"%s\" specified more than once", - lun->l_name); - return (false); - } - - lun->l_path = checked_strdup(value); - return (true); + return (lun->set_path(value)); } bool lun_set_serial(const char *value) { - if (lun->l_serial != NULL) { - log_warnx("serial for lun \"%s\" specified more than once", - lun->l_name); - return (false); - } - - lun->l_serial = checked_strdup(value); - return (true); + return (lun->set_serial(value)); } bool lun_set_size(uint64_t value) { - if (lun->l_size != 0) { - log_warnx("size for lun \"%s\" specified more than once", - lun->l_name); - return (false); - } - - lun->l_size = value; - return (true); + return (lun->set_size(value)); } bool lun_set_ctl_lun(uint32_t value) { - - if (lun->l_ctl_lun >= 0) { - log_warnx("ctl_lun for lun \"%s\" specified more than once", - lun->l_name); - return (false); - } - lun->l_ctl_lun = value; - return (true); + return (lun->set_ctl_lun(value)); } bool target_start(const char *name) { - target = target_new(conf, name); + target = conf->add_target(name); return (target != NULL); } @@ -516,244 +351,128 @@ target_finish(void) bool target_add_chap(const char *user, const char *secret) { - if (target->t_auth_group != NULL) { - if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot use both auth-group and " - "chap for target \"%s\"", target->t_name); - return (false); - } - } else { - target->t_auth_group = auth_group_new(conf, target); - if (target->t_auth_group == NULL) - return (false); - } - return (auth_new_chap(target->t_auth_group, user, secret)); + return (target->add_chap(user, secret)); } bool target_add_chap_mutual(const char *user, const char *secret, const char *user2, const char *secret2) { - if (target->t_auth_group != NULL) { - if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot use both auth-group and " - "chap-mutual for target \"%s\"", target->t_name); - return (false); - } - } else { - target->t_auth_group = auth_group_new(conf, target); - if (target->t_auth_group == NULL) - return (false); - } - return (auth_new_chap_mutual(target->t_auth_group, user, secret, user2, - secret2)); + return (target->add_chap_mutual(user, secret, user2, secret2)); } bool target_add_initiator_name(const char *name) { - if (target->t_auth_group != NULL) { - if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot use both auth-group and " - "initiator-name for target \"%s\"", target->t_name); - return (false); - } - } else { - target->t_auth_group = auth_group_new(conf, target); - if (target->t_auth_group == NULL) - return (false); - } - return (auth_name_new(target->t_auth_group, name)); + return (target->add_initiator_name(name)); } bool target_add_initiator_portal(const char *addr) { - if (target->t_auth_group != NULL) { - if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot use both auth-group and " - "initiator-portal for target \"%s\"", - target->t_name); - return (false); - } - } else { - target->t_auth_group = auth_group_new(conf, target); - if (target->t_auth_group == NULL) - return (false); - } - return (auth_portal_new(target->t_auth_group, addr)); + return (target->add_initiator_portal(addr)); } bool target_add_lun(u_int id, const char *name) { - struct lun *t_lun; - - if (id >= MAX_LUNS) { - log_warnx("LUN %u too big for target \"%s\"", id, - target->t_name); - return (false); - } - - if (target->t_luns[id] != NULL) { - log_warnx("duplicate LUN %u for target \"%s\"", id, - target->t_name); - return (false); - } - - t_lun = lun_find(conf, name); - if (t_lun == NULL) { - log_warnx("unknown LUN named %s used for target \"%s\"", - name, target->t_name); - return (false); - } - - target->t_luns[id] = t_lun; - return (true); + return (target->add_lun(id, name)); } bool target_add_portal_group(const char *pg_name, const char *ag_name) { - struct portal_group *pg; - struct auth_group *ag; - struct port *p; - - pg = portal_group_find(conf, pg_name); - if (pg == NULL) { - log_warnx("unknown portal-group \"%s\" for target \"%s\"", - pg_name, target->t_name); - return (false); - } - - if (ag_name != NULL) { - ag = auth_group_find(conf, ag_name); - if (ag == NULL) { - log_warnx("unknown auth-group \"%s\" for target \"%s\"", - ag_name, target->t_name); - return (false); - } - } else - ag = NULL; - - p = port_new(conf, target, pg); - if (p == NULL) { - log_warnx("can't link portal-group \"%s\" to target \"%s\"", - pg_name, target->t_name); - return (false); - } - p->p_auth_group = ag; - return (true); + return (target->add_portal_group(pg_name, ag_name)); } bool target_set_alias(const char *alias) { - if (target->t_alias != NULL) { - log_warnx("alias for target \"%s\" specified more than once", - target->t_name); - return (false); - } - target->t_alias = checked_strdup(alias); - return (true); + return (target->set_alias(alias)); } bool target_set_auth_group(const char *name) { - if (target->t_auth_group != NULL) { - if (target->t_auth_group->ag_name != NULL) - log_warnx("auth-group for target \"%s\" " - "specified more than once", target->t_name); - else - log_warnx("cannot use both auth-group and explicit " - "authorisations for target \"%s\"", target->t_name); - return (false); - } - target->t_auth_group = auth_group_find(conf, name); - if (target->t_auth_group == NULL) { - log_warnx("unknown auth-group \"%s\" for target \"%s\"", name, - target->t_name); - return (false); - } - return (true); + return (target->set_auth_group(name)); } bool target_set_auth_type(const char *type) { - if (target->t_auth_group != NULL) { - if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot use both auth-group and " - "auth-type for target \"%s\"", target->t_name); - return (false); - } - } else { - target->t_auth_group = auth_group_new(conf, target); - if (target->t_auth_group == NULL) - return (false); - } - return (_auth_group_set_type(target->t_auth_group, type)); + return (target->set_auth_type(type)); } bool target_set_physical_port(const char *pport) { - if (target->t_pport != NULL) { - log_warnx("cannot set multiple physical ports for target " - "\"%s\"", target->t_name); - return (false); - } - target->t_pport = checked_strdup(pport); - return (true); + return (target->set_physical_port(pport)); } bool target_set_redirection(const char *addr) { + return (target->set_redirection(addr)); +} - if (target->t_redirection != NULL) { - log_warnx("cannot set redirection to \"%s\" for " - "target \"%s\"; already defined", - addr, target->t_name); - return (false); - } +bool +target_start_lun(u_int id) +{ + lun = target->start_lun(id); + return (lun != nullptr); +} + +bool +controller_start(const char *name) +{ + target = conf->add_controller(name); + return (target != nullptr); +} + +bool +controller_add_host_address(const char *addr) +{ + return (target->add_host_address(addr)); +} - target->t_redirection = checked_strdup(addr); +bool +controller_add_host_nqn(const char *name) +{ + return (target->add_host_nqn(name)); +} - return (true); +bool +controller_add_namespace(u_int id, const char *name) +{ + return (target->add_namespace(id, name)); } bool -target_start_lun(u_int id) +controller_start_namespace(u_int id) { - struct lun *new_lun; - char *name; + lun = target->start_namespace(id); + return (lun != nullptr); +} - if (id >= MAX_LUNS) { - log_warnx("LUN %u too big for target \"%s\"", id, - target->t_name); +bool +parse_conf(const char *path) +{ + freebsd::FILE_up fp(fopen(path, "r")); + if (fp == nullptr) { + log_warn("unable to open configuration file %s", path); return (false); } - if (target->t_luns[id] != NULL) { - log_warnx("duplicate LUN %u for target \"%s\"", id, - target->t_name); + bool parsed; + try { + parsed = yyparse_conf(fp.get()); + } catch (std::bad_alloc) { + log_warnx("failed to allocate memory parsing %s", path); return (false); - } - - if (asprintf(&name, "%s,lun,%u", target->t_name, id) <= 0) - log_err(1, "asprintf"); - - new_lun = lun_new(conf, name); - if (new_lun == NULL) + } catch (...) { + log_warnx("unknown exception parsing %s", path); return (false); + } - lun_set_scsiname(new_lun, name); - free(name); - - target->t_luns[id] = new_lun; - - lun = new_lun; - return (true); + return (parsed); } diff --git a/usr.sbin/ctld/conf.h b/usr.sbin/ctld/conf.h index 6e287ce70436..642c8f234d30 100644 --- a/usr.sbin/ctld/conf.h +++ b/usr.sbin/ctld/conf.h @@ -43,6 +43,8 @@ void auth_group_finish(void); bool auth_group_add_chap(const char *user, const char *secret); bool auth_group_add_chap_mutual(const char *user, const char *secret, const char *user2, const char *secret2); +bool auth_group_add_host_address(const char *portal); +bool auth_group_add_host_nqn(const char *name); bool auth_group_add_initiator_name(const char *name); bool auth_group_add_initiator_portal(const char *portal); bool auth_group_set_type(const char *type); @@ -69,6 +71,10 @@ bool portal_group_set_pcp(u_int pcp); bool portal_group_set_redirection(const char *addr); void portal_group_set_tag(uint16_t tag); +bool transport_group_start(const char *name); +bool transport_group_add_listen_discovery_tcp(const char *listen); +bool transport_group_add_listen_tcp(const char *listen); + bool target_start(const char *name); void target_finish(void); bool target_add_chap(const char *user, const char *secret); @@ -85,6 +91,12 @@ bool target_set_physical_port(const char *pport); bool target_set_redirection(const char *addr); bool target_start_lun(u_int id); +bool controller_start(const char *name); +bool controller_add_host_address(const char *addr); +bool controller_add_host_nqn(const char *name); +bool controller_add_namespace(u_int id, const char *name); +bool controller_start_namespace(u_int id); + bool lun_start(const char *name); void lun_finish(void); bool lun_add_option(const char *name, const char *value); @@ -97,7 +109,7 @@ bool lun_set_path(const char *value); bool lun_set_serial(const char *value); bool lun_set_size(uint64_t value); -bool parse_conf(const char *path); +bool yyparse_conf(FILE *fp); __END_DECLS diff --git a/usr.sbin/ctld/ctl.conf.5 b/usr.sbin/ctld/ctl.conf.5 index e42dd8067006..12f4186a6844 100644 --- a/usr.sbin/ctld/ctl.conf.5 +++ b/usr.sbin/ctld/ctl.conf.5 @@ -26,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 26, 2025 +.Dd August 6, 2025 .Dt CTL.CONF 5 .Os .Sh NAME .Nm ctl.conf -.Nd CAM Target Layer / iSCSI target daemon configuration file +.Nd CAM Target Layer / iSCSI target / NVMeoF controller daemon configuration file .Sh DESCRIPTION The .Nm @@ -59,6 +59,11 @@ file is: .Dl ... } +.No transport-group Ar name No { +.Dl listen Ar transport Ar address +.Dl ... +} + .No target Ar name { .Dl auth-group Ar name .Dl portal-group Ar name @@ -67,6 +72,15 @@ file is: .Dl } .Dl ... } + +.No controller Ar name { +.Dl auth-group Ar name +.Dl transport-group Ar name +.Dl namespace Ar number No { +.Dl path Ar path +.Dl } +.Dl ... +} .Ed .Ss Global Context .Bl -tag -width indent @@ -94,16 +108,29 @@ Create a configuration context, defining a new portal-group, which can then be assigned to any number of targets. +.It Ic transport-group Ar name +Create a +.Sy transport-group +configuration context, +defining a new transport-group, +which can then be assigned to any number of NVMeoF controllers. .It Ic lun Ar name Create a .Sy lun -configuration context, defining a LUN to be exported by any number of targets. +configuration context, defining a LUN to be exported by any number of targets +or controllers. .It Ic target Ar name Create a .Sy target configuration context, which can optionally contain one or more .Sy lun contexts. +.It Ic controller Ar name +Create a +.Sy controller +configuration context, which can optionally contain one or more +.Sy namespace +contexts. .It Ic timeout Ar seconds The timeout for login sessions, after which the connection will be forcibly terminated. @@ -150,6 +177,19 @@ the configuration may only contain either or .Sy chap-mutual entries; it is an error to mix them. +.It Ic host-address Ar address Ns Op / Ns Ar prefixlen +An NVMeoF host address: an IPv4 or IPv6 address, optionally +followed by a literal slash and a prefix length. +Only NVMeoF hosts with an address matching one of the defined +addresses will be allowed to connect. +If not defined, there will be no restrictions based on host +address. +.It Ic host-nqn Ar name +An NVMeoF host name. +Only NVMeoF hosts with a name matching one of the defined +names will be allowed to connect. +If not defined, there will be no restrictions based on NVMe host +name. .It Ic initiator-name Ar initiator-name An iSCSI initiator name. Only initiators with a name matching one of the defined @@ -264,6 +304,75 @@ to .Qq Ar 7 . When omitted, the default for the outgoing interface is used. .El +.Ss transport-group Context +.Bl -tag -width indent +.It Ic discovery-auth-group Ar name +See the description for this option for +.Sy portal-group +contexts. +.It Ic discovery-filter Ar filter +Filter can be either +.Qq Ar none , +.Qq Ar address , +or +.Qq Ar address-name . +When set to +.Qq Ar none , +discovery will return all controllers assigned to that transport group. +When set to +.Qq Ar address , +discovery will not return controllers that cannot be accessed by the +host because of their +.Sy host-address . +When set to +.Qq Ar address-name , +the check will include both +.Sy host-address +and +.Sy host-nqn . +The default is +.Qq Ar none . +.It Ic listen Ar transport Ar address +An IPv4 or IPv6 address and port to listen on for incoming connections +using the specified NVMeoF transport. +Supported transports are +.Qq Ar tcp +.Pq for NVMe/TCP I/O controllers +and +.Qq Ar discovery-tcp +.Pq for NVMe/TCP discovery controllers . +.It Ic option Ar name Ar value +One of the following options: +.Bl -column "max_admin_qsize" "Default" "Transports" +.It Sy Name Ta Sy Default Ta Sy Transports Ta Sy Description +.It MAXH2CDATA Ta 256KiB Ta TCP Ta +Size in bytes of the maximum data payload size for data PDUs accepted from +remote hosts. +The value must be at least 4KiB and must be a multiple of 4. +.It SQFC Ta false Ta any Ta +Always enable SQ flow control. +.It HDGST Ta false Ta TCP Ta +Enable PDU header digests if requested by a remote host. +.It DDGST Ta false Ta TCP Ta +Enable PDU data digests if requested by a remote host. +.It max_admin_qsize Ta 4096 Ta any Ta +The maximum number of entries a remote host can request for an admin queue pair. +.It max_io_qsize Ta 65536 Ta any Ta +The maximum number of entries a remote host can request for an I/O queue pair. +.El +.It Ic tag Ar value +Unique 16-bit port ID for this +.Sy transport-group . +If not specified, the value is generated automatically. +.It Ic dscp Ar value +See the description for this option for +.Sy portal-group +contexts. +.It Ic pcp Ar value +See the description for this option for +.Sy portal-group +contexts. +.El .Ss target Context .Bl -tag -width indent .It Ic alias Ar text @@ -390,6 +499,101 @@ configuration context, defining a LUN exported by the parent target. This is an alternative to defining the LUN separately, useful in the common case of a LUN being exported by a single target. .El +.Ss controller Context +.Bl -tag -width indent +.It Ic auth-group Ar name +Assign a previously defined authentication group to the controller. +By default, controllers that do not specify their own auth settings, +using clauses such as +.Sy host-address +or +.Sy host-nqn , +are assigned to the +predefined +.Sy auth-group +.Qq Ar default , +which denies all access. +Another predefined +.Sy auth-group , +.Qq Ar no-authentication , +may be used to permit access +without authentication. +Note that this clause can be overridden using the second argument +to a +.Sy transport-group +clause. +.It Ic auth-type Ar type +Sets the authentication type. +Type can be either +.Qq Ar none +or +.Qq Ar deny . +In most cases it is not necessary to set the type using this clause; +it is usually used to disable authentication for a given +.Sy controller . +This clause is mutually exclusive with +.Sy auth-group ; +one cannot use +both in a single controller. +.It Ic host-address Ar address Ns Op / Ns Ar prefixlen +An NVMeoF host address: an IPv4 or IPv6 address, optionally +followed by a literal slash and a prefix length. +Only NVMeoF hosts with an address matching one of the defined +addresses will be allowed to connect. +If not defined, there will be no restrictions based on host +address. +This clause is mutually exclusive with +.Sy auth-group ; +one cannot use +both in a single controller. +.It Ic host-nqn Ar name +An NVMeoF host name. +Only NVMeoF hosts with a name matching one of the defined +names will be allowed to connect. +If not defined, there will be no restrictions based on NVMe host +name. +This clause is mutually exclusive with +.Sy auth-group ; +one cannot use +both in a single target. +.Pp +The +.Sy auth-type , +.Sy host-address , +and +.Sy host-nqn +clauses in the controller context provide an alternative to assigning an +.Sy auth-group +defined separately, useful in the common case of authentication settings +specific to a single controller. +.It Ic transport-group Ar name Op Ar ag-name +Assign a previously defined transport group to the controller. +The default transport group is +.Qq Ar default , +which makes the controller available +on TCP port 4420 on all configured IPv4 and IPv6 addresses. +The optional second argument specifies the +.Sy auth-group +for connections to this specific transport group group. +If the second argument is not specified, the controller +.Sy auth-group +is used. +.It Ic namespace Ar number Ar name +Export previously defined +.Sy lun +as an NVMe namespace from the parent controller. +.It Ic namespace Ar number +Create a +.Sy namespace +configuration context, defining an NVMe namespace exported by the parent target. +.Pp +This is an alternative to defining the namespace separately, +useful in the common case of a namespace being exported by a single controller. +.Sy namespace +configuration contexts accept the the same properties as +.Sy lun +contexts. +.El .Ss lun Context .Bl -tag -width indent .It Ic backend Ar block No | Ar ramdisk @@ -410,7 +614,7 @@ Global numeric identifier to use for a given LUN inside CTL. By default CTL allocates those IDs dynamically, but explicit specification may be needed for consistency in HA configurations. .It Ic device-id Ar string -The SCSI Device Identification string presented to the initiator. +The SCSI Device Identification string presented to iSCSI initiators. .It Ic device-type Ar type Specify the SCSI device type to use when creating the LUN. Currently CTL supports Direct Access (type 0), Processor (type 3) @@ -425,11 +629,11 @@ section of The path to the file, device node, or .Xr zfs 8 volume used to back the LUN. -For optimal performance, create the volume with the +For optimal performance, create ZFS volumes with the .Qq Ar volmode=dev property set. .It Ic serial Ar string -The SCSI serial number presented to the initiator. +The SCSI serial number presented to iSCSI initiators. .It Ic size Ar size The LUN size, in bytes or by number with a suffix of .Sy K , M , G , T @@ -498,6 +702,16 @@ target naa.50015178f369f092 { port isp1 lun 0 example_1 } + +controller nqn.2012-06.com.example:controller1 { + auth-group no-authentication; + namespace 1 example_1 + namespace 2 { + backend ramdisk + size 1G + option capacity 1G + } +} .Ed .Pp An equivalent configuration in UCL format, for use with @@ -585,6 +799,22 @@ target { } } } + +controller { + "nqn.2012-06.com.example:controller1" { + auth-group = no-authentication + namespace = { + 1 = example_1, + 2 { + backend = ramdisk + size = 1G + options { + capacity = 1G + } + } + } + } +} .Ed .Sh SEE ALSO .Xr ctl 4 , diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc index ff23db6c5293..10c12f25068e 100644 --- a/usr.sbin/ctld/ctld.cc +++ b/usr.sbin/ctld/ctld.cc @@ -41,6 +41,7 @@ #include <assert.h> #include <ctype.h> #include <errno.h> +#include <libnvmf.h> #include <netdb.h> #include <signal.h> #include <stdbool.h> @@ -51,16 +52,12 @@ #include <unistd.h> #include <cam/scsi/scsi_all.h> -#include "conf.h" -#include "ctld.h" -#include "isns.h" +#include <algorithm> +#include <libutil++.hh> -static bool timed_out(void); -#ifdef ICL_KERNEL_PROXY -static void pdu_receive_proxy(struct pdu *pdu); -static void pdu_send_proxy(struct pdu *pdu); -#endif /* ICL_KERNEL_PROXY */ -static void pdu_fail(const struct connection *conn, const char *reason); +#include "conf.h" +#include "ctld.hh" +#include "isns.hh" bool proxy_mode = false; @@ -70,19 +67,8 @@ static volatile bool sigalrm_received = false; static int kqfd; static int nchildren = 0; -static uint16_t last_portal_group_tag = 0xff; -static struct connection_ops conn_ops = { - .timed_out = timed_out, -#ifdef ICL_KERNEL_PROXY - .pdu_receive_proxy = pdu_receive_proxy, - .pdu_send_proxy = pdu_send_proxy, -#else - .pdu_receive_proxy = nullptr, - .pdu_send_proxy = nullptr, -#endif - .fail = pdu_fail, -}; +uint32_t conf::global_genctr; static void usage(void) @@ -93,559 +79,563 @@ usage(void) exit(1); } -struct conf * -conf_new(void) +conf::conf() { - struct conf *conf; + conf_genctr = global_genctr++; +} - conf = reinterpret_cast<struct conf *>(calloc(1, sizeof(*conf))); - if (conf == NULL) - log_err(1, "calloc"); - TAILQ_INIT(&conf->conf_luns); - TAILQ_INIT(&conf->conf_targets); - TAILQ_INIT(&conf->conf_auth_groups); - TAILQ_INIT(&conf->conf_ports); - TAILQ_INIT(&conf->conf_portal_groups); - TAILQ_INIT(&conf->conf_isns); - - conf->conf_isns_period = 900; - conf->conf_isns_timeout = 5; - conf->conf_debug = 0; - conf->conf_timeout = 60; - conf->conf_maxproc = 30; +void +conf::set_debug(int debug) +{ + conf_debug = debug; +} - return (conf); +void +conf::set_isns_period(int period) +{ + conf_isns_period = period; +} + +void +conf::set_isns_timeout(int timeout) +{ + conf_isns_timeout = timeout; } void -conf_delete(struct conf *conf) +conf::set_maxproc(int maxproc) { - struct lun *lun, *ltmp; - struct target *targ, *tmp; - struct auth_group *ag, *cagtmp; - struct portal_group *pg, *cpgtmp; - struct isns *is, *istmp; + conf_maxproc = maxproc; +} - assert(conf->conf_pidfh == NULL); +void +conf::set_timeout(int timeout) +{ + conf_timeout = timeout; +} - TAILQ_FOREACH_SAFE(lun, &conf->conf_luns, l_next, ltmp) - lun_delete(lun); - TAILQ_FOREACH_SAFE(targ, &conf->conf_targets, t_next, tmp) - target_delete(targ); - TAILQ_FOREACH_SAFE(ag, &conf->conf_auth_groups, ag_next, cagtmp) - auth_group_delete(ag); - TAILQ_FOREACH_SAFE(pg, &conf->conf_portal_groups, pg_next, cpgtmp) - portal_group_delete(pg); - TAILQ_FOREACH_SAFE(is, &conf->conf_isns, i_next, istmp) - isns_delete(is); - assert(TAILQ_EMPTY(&conf->conf_ports)); - free(conf->conf_pidfile_path); - free(conf); +bool +conf::set_pidfile_path(std::string_view path) +{ + if (!conf_pidfile_path.empty()) { + log_warnx("pidfile specified more than once"); + return (false); + } + conf_pidfile_path = path; + return (true); } -static struct auth * -auth_new(struct auth_group *ag) +void +conf::open_pidfile() { - struct auth *auth; + const char *path; + pid_t otherpid; - auth = reinterpret_cast<struct auth *>(calloc(1, sizeof(*auth))); - if (auth == NULL) - log_err(1, "calloc"); - auth->a_auth_group = ag; - TAILQ_INSERT_TAIL(&ag->ag_auths, auth, a_next); - return (auth); + assert(!conf_pidfile_path.empty()); + path = conf_pidfile_path.c_str(); + log_debugx("opening pidfile %s", path); + conf_pidfile = pidfile_open(path, 0600, &otherpid); + if (!conf_pidfile) { + if (errno == EEXIST) + log_errx(1, "daemon already running, pid: %jd.", + (intmax_t)otherpid); + log_err(1, "cannot open or create pidfile \"%s\"", path); + } } -static void -auth_delete(struct auth *auth) +void +conf::write_pidfile() +{ + conf_pidfile.write(); +} + +void +conf::close_pidfile() { - TAILQ_REMOVE(&auth->a_auth_group->ag_auths, auth, a_next); + conf_pidfile.close(); +} - free(auth->a_user); - free(auth->a_secret); - free(auth->a_mutual_user); - free(auth->a_mutual_secret); - free(auth); +#ifdef ICL_KERNEL_PROXY +int +conf::add_proxy_portal(portal *portal) +{ + conf_proxy_portals.push_back(portal); + return (conf_proxy_portals.size() - 1); } -const struct auth * -auth_find(const struct auth_group *ag, const char *user) +portal * +conf::proxy_portal(int id) { - const struct auth *auth; + if (id >= conf_proxy_portals.size()) + return (nullptr); + return (conf_proxy_portals[id]); +} +#endif - TAILQ_FOREACH(auth, &ag->ag_auths, a_next) { - if (strcmp(auth->a_user, user) == 0) - return (auth); +bool +auth_group::set_type(const char *str) +{ + auth_type type; + + if (strcmp(str, "none") == 0) { + type = auth_type::NO_AUTHENTICATION; + } else if (strcmp(str, "deny") == 0) { + type = auth_type::DENY; + } else if (strcmp(str, "chap") == 0) { + type = auth_type::CHAP; + } else if (strcmp(str, "chap-mutual") == 0) { + type = auth_type::CHAP_MUTUAL; + } else { + log_warnx("invalid auth-type \"%s\" for %s", str, label()); + return (false); } - return (NULL); + if (ag_type != auth_type::UNKNOWN && ag_type != type) { + log_warnx("cannot set auth-type to \"%s\" for %s; " + "already has a different type", str, label()); + return (false); + } + + ag_type = type; + + return (true); } -static void -auth_check_secret_length(const struct auth_group *ag, const char *user, - const char *secret, const char *secret_type) +void +auth_group::set_type(auth_type type) +{ + assert(ag_type == auth_type::UNKNOWN); + + ag_type = type; +} + +const struct auth * +auth_group::find_auth(std::string_view user) const +{ + auto it = ag_auths.find(std::string(user)); + if (it == ag_auths.end()) + return (nullptr); + + return (&it->second); +} + +void +auth_group::check_secret_length(const char *user, const char *secret, + const char *secret_type) { size_t len; len = strlen(secret); + assert(len != 0); if (len > 16) { log_warnx("%s for user \"%s\", %s, is too long; it should be " - "at most 16 characters long", secret_type, user, - ag->ag_label); + "at most 16 characters long", secret_type, user, label()); } if (len < 12) { log_warnx("%s for user \"%s\", %s, is too short; it should be " - "at least 12 characters long", secret_type, user, - ag->ag_label); + "at least 12 characters long", secret_type, user, label()); } } bool -auth_new_chap(struct auth_group *ag, const char *user, - const char *secret) +auth_group::add_chap(const char *user, const char *secret) { - struct auth *auth; - - if (ag->ag_type == AG_TYPE_UNKNOWN) - ag->ag_type = AG_TYPE_CHAP; - if (ag->ag_type != AG_TYPE_CHAP) { + if (ag_type == auth_type::UNKNOWN) + ag_type = auth_type::CHAP; + if (ag_type != auth_type::CHAP) { log_warnx("cannot mix \"chap\" authentication with " - "other types for %s", ag->ag_label); + "other types for %s", label()); return (false); } - auth_check_secret_length(ag, user, secret, "secret"); + check_secret_length(user, secret, "secret"); - auth = auth_new(ag); - auth->a_user = checked_strdup(user); - auth->a_secret = checked_strdup(secret); + const auto &pair = ag_auths.try_emplace(user, secret); + if (!pair.second) { + log_warnx("duplicate credentials for user \"%s\" for %s", + user, label()); + return (false); + } return (true); } bool -auth_new_chap_mutual(struct auth_group *ag, const char *user, - const char *secret, const char *user2, const char *secret2) +auth_group::add_chap_mutual(const char *user, const char *secret, + const char *user2, const char *secret2) { - struct auth *auth; - - if (ag->ag_type == AG_TYPE_UNKNOWN) - ag->ag_type = AG_TYPE_CHAP_MUTUAL; - if (ag->ag_type != AG_TYPE_CHAP_MUTUAL) { + if (ag_type == auth_type::UNKNOWN) + ag_type = auth_type::CHAP_MUTUAL; + if (ag_type != auth_type::CHAP_MUTUAL) { log_warnx("cannot mix \"chap-mutual\" authentication " - "with other types for %s", ag->ag_label); + "with other types for %s", label()); return (false); } - auth_check_secret_length(ag, user, secret, "secret"); - auth_check_secret_length(ag, user, secret2, "mutual secret"); + check_secret_length(user, secret, "secret"); + check_secret_length(user, secret2, "mutual secret"); - auth = auth_new(ag); - auth->a_user = checked_strdup(user); - auth->a_secret = checked_strdup(secret); - auth->a_mutual_user = checked_strdup(user2); - auth->a_mutual_secret = checked_strdup(secret2); + const auto &pair = ag_auths.try_emplace(user, secret, user2, secret2); + if (!pair.second) { + log_warnx("duplicate credentials for user \"%s\" for %s", + user, label()); + return (false); + } return (true); } bool -auth_name_new(struct auth_group *ag, const char *name) +auth_group::add_host_nqn(std::string_view nqn) { - struct auth_name *an; - - an = reinterpret_cast<struct auth_name *>(calloc(1, sizeof(*an))); - if (an == NULL) - log_err(1, "calloc"); - an->an_auth_group = ag; - an->an_initiator_name = checked_strdup(name); - TAILQ_INSERT_TAIL(&ag->ag_names, an, an_next); + /* Silently ignore duplicates. */ + ag_host_names.emplace(nqn); return (true); } -static void -auth_name_delete(struct auth_name *an) +bool +auth_group::host_permitted(std::string_view nqn) const { - TAILQ_REMOVE(&an->an_auth_group->ag_names, an, an_next); + if (ag_host_names.empty()) + return (true); - free(an->an_initiator_name); - free(an); + return (ag_host_names.count(std::string(nqn)) != 0); } bool -auth_name_defined(const struct auth_group *ag) +auth_group::add_initiator_name(std::string_view name) { - if (TAILQ_EMPTY(&ag->ag_names)) - return (false); + /* Silently ignore duplicates. */ + ag_initiator_names.emplace(name); return (true); } -const struct auth_name * -auth_name_find(const struct auth_group *ag, const char *name) +bool +auth_group::initiator_permitted(std::string_view initiator_name) const { - const struct auth_name *auth_name; - - TAILQ_FOREACH(auth_name, &ag->ag_names, an_next) { - if (strcmp(auth_name->an_initiator_name, name) == 0) - return (auth_name); - } + if (ag_initiator_names.empty()) + return (true); - return (NULL); + return (ag_initiator_names.count(std::string(initiator_name)) != 0); } bool -auth_name_check(const struct auth_group *ag, const char *initiator_name) +auth_portal::parse(const char *portal) { - if (!auth_name_defined(ag)) - return (true); + std::string net(portal); + std::string mask; - if (auth_name_find(ag, initiator_name) == NULL) - return (false); + /* Split into 'net' (address) and 'mask'. */ + size_t pos = net.find('/'); + if (pos != net.npos) { + mask = net.substr(pos + 1); + if (mask.empty()) + return false; + net.resize(pos); + } + if (net.empty()) + return false; - return (true); -} + /* + * If 'net' starts with a '[', ensure it ends with a ']' and + * force interpreting the address as IPv6. + */ + bool brackets = net[0] == '['; + if (brackets) { + net.erase(0, 1); -bool -auth_portal_new(struct auth_group *ag, const char *portal) -{ - struct auth_portal *ap; - char *net, *mask, *str, *tmp; - int len, dm, m; - - ap = reinterpret_cast<struct auth_portal *>(calloc(1, sizeof(*ap))); - if (ap == NULL) - log_err(1, "calloc"); - ap->ap_auth_group = ag; - ap->ap_initiator_portal = checked_strdup(portal); - mask = str = checked_strdup(portal); - net = strsep(&mask, "/"); - if (net[0] == '[') { - net++; - len = strlen(net); + size_t len = net.length(); if (len < 2) - goto error; + return false; if (net[len - 1] != ']') - goto error; - net[len - 1] = 0; - } else if (net[0] == '\0') - goto error; - if (str[0] == '[' || strchr(net, ':') != NULL) { + return false; + net.resize(len - 1); + } + + /* Parse address from 'net' and set default mask. */ + if (brackets || net.find(':') != net.npos) { struct sockaddr_in6 *sin6 = - (struct sockaddr_in6 *)&ap->ap_sa; + (struct sockaddr_in6 *)&ap_sa; sin6->sin6_len = sizeof(*sin6); sin6->sin6_family = AF_INET6; - if (inet_pton(AF_INET6, net, &sin6->sin6_addr) <= 0) - goto error; - dm = 128; + if (inet_pton(AF_INET6, net.c_str(), &sin6->sin6_addr) <= 0) + return false; + ap_mask = sizeof(sin6->sin6_addr) * 8; } else { struct sockaddr_in *sin = - (struct sockaddr_in *)&ap->ap_sa; + (struct sockaddr_in *)&ap_sa; sin->sin_len = sizeof(*sin); sin->sin_family = AF_INET; - if (inet_pton(AF_INET, net, &sin->sin_addr) <= 0) - goto error; - dm = 32; - } - if (mask != NULL) { - if (mask[0] == '\0') - goto error; - m = strtol(mask, &tmp, 0); - if (m < 0 || m > dm || tmp[0] != 0) - goto error; - } else - m = dm; - ap->ap_mask = m; - free(str); - TAILQ_INSERT_TAIL(&ag->ag_portals, ap, ap_next); - return (true); + if (inet_pton(AF_INET, net.c_str(), &sin->sin_addr) <= 0) + return false; + ap_mask = sizeof(sin->sin_addr) * 8; + } -error: - free(str); - free(ap); - log_warnx("incorrect initiator portal \"%s\"", portal); - return (false); + /* Parse explicit mask if present. */ + if (!mask.empty()) { + char *tmp; + long m = strtol(mask.c_str(), &tmp, 0); + if (m < 0 || m > ap_mask || tmp[0] != 0) + return false; + ap_mask = m; + } + + return true; } -static void -auth_portal_delete(struct auth_portal *ap) +bool +auth_group::add_host_address(const char *address) { - TAILQ_REMOVE(&ap->ap_auth_group->ag_portals, ap, ap_next); + auth_portal ap; + if (!ap.parse(address)) { + log_warnx("invalid controller address \"%s\" for %s", address, + label()); + return (false); + } - free(ap->ap_initiator_portal); - free(ap); + ag_host_addresses.emplace_back(ap); + return (true); } bool -auth_portal_defined(const struct auth_group *ag) +auth_group::add_initiator_portal(const char *portal) { - if (TAILQ_EMPTY(&ag->ag_portals)) + auth_portal ap; + if (!ap.parse(portal)) { + log_warnx("invalid initiator portal \"%s\" for %s", portal, + label()); return (false); + } + + ag_initiator_portals.emplace_back(ap); return (true); } -const struct auth_portal * -auth_portal_find(const struct auth_group *ag, const struct sockaddr_storage *ss) +bool +auth_portal::matches(const struct sockaddr *sa) const { - const struct auth_portal *ap; const uint8_t *a, *b; int i; - uint8_t bmask; - TAILQ_FOREACH(ap, &ag->ag_portals, ap_next) { - if (ap->ap_sa.ss_family != ss->ss_family) - continue; - if (ss->ss_family == AF_INET) { - a = (const uint8_t *) - &((const struct sockaddr_in *)ss)->sin_addr; - b = (const uint8_t *) - &((const struct sockaddr_in *)&ap->ap_sa)->sin_addr; - } else { - a = (const uint8_t *) - &((const struct sockaddr_in6 *)ss)->sin6_addr; - b = (const uint8_t *) - &((const struct sockaddr_in6 *)&ap->ap_sa)->sin6_addr; - } - for (i = 0; i < ap->ap_mask / 8; i++) { - if (a[i] != b[i]) - goto next; - } - if (ap->ap_mask % 8) { - bmask = 0xff << (8 - (ap->ap_mask % 8)); - if ((a[i] & bmask) != (b[i] & bmask)) - goto next; - } - return (ap); -next: - ; - } + if (ap_sa.ss_family != sa->sa_family) + return (false); - return (NULL); + if (sa->sa_family == AF_INET) { + a = (const uint8_t *) + &((const struct sockaddr_in *)sa)->sin_addr; + b = (const uint8_t *) + &((const struct sockaddr_in *)&ap_sa)->sin_addr; + } else { + a = (const uint8_t *) + &((const struct sockaddr_in6 *)sa)->sin6_addr; + b = (const uint8_t *) + &((const struct sockaddr_in6 *)&ap_sa)->sin6_addr; + } + for (i = 0; i < ap_mask / 8; i++) { + if (a[i] != b[i]) + return (false); + } + if ((ap_mask % 8) != 0) { + uint8_t bmask = 0xff << (8 - (ap_mask % 8)); + if ((a[i] & bmask) != (b[i] & bmask)) + return (false); + } + return (true); } bool -auth_portal_check(const struct auth_group *ag, const struct sockaddr_storage *sa) +auth_group::host_permitted(const struct sockaddr *sa) const { - - if (!auth_portal_defined(ag)) + if (ag_host_addresses.empty()) return (true); - if (auth_portal_find(ag, sa) == NULL) - return (false); - - return (true); + for (const auth_portal &ap : ag_host_addresses) + if (ap.matches(sa)) + return (true); + return (false); } -static struct auth_group * -auth_group_create(struct conf *conf, const char *name, char *label) +bool +auth_group::initiator_permitted(const struct sockaddr *sa) const { - struct auth_group *ag; - - ag = reinterpret_cast<struct auth_group *>(calloc(1, sizeof(*ag))); - if (ag == NULL) - log_err(1, "calloc"); - if (name != NULL) - ag->ag_name = checked_strdup(name); - ag->ag_label = label; - TAILQ_INIT(&ag->ag_auths); - TAILQ_INIT(&ag->ag_names); - TAILQ_INIT(&ag->ag_portals); - ag->ag_conf = conf; - TAILQ_INSERT_TAIL(&conf->conf_auth_groups, ag, ag_next); + if (ag_initiator_portals.empty()) + return (true); - return (ag); + for (const auth_portal &ap : ag_initiator_portals) + if (ap.matches(sa)) + return (true); + return (false); } struct auth_group * -auth_group_new(struct conf *conf, const char *name) +conf::add_auth_group(const char *name) { - struct auth_group *ag; - char *label; - - ag = auth_group_find(conf, name); - if (ag != NULL) { + const auto &pair = conf_auth_groups.try_emplace(name, + std::make_shared<auth_group>(freebsd::stringf("auth-group \"%s\"", + name))); + if (!pair.second) { log_warnx("duplicated auth-group \"%s\"", name); return (NULL); } - asprintf(&label, "auth-group \"%s\"", name); - return (auth_group_create(conf, name, label)); + return (pair.first->second.get()); } +/* + * Make it possible to redefine the default auth-group, but only once. + */ struct auth_group * -auth_group_new(struct conf *conf, struct target *target) +conf::define_default_auth_group() { - char *label; + if (conf_default_ag_defined) { + log_warnx("duplicated auth-group \"default\""); + return (nullptr); + } - asprintf(&label, "target \"%s\"", target->t_name); - return (auth_group_create(conf, NULL, label)); + conf_default_ag_defined = true; + return (find_auth_group("default").get()); } -void -auth_group_delete(struct auth_group *ag) +auth_group_sp +conf::find_auth_group(std::string_view name) { - struct auth *auth, *auth_tmp; - struct auth_name *auth_name, *auth_name_tmp; - struct auth_portal *auth_portal, *auth_portal_tmp; - - TAILQ_REMOVE(&ag->ag_conf->conf_auth_groups, ag, ag_next); + auto it = conf_auth_groups.find(std::string(name)); + if (it == conf_auth_groups.end()) + return {}; - TAILQ_FOREACH_SAFE(auth, &ag->ag_auths, a_next, auth_tmp) - auth_delete(auth); - TAILQ_FOREACH_SAFE(auth_name, &ag->ag_names, an_next, auth_name_tmp) - auth_name_delete(auth_name); - TAILQ_FOREACH_SAFE(auth_portal, &ag->ag_portals, ap_next, - auth_portal_tmp) - auth_portal_delete(auth_portal); - free(ag->ag_label); - free(ag->ag_name); - free(ag); + return (it->second); } -struct auth_group * -auth_group_find(const struct conf *conf, const char *name) +portal_group::portal_group(struct conf *conf, std::string_view name) : + pg_conf(conf), pg_options(nvlist_create(0)), pg_name(name) { - struct auth_group *ag; +} - assert(name != NULL); - TAILQ_FOREACH(ag, &conf->conf_auth_groups, ag_next) { - if (ag->ag_name != NULL && strcmp(ag->ag_name, name) == 0) - return (ag); +struct portal_group * +conf::add_portal_group(const char *name) +{ + auto pair = conf_portal_groups.try_emplace(name, + iscsi_make_portal_group(this, name)); + if (!pair.second) { + log_warnx("duplicated portal-group \"%s\"", name); + return (nullptr); } - return (NULL); + return (pair.first->second.get()); } -static struct portal * -portal_new(struct portal_group *pg) +/* + * Make it possible to redefine the default portal-group, but only + * once. + */ +struct portal_group * +conf::define_default_portal_group() { - struct portal *portal; + if (conf_default_pg_defined) { + log_warnx("duplicated portal-group \"default\""); + return (nullptr); + } - portal = reinterpret_cast<struct portal *>(calloc(1, sizeof(*portal))); - if (portal == NULL) - log_err(1, "calloc"); - TAILQ_INIT(&portal->p_targets); - portal->p_portal_group = pg; - TAILQ_INSERT_TAIL(&pg->pg_portals, portal, p_next); - return (portal); + conf_default_pg_defined = true; + return (find_portal_group("default")); } -static void -portal_delete(struct portal *portal) +struct portal_group * +conf::find_portal_group(std::string_view name) { + auto it = conf_portal_groups.find(std::string(name)); + if (it == conf_portal_groups.end()) + return (nullptr); - TAILQ_REMOVE(&portal->p_portal_group->pg_portals, portal, p_next); - if (portal->p_ai != NULL) - freeaddrinfo(portal->p_ai); - free(portal->p_listen); - free(portal); + return (it->second.get()); } struct portal_group * -portal_group_new(struct conf *conf, const char *name) +conf::add_transport_group(const char *name) { - struct portal_group *pg; - - pg = portal_group_find(conf, name); - if (pg != NULL) { - log_warnx("duplicated portal-group \"%s\"", name); - return (NULL); + auto pair = conf_transport_groups.try_emplace(name, + nvmf_make_transport_group(this, name)); + if (!pair.second) { + log_warnx("duplicated transport-group \"%s\"", name); + return (nullptr); } - pg = reinterpret_cast<struct portal_group *>(calloc(1, sizeof(*pg))); - if (pg == NULL) - log_err(1, "calloc"); - pg->pg_name = checked_strdup(name); - pg->pg_options = nvlist_create(0); - TAILQ_INIT(&pg->pg_portals); - TAILQ_INIT(&pg->pg_ports); - pg->pg_conf = conf; - pg->pg_tag = 0; /* Assigned later in conf_apply(). */ - pg->pg_dscp = -1; - pg->pg_pcp = -1; - TAILQ_INSERT_TAIL(&conf->conf_portal_groups, pg, pg_next); - - return (pg); + return (pair.first->second.get()); } -void -portal_group_delete(struct portal_group *pg) +/* + * Make it possible to redefine the default transport-group, but only + * once. + */ +struct portal_group * +conf::define_default_transport_group() { - struct portal *portal, *tmp; - struct port *port, *tport; - - TAILQ_FOREACH_SAFE(port, &pg->pg_ports, p_pgs, tport) - port_delete(port); - TAILQ_REMOVE(&pg->pg_conf->conf_portal_groups, pg, pg_next); + if (conf_default_tg_defined) { + log_warnx("duplicated transport-group \"default\""); + return (nullptr); + } - TAILQ_FOREACH_SAFE(portal, &pg->pg_portals, p_next, tmp) - portal_delete(portal); - nvlist_destroy(pg->pg_options); - free(pg->pg_name); - free(pg->pg_offload); - free(pg->pg_redirection); - free(pg); + conf_default_tg_defined = true; + return (find_transport_group("default")); } struct portal_group * -portal_group_find(const struct conf *conf, const char *name) +conf::find_transport_group(std::string_view name) { - struct portal_group *pg; + auto it = conf_transport_groups.find(std::string(name)); + if (it == conf_transport_groups.end()) + return (nullptr); - TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { - if (strcmp(pg->pg_name, name) == 0) - return (pg); - } + return (it->second.get()); +} - return (NULL); +bool +portal_group::is_dummy() const +{ + if (pg_foreign) + return (true); + if (pg_portals.empty()) + return (true); + return (false); } -static int -parse_addr_port(char *arg, const char *def_port, struct addrinfo **ai) +freebsd::addrinfo_up +parse_addr_port(const char *address, const char *def_port) { - struct addrinfo hints; - char *str, *addr, *ch; - const char *port; - int error, colons = 0; + struct addrinfo hints, *ai; + int error; - str = arg = strdup(arg); - if (arg[0] == '[') { + std::string addr(address); + std::string port(def_port); + if (addr[0] == '[') { /* * IPv6 address in square brackets, perhaps with port. */ - arg++; - addr = strsep(&arg, "]"); - if (arg == NULL) { - free(str); - return (1); - } - if (arg[0] == '\0') { - port = def_port; - } else if (arg[0] == ':') { - port = arg + 1; - } else { - free(str); - return (1); + addr.erase(0, 1); + size_t pos = addr.find(']'); + if (pos == 0 || pos == addr.npos) + return {}; + if (pos < addr.length() - 1) { + port = addr.substr(pos + 1); + if (port[0] != ':' || port.length() < 2) + return {}; + port.erase(0, 1); } + addr.resize(pos); } else { /* * Either IPv6 address without brackets - and without * a port - or IPv4 address. Just count the colons. */ - for (ch = arg; *ch != '\0'; ch++) { - if (*ch == ':') - colons++; - } - if (colons > 1) { - addr = arg; - port = def_port; - } else { - addr = strsep(&arg, ":"); - if (arg == NULL) - port = def_port; - else - port = arg; + size_t pos = addr.find(':'); + if (pos != addr.npos && addr.find(':', pos + 1) == addr.npos) { + /* Only a single colon at `pos`. */ + if (pos == addr.length() - 1) + return {}; + port = addr.substr(pos + 1); + addr.resize(pos); } } @@ -653,49 +643,217 @@ parse_addr_port(char *arg, const char *def_port, struct addrinfo **ai) hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; - error = getaddrinfo(addr, port, &hints, ai); - free(str); - return ((error != 0) ? 1 : 0); + error = getaddrinfo(addr.c_str(), port.c_str(), &hints, &ai); + if (error != 0) + return {}; + return freebsd::addrinfo_up(ai); +} + +void +portal_group::add_port(struct portal_group_port *port) +{ + pg_ports.emplace(port->target()->name(), port); +} + +void +portal_group::remove_port(struct portal_group_port *port) +{ + auto it = pg_ports.find(port->target()->name()); + pg_ports.erase(it); +} + +freebsd::nvlist_up +portal_group::options() const +{ + return (freebsd::nvlist_up(nvlist_clone(pg_options.get()))); } bool -portal_group_add_portal(struct portal_group *pg, const char *value, bool iser) +portal_group::add_option(const char *name, const char *value) { - struct portal *portal; + return (option_new(pg_options.get(), name, value)); +} - portal = portal_new(pg); - portal->p_listen = checked_strdup(value); - portal->p_iser = iser; +bool +portal_group::set_discovery_auth_group(const char *ag_name) +{ + if (pg_discovery_auth_group != nullptr) { + log_warnx("discovery-auth-group for %s " + "\"%s\" specified more than once", keyword(), name()); + return (false); + } + pg_discovery_auth_group = pg_conf->find_auth_group(ag_name); + if (pg_discovery_auth_group == nullptr) { + log_warnx("unknown discovery-auth-group \"%s\" " + "for %s \"%s\"", ag_name, keyword(), name()); + return (false); + } + return (true); +} - if (parse_addr_port(portal->p_listen, "3260", &portal->p_ai)) { - log_warnx("invalid listen address %s", portal->p_listen); - portal_delete(portal); +bool +portal_group::set_dscp(u_int dscp) +{ + if (dscp >= 0x40) { + log_warnx("invalid DSCP value %u for %s \"%s\"", + dscp, keyword(), name()); return (false); } - /* - * XXX: getaddrinfo(3) may return multiple addresses; we should turn - * those into multiple portals. - */ + pg_dscp = dscp; + return (true); +} + +void +portal_group::set_foreign() +{ + pg_foreign = true; +} +bool +portal_group::set_offload(const char *offload) +{ + if (!pg_offload.empty()) { + log_warnx("cannot set offload to \"%s\" for " + "%s \"%s\"; already defined", + offload, keyword(), name()); + return (false); + } + + pg_offload = offload; + return (true); +} + +bool +portal_group::set_pcp(u_int pcp) +{ + if (pcp > 7) { + log_warnx("invalid PCP value %u for %s \"%s\"", + pcp, keyword(), name()); + return (false); + } + + pg_pcp = pcp; return (true); } bool -isns_new(struct conf *conf, const char *addr) +portal_group::set_redirection(const char *addr) +{ + if (!pg_redirection.empty()) { + log_warnx("cannot set redirection to \"%s\" for " + "%s \"%s\"; already defined", + addr, keyword(), name()); + return (false); + } + + pg_redirection = addr; + return (true); +} + +void +portal_group::set_tag(uint16_t tag) +{ + pg_tag = tag; +} + +void +portal_group::verify(struct conf *conf) +{ + if (pg_discovery_auth_group == nullptr) { + pg_discovery_auth_group = conf->find_auth_group("default"); + assert(pg_discovery_auth_group != nullptr); + } + + if (pg_discovery_filter == discovery_filter::UNKNOWN) + pg_discovery_filter = discovery_filter::NONE; + + if (!pg_redirection.empty()) { + if (!pg_ports.empty()) { + log_debugx("%s \"%s\" assigned to target, " + "but configured for redirection", keyword(), + name()); + } + pg_assigned = true; + } else if (!pg_ports.empty()) { + pg_assigned = true; + } else { + if (pg_name != "default") + log_warnx("%s \"%s\" not assigned " + "to any target", keyword(), name()); + pg_assigned = false; + } +} + +/* + * Try to reuse a socket for 'newp' from an existing socket in one of + * our portals. + */ +bool +portal_group::reuse_socket(struct portal &newp) +{ + for (portal_up &portal : pg_portals) { + if (newp.reuse_socket(*portal)) + return (true); + } + return (false); +} + +int +portal_group::open_sockets(struct conf &oldconf) { - struct isns *isns; + int cumulated_error = 0; + + if (pg_foreign) + return (0); - isns = reinterpret_cast<struct isns *>(calloc(1, sizeof(*isns))); - if (isns == NULL) - log_err(1, "calloc"); - isns->i_conf = conf; - TAILQ_INSERT_TAIL(&conf->conf_isns, isns, i_next); - isns->i_addr = checked_strdup(addr); + if (!pg_assigned) { + log_debugx("not listening on %s \"%s\", " + "not assigned to any target", keyword(), name()); + return (0); + } - if (parse_addr_port(isns->i_addr, "3205", &isns->i_ai)) { - log_warnx("invalid iSNS address %s", isns->i_addr); - isns_delete(isns); + for (portal_up &portal : pg_portals) { + /* + * Try to find already open portal and reuse the + * listening socket. We don't care about what portal + * or portal group that was, what matters is the + * listening address. + */ + if (oldconf.reuse_portal_group_socket(*portal)) + continue; + + if (!portal->init_socket()) { + cumulated_error++; + continue; + } + } + return (cumulated_error); +} + +void +portal_group::close_sockets() +{ + for (portal_up &portal : pg_portals) { + if (portal->socket() < 0) + continue; + log_debugx("closing socket for %s, %s \"%s\"", + portal->listen(), keyword(), name()); + portal->close(); + } +} + +bool +conf::add_isns(const char *addr) +{ + if (conf_isns.count(addr) > 0) { + log_warnx("duplicate iSNS address %s", addr); + return (false); + } + + freebsd::addrinfo_up ai = parse_addr_port(addr, "3205"); + if (!ai) { + log_warnx("invalid iSNS address %s", addr); return (false); } @@ -704,998 +862,1168 @@ isns_new(struct conf *conf, const char *addr) * those into multiple servers. */ + conf_isns.emplace(addr, isns(addr, std::move(ai))); return (true); } -void -isns_delete(struct isns *isns) + +freebsd::fd_up +isns::connect() { + freebsd::fd_up s; - TAILQ_REMOVE(&isns->i_conf->conf_isns, isns, i_next); - free(isns->i_addr); - if (isns->i_ai != NULL) - freeaddrinfo(isns->i_ai); - free(isns); + s = socket(i_ai->ai_family, i_ai->ai_socktype, i_ai->ai_protocol); + if (!s) { + log_warn("socket(2) failed for %s", addr()); + return (s); + } + if (::connect(s, i_ai->ai_addr, i_ai->ai_addrlen)) { + log_warn("connect(2) failed for %s", addr()); + s.reset(); + } + return (s); } -static int -isns_do_connect(struct isns *isns) +bool +isns::send_request(int s, struct isns_req req) { - int s; - - s = socket(isns->i_ai->ai_family, isns->i_ai->ai_socktype, - isns->i_ai->ai_protocol); - if (s < 0) { - log_warn("socket(2) failed for %s", isns->i_addr); - return (-1); + if (!req.send(s)) { + log_warn("send(2) failed for %s", addr()); + return (false); + } + if (!req.receive(s)) { + log_warn("receive(2) failed for %s", addr()); + return (false); } - if (connect(s, isns->i_ai->ai_addr, isns->i_ai->ai_addrlen)) { - log_warn("connect(2) failed for %s", isns->i_addr); - close(s); - return (-1); + uint32_t error = req.get_status(); + if (error != 0) { + log_warnx("iSNS %s error %u for %s", req.descr(), error, + addr()); + return (false); } - return(s); + return (true); } -static int -isns_do_register(struct isns *isns, int s, const char *hostname) +struct isns_req +conf::isns_register_request(const char *hostname) { - struct conf *conf = isns->i_conf; - struct target *target; - struct portal *portal; - struct portal_group *pg; - struct port *port; - struct isns_req *req; - int res = 0; - uint32_t error; - - req = isns_req_create(ISNS_FUNC_DEVATTRREG, ISNS_FLAG_CLIENT); - isns_req_add_str(req, 32, TAILQ_FIRST(&conf->conf_targets)->t_name); - isns_req_add_delim(req); - isns_req_add_str(req, 1, hostname); - isns_req_add_32(req, 2, 2); /* 2 -- iSCSI */ - isns_req_add_32(req, 6, conf->conf_isns_period); - TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { - if (pg->pg_unassigned) + const struct portal_group *pg; + + isns_req req(ISNS_FUNC_DEVATTRREG, ISNS_FLAG_CLIENT, "register"); + req.add_str(32, conf_first_target->name()); + req.add_delim(); + req.add_str(1, hostname); + req.add_32(2, 2); /* 2 -- iSCSI */ + req.add_32(6, conf_isns_period); + for (const auto &kv : conf_portal_groups) { + pg = kv.second.get(); + + if (!pg->assigned()) continue; - TAILQ_FOREACH(portal, &pg->pg_portals, p_next) { - isns_req_add_addr(req, 16, portal->p_ai); - isns_req_add_port(req, 17, portal->p_ai); + for (const portal_up &portal : pg->portals()) { + req.add_addr(16, portal->ai()); + req.add_port(17, portal->ai()); } } - TAILQ_FOREACH(target, &conf->conf_targets, t_next) { - isns_req_add_str(req, 32, target->t_name); - isns_req_add_32(req, 33, 1); /* 1 -- Target*/ - if (target->t_alias != NULL) - isns_req_add_str(req, 34, target->t_alias); - TAILQ_FOREACH(port, &target->t_ports, p_ts) { - if ((pg = port->p_portal_group) == NULL) + for (const auto &kv : conf_targets) { + const struct target *target = kv.second.get(); + + req.add_str(32, target->name()); + req.add_32(33, 1); /* 1 -- Target*/ + if (target->has_alias()) + req.add_str(34, target->alias()); + for (const port *port : target->ports()) { + pg = port->portal_group(); + if (pg == nullptr) continue; - isns_req_add_32(req, 51, pg->pg_tag); - TAILQ_FOREACH(portal, &pg->pg_portals, p_next) { - isns_req_add_addr(req, 49, portal->p_ai); - isns_req_add_port(req, 50, portal->p_ai); + req.add_32(51, pg->tag()); + for (const portal_up &portal : pg->portals()) { + req.add_addr(49, portal->ai()); + req.add_port(50, portal->ai()); } } } - res = isns_req_send(s, req); - if (res < 0) { - log_warn("send(2) failed for %s", isns->i_addr); - goto quit; - } - res = isns_req_receive(s, req); - if (res < 0) { - log_warn("receive(2) failed for %s", isns->i_addr); - goto quit; - } - error = isns_req_get_status(req); - if (error != 0) { - log_warnx("iSNS register error %d for %s", error, isns->i_addr); - res = -1; - } -quit: - isns_req_free(req); - return (res); + return (req); } -static int -isns_do_check(struct isns *isns, int s, const char *hostname) -{ - struct conf *conf = isns->i_conf; - struct isns_req *req; - int res = 0; - uint32_t error; - - req = isns_req_create(ISNS_FUNC_DEVATTRQRY, ISNS_FLAG_CLIENT); - isns_req_add_str(req, 32, TAILQ_FIRST(&conf->conf_targets)->t_name); - isns_req_add_str(req, 1, hostname); - isns_req_add_delim(req); - isns_req_add(req, 2, 0, NULL); - res = isns_req_send(s, req); - if (res < 0) { - log_warn("send(2) failed for %s", isns->i_addr); - goto quit; - } - res = isns_req_receive(s, req); - if (res < 0) { - log_warn("receive(2) failed for %s", isns->i_addr); - goto quit; - } - error = isns_req_get_status(req); - if (error != 0) { - log_warnx("iSNS check error %d for %s", error, isns->i_addr); - res = -1; - } -quit: - isns_req_free(req); - return (res); +struct isns_req +conf::isns_check_request(const char *hostname) +{ + isns_req req(ISNS_FUNC_DEVATTRQRY, ISNS_FLAG_CLIENT, "check"); + req.add_str(32, conf_first_target->name()); + req.add_str(1, hostname); + req.add_delim(); + req.add(2, 0, NULL); + return (req); } -static int -isns_do_deregister(struct isns *isns, int s, const char *hostname) -{ - struct conf *conf = isns->i_conf; - struct isns_req *req; - int res = 0; - uint32_t error; - - req = isns_req_create(ISNS_FUNC_DEVDEREG, ISNS_FLAG_CLIENT); - isns_req_add_str(req, 32, TAILQ_FIRST(&conf->conf_targets)->t_name); - isns_req_add_delim(req); - isns_req_add_str(req, 1, hostname); - res = isns_req_send(s, req); - if (res < 0) { - log_warn("send(2) failed for %s", isns->i_addr); - goto quit; - } - res = isns_req_receive(s, req); - if (res < 0) { - log_warn("receive(2) failed for %s", isns->i_addr); - goto quit; - } - error = isns_req_get_status(req); - if (error != 0) { - log_warnx("iSNS deregister error %d for %s", error, isns->i_addr); - res = -1; - } -quit: - isns_req_free(req); - return (res); +struct isns_req +conf::isns_deregister_request(const char *hostname) +{ + isns_req req(ISNS_FUNC_DEVDEREG, ISNS_FLAG_CLIENT, "deregister"); + req.add_str(32, conf_first_target->name()); + req.add_delim(); + req.add_str(1, hostname); + return (req); } void -isns_register(struct isns *isns, struct isns *oldisns) +conf::isns_register_targets(struct isns *isns, struct conf *oldconf) { - struct conf *conf = isns->i_conf; - int error, s; + int error; char hostname[256]; - if (TAILQ_EMPTY(&conf->conf_targets) || - TAILQ_EMPTY(&conf->conf_portal_groups)) + if (conf_targets.empty() || conf_portal_groups.empty()) return; - set_timeout(conf->conf_isns_timeout, false); - s = isns_do_connect(isns); - if (s < 0) { - set_timeout(0, false); + start_timer(conf_isns_timeout); + freebsd::fd_up s = isns->connect(); + if (!s) { + stop_timer(); return; } error = gethostname(hostname, sizeof(hostname)); if (error != 0) log_err(1, "gethostname"); - if (oldisns == NULL || TAILQ_EMPTY(&oldisns->i_conf->conf_targets)) - oldisns = isns; - isns_do_deregister(oldisns, s, hostname); - isns_do_register(isns, s, hostname); - close(s); - set_timeout(0, false); + if (oldconf == nullptr || oldconf->conf_first_target == nullptr) + oldconf = this; + isns->send_request(s, oldconf->isns_deregister_request(hostname)); + isns->send_request(s, isns_register_request(hostname)); + s.reset(); + stop_timer(); } void -isns_check(struct isns *isns) +conf::isns_check(struct isns *isns) { - struct conf *conf = isns->i_conf; - int error, s, res; + int error; char hostname[256]; - if (TAILQ_EMPTY(&conf->conf_targets) || - TAILQ_EMPTY(&conf->conf_portal_groups)) + if (conf_targets.empty() || conf_portal_groups.empty()) return; - set_timeout(conf->conf_isns_timeout, false); - s = isns_do_connect(isns); - if (s < 0) { - set_timeout(0, false); + start_timer(conf_isns_timeout); + freebsd::fd_up s = isns->connect(); + if (!s) { + stop_timer(); return; } error = gethostname(hostname, sizeof(hostname)); if (error != 0) log_err(1, "gethostname"); - res = isns_do_check(isns, s, hostname); - if (res < 0) { - isns_do_deregister(isns, s, hostname); - isns_do_register(isns, s, hostname); + if (!isns->send_request(s, isns_check_request(hostname))) { + isns->send_request(s, isns_deregister_request(hostname)); + isns->send_request(s, isns_register_request(hostname)); } - close(s); - set_timeout(0, false); + s.reset(); + stop_timer(); } void -isns_deregister(struct isns *isns) +conf::isns_deregister_targets(struct isns *isns) { - struct conf *conf = isns->i_conf; - int error, s; + int error; char hostname[256]; - if (TAILQ_EMPTY(&conf->conf_targets) || - TAILQ_EMPTY(&conf->conf_portal_groups)) + if (conf_targets.empty() || conf_portal_groups.empty()) return; - set_timeout(conf->conf_isns_timeout, false); - s = isns_do_connect(isns); - if (s < 0) + start_timer(conf_isns_timeout); + freebsd::fd_up s = isns->connect(); + if (!s) return; error = gethostname(hostname, sizeof(hostname)); if (error != 0) log_err(1, "gethostname"); - isns_do_deregister(isns, s, hostname); - close(s); - set_timeout(0, false); + isns->send_request(s, isns_deregister_request(hostname)); + s.reset(); + stop_timer(); } -struct pport * -pport_new(struct kports *kports, const char *name, uint32_t ctl_port) +void +conf::isns_schedule_update() { - struct pport *pp; - - pp = reinterpret_cast<struct pport *>(calloc(1, sizeof(*pp))); - if (pp == NULL) - log_err(1, "calloc"); - pp->pp_kports = kports; - pp->pp_name = checked_strdup(name); - pp->pp_ctl_port = ctl_port; - TAILQ_INIT(&pp->pp_ports); - TAILQ_INSERT_TAIL(&kports->pports, pp, pp_next); - return (pp); + if (!conf_isns.empty()) + start_timer((conf_isns_period + 2) / 3); } -struct pport * -pport_find(const struct kports *kports, const char *name) +void +conf::isns_update() { - struct pport *pp; + stop_timer(); + for (auto &kv : conf_isns) + isns_check(&kv.second); + + isns_schedule_update(); +} - TAILQ_FOREACH(pp, &kports->pports, pp_next) { - if (strcasecmp(pp->pp_name, name) == 0) - return (pp); +bool +kports::add_port(std::string &name, uint32_t ctl_port) +{ + const auto &pair = pports.try_emplace(name, name, ctl_port); + if (!pair.second) { + log_warnx("duplicate kernel port \"%s\" (%u)", name.c_str(), + ctl_port); + return (false); } - return (NULL); + + return (true); +} + +bool +kports::has_port(std::string_view name) +{ + return (pports.count(std::string(name)) > 0); } struct pport * -pport_copy(struct pport *pp, struct kports *kports) +kports::find_port(std::string_view name) { - struct pport *ppnew; + auto it = pports.find(std::string(name)); + if (it == pports.end()) + return (nullptr); + return (&it->second); +} - ppnew = pport_new(kports, pp->pp_name, pp->pp_ctl_port); - return (ppnew); +port::port(struct target *target) : + p_target(target) +{ + target->add_port(this); } void -pport_delete(struct pport *pp) +port::clear_references() +{ + p_target->remove_port(this); +} + +portal_group_port::portal_group_port(struct target *target, + struct portal_group *pg, auth_group_sp ag) : + port(target), p_auth_group(ag), p_portal_group(pg) { - struct port *port, *tport; + p_portal_group->add_port(this); +} - TAILQ_FOREACH_SAFE(port, &pp->pp_ports, p_ts, tport) - port_delete(port); - TAILQ_REMOVE(&pp->pp_kports->pports, pp, pp_next); - free(pp->pp_name); - free(pp); +portal_group_port::portal_group_port(struct target *target, + struct portal_group *pg, uint32_t ctl_port) : + port(target), p_portal_group(pg) +{ + p_ctl_port = ctl_port; + p_portal_group->add_port(this); } -struct port * -port_new(struct conf *conf, struct target *target, struct portal_group *pg) +bool +portal_group_port::is_dummy() const { - struct port *port; - char *name; - int ret; + return (p_portal_group->is_dummy()); +} - ret = asprintf(&name, "%s-%s", pg->pg_name, target->t_name); - if (ret <= 0) - log_err(1, "asprintf"); - if (port_find(conf, name) != NULL) { - log_warnx("duplicate port \"%s\"", name); - free(name); - return (NULL); +void +portal_group_port::clear_references() +{ + p_portal_group->remove_port(this); + port::clear_references(); +} + +bool +conf::add_port(struct target *target, struct portal_group *pg, auth_group_sp ag) +{ + std::string name = freebsd::stringf("%s-%s", pg->name(), + target->name()); + const auto &pair = conf_ports.try_emplace(name, pg->create_port(target, + ag)); + if (!pair.second) { + log_warnx("duplicate port \"%s\"", name.c_str()); + return (false); } - port = reinterpret_cast<struct port *>(calloc(1, sizeof(*port))); - if (port == NULL) - log_err(1, "calloc"); - port->p_conf = conf; - port->p_name = name; - TAILQ_INSERT_TAIL(&conf->conf_ports, port, p_next); - TAILQ_INSERT_TAIL(&target->t_ports, port, p_ts); - port->p_target = target; - TAILQ_INSERT_TAIL(&pg->pg_ports, port, p_pgs); - port->p_portal_group = pg; - return (port); + + return (true); } -struct port * -port_new_ioctl(struct conf *conf, struct kports *kports, struct target *target, - int pp, int vp) +bool +conf::add_port(struct target *target, struct portal_group *pg, + uint32_t ctl_port) +{ + std::string name = freebsd::stringf("%s-%s", pg->name(), + target->name()); + const auto &pair = conf_ports.try_emplace(name, pg->create_port(target, + ctl_port)); + if (!pair.second) { + log_warnx("duplicate port \"%s\"", name.c_str()); + return (false); + } + + return (true); +} + +bool +conf::add_port(struct target *target, struct pport *pp) +{ + std::string name = freebsd::stringf("%s-%s", pp->name(), + target->name()); + const auto &pair = conf_ports.try_emplace(name, + std::make_unique<kernel_port>(target, pp)); + if (!pair.second) { + log_warnx("duplicate port \"%s\"", name.c_str()); + return (false); + } + + pp->link(); + return (true); +} + +bool +conf::add_port(struct kports &kports, struct target *target, int pp, int vp) { struct pport *pport; - struct port *port; - char *pname; - char *name; - int ret; - - ret = asprintf(&pname, "ioctl/%d/%d", pp, vp); - if (ret <= 0) { - log_err(1, "asprintf"); - return (NULL); + + std::string pname = freebsd::stringf("ioctl/%d/%d", pp, vp); + + pport = kports.find_port(pname); + if (pport != NULL) + return (add_port(target, pport)); + + std::string name = pname + "-" + target->name(); + const auto &pair = conf_ports.try_emplace(name, + std::make_unique<ioctl_port>(target, pp, vp)); + if (!pair.second) { + log_warnx("duplicate port \"%s\"", name.c_str()); + return (false); } - pport = pport_find(kports, pname); - if (pport != NULL) { - free(pname); - return (port_new_pp(conf, target, pport)); + return (true); +} + +const struct port * +portal_group::find_port(std::string_view target) const +{ + auto it = pg_ports.find(std::string(target)); + if (it == pg_ports.end()) + return (nullptr); + return (it->second); +} + +struct target * +conf::add_controller(const char *name) +{ + if (!nvmf_nqn_valid_strict(name)) { + log_warnx("controller name \"%s\" is invalid for NVMe", name); + return nullptr; } - ret = asprintf(&name, "%s-%s", pname, target->t_name); - free(pname); + /* + * Normalize the name to lowercase to match iSCSI. + */ + std::string t_name(name); + for (char &c : t_name) + c = tolower(c); - if (ret <= 0) - log_err(1, "asprintf"); - if (port_find(conf, name) != NULL) { - log_warnx("duplicate port \"%s\"", name); - free(name); - return (NULL); + auto const &pair = conf_controllers.try_emplace(t_name, + nvmf_make_controller(this, t_name)); + if (!pair.second) { + log_warnx("duplicated controller \"%s\"", name); + return nullptr; } - port = reinterpret_cast<struct port *>(calloc(1, sizeof(*port))); - if (port == NULL) - log_err(1, "calloc"); - port->p_conf = conf; - port->p_name = name; - port->p_ioctl_port = true; - port->p_ioctl_pp = pp; - port->p_ioctl_vp = vp; - TAILQ_INSERT_TAIL(&conf->conf_ports, port, p_next); - TAILQ_INSERT_TAIL(&target->t_ports, port, p_ts); - port->p_target = target; - return (port); -} - -struct port * -port_new_pp(struct conf *conf, struct target *target, struct pport *pp) -{ - struct port *port; - char *name; - int ret; - - ret = asprintf(&name, "%s-%s", pp->pp_name, target->t_name); - if (ret <= 0) - log_err(1, "asprintf"); - if (port_find(conf, name) != NULL) { - log_warnx("duplicate port \"%s\"", name); - free(name); + + return pair.first->second.get(); +} + +struct target * +conf::find_controller(std::string_view name) +{ + auto it = conf_controllers.find(std::string(name)); + if (it == conf_controllers.end()) + return nullptr; + return it->second.get(); +} + +target::target(struct conf *conf, const char *keyword, std::string_view name) : + t_conf(conf), t_name(name) +{ + t_label = freebsd::stringf("%s \"%s\"", keyword, t_name.c_str()); +} + +struct target * +conf::add_target(const char *name) +{ + if (!valid_iscsi_name(name, log_warnx)) + return (nullptr); + + /* + * RFC 3722 requires us to normalize the name to lowercase. + */ + std::string t_name(name); + for (char &c : t_name) + c = tolower(c); + + auto const &pair = conf_targets.try_emplace(t_name, + iscsi_make_target(this, t_name)); + if (!pair.second) { + log_warnx("duplicated target \"%s\"", name); return (NULL); } - port = reinterpret_cast<struct port *>(calloc(1, sizeof(*port))); - if (port == NULL) - log_err(1, "calloc"); - port->p_conf = conf; - port->p_name = name; - TAILQ_INSERT_TAIL(&conf->conf_ports, port, p_next); - TAILQ_INSERT_TAIL(&target->t_ports, port, p_ts); - port->p_target = target; - TAILQ_INSERT_TAIL(&pp->pp_ports, port, p_pps); - port->p_pport = pp; - return (port); + + if (conf_first_target == nullptr) + conf_first_target = pair.first->second.get(); + return (pair.first->second.get()); +} + +struct target * +conf::find_target(std::string_view name) +{ + auto it = conf_targets.find(std::string(name)); + if (it == conf_targets.end()) + return (nullptr); + return (it->second.get()); } -struct port * -port_find(const struct conf *conf, const char *name) +bool +target::use_private_auth(const char *keyword) { - struct port *port; + if (t_private_auth) + return (true); - TAILQ_FOREACH(port, &conf->conf_ports, p_next) { - if (strcasecmp(port->p_name, name) == 0) - return (port); + if (t_auth_group != nullptr) { + log_warnx("cannot use both auth-group and %s for %s", + keyword, label()); + return (false); } - return (NULL); + t_auth_group = std::make_shared<struct auth_group>(t_label); + t_private_auth = true; + return (true); +} + +bool +target::add_chap(const char *user, const char *secret) +{ + if (!use_private_auth("chap")) + return (false); + return (t_auth_group->add_chap(user, secret)); +} + +bool +target::add_chap_mutual(const char *user, const char *secret, + const char *user2, const char *secret2) +{ + if (!use_private_auth("chap-mutual")) + return (false); + return (t_auth_group->add_chap_mutual(user, secret, user2, secret2)); } -struct port * -port_find_in_pg(const struct portal_group *pg, const char *target) +bool +target::add_lun(u_int id, const char *lun_label, const char *lun_name) { - struct port *port; + struct lun *t_lun; + + if (id >= MAX_LUNS) { + log_warnx("%s too big for %s", lun_label, label()); + return (false); + } + + if (t_luns[id] != NULL) { + log_warnx("duplicate %s for %s", lun_label, label()); + return (false); + } - TAILQ_FOREACH(port, &pg->pg_ports, p_pgs) { - if (strcasecmp(port->p_target->t_name, target) == 0) - return (port); + t_lun = t_conf->find_lun(lun_name); + if (t_lun == NULL) { + log_warnx("unknown LUN named %s used for %s", lun_name, + label()); + return (false); } - return (NULL); + t_luns[id] = t_lun; + return (true); } -void -port_delete(struct port *port) +bool +target::set_alias(std::string_view alias) { + if (has_alias()) { + log_warnx("alias for %s specified more than once", label()); + return (false); + } + t_alias = alias; + return (true); +} - if (port->p_portal_group) - TAILQ_REMOVE(&port->p_portal_group->pg_ports, port, p_pgs); - if (port->p_pport) - TAILQ_REMOVE(&port->p_pport->pp_ports, port, p_pps); - if (port->p_target) - TAILQ_REMOVE(&port->p_target->t_ports, port, p_ts); - TAILQ_REMOVE(&port->p_conf->conf_ports, port, p_next); - free(port->p_name); - free(port); +bool +target::set_auth_group(const char *ag_name) +{ + if (t_auth_group != nullptr) { + if (t_private_auth) + log_warnx("cannot use both auth-group and explicit " + "authorisations for %s", label()); + else + log_warnx("auth-group for %s " + "specified more than once", label()); + return (false); + } + t_auth_group = t_conf->find_auth_group(ag_name); + if (t_auth_group == nullptr) { + log_warnx("unknown auth-group \"%s\" for %s", + ag_name, label()); + return (false); + } + return (true); } bool -port_is_dummy(struct port *port) +target::set_auth_type(const char *type) { + if (!use_private_auth("auth-type")) + return (false); + return (t_auth_group->set_type(type)); +} - if (port->p_portal_group) { - if (port->p_portal_group->pg_foreign) - return (true); - if (TAILQ_EMPTY(&port->p_portal_group->pg_portals)) - return (true); +bool +target::set_physical_port(std::string_view pport) +{ + if (!t_pport.empty()) { + log_warnx("cannot set multiple physical ports for target " + "\"%s\"", name()); + return (false); } - return (false); + t_pport = pport; + return (true); } -struct target * -target_new(struct conf *conf, const char *name) +bool +target::set_redirection(const char *addr) { - struct target *targ; - int i, len; + if (!t_redirection.empty()) { + log_warnx("cannot set redirection to \"%s\" for " + "%s; already defined", + addr, label()); + return (false); + } - targ = target_find(conf, name); - if (targ != NULL) { - log_warnx("duplicated target \"%s\"", name); - return (NULL); + t_redirection = addr; + return (true); +} + +struct lun * +target::start_lun(u_int id, const char *lun_label, const char *lun_name) +{ + if (id >= MAX_LUNS) { + log_warnx("%s too big for %s", lun_label, label()); + return (nullptr); } - if (valid_iscsi_name(name, log_warnx) == false) { - return (NULL); + + if (t_luns[id] != NULL) { + log_warnx("duplicate %s for %s", lun_label, label()); + return (nullptr); } - targ = reinterpret_cast<struct target *>(calloc(1, sizeof(*targ))); - if (targ == NULL) - log_err(1, "calloc"); - targ->t_name = checked_strdup(name); - /* - * RFC 3722 requires us to normalize the name to lowercase. - */ - len = strlen(name); - for (i = 0; i < len; i++) - targ->t_name[i] = tolower(targ->t_name[i]); + struct lun *new_lun = t_conf->add_lun(lun_name); + if (new_lun == nullptr) + return (nullptr); + + new_lun->set_scsiname(lun_name); - targ->t_conf = conf; - TAILQ_INIT(&targ->t_ports); - TAILQ_INSERT_TAIL(&conf->conf_targets, targ, t_next); + t_luns[id] = new_lun; - return (targ); + return (new_lun); } void -target_delete(struct target *targ) +target::add_port(struct port *port) { - struct port *port, *tport; - - TAILQ_FOREACH_SAFE(port, &targ->t_ports, p_ts, tport) - port_delete(port); - TAILQ_REMOVE(&targ->t_conf->conf_targets, targ, t_next); + t_ports.push_back(port); +} - free(targ->t_pport); - free(targ->t_name); - free(targ->t_redirection); - free(targ); +void +target::remove_port(struct port *port) +{ + t_ports.remove(port); } -struct target * -target_find(struct conf *conf, const char *name) +void +target::remove_lun(struct lun *lun) { - struct target *targ; + /* XXX: clang is not able to deduce the type without the cast. */ + std::replace(t_luns.begin(), t_luns.end(), lun, + static_cast<struct lun *>(nullptr)); +} - TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { - if (strcasecmp(targ->t_name, name) == 0) - return (targ); +void +target::verify() +{ + if (t_auth_group == nullptr) { + t_auth_group = t_conf->find_auth_group("default"); + assert(t_auth_group != nullptr); + } + if (t_ports.empty()) { + struct portal_group *pg = default_portal_group(); + assert(pg != NULL); + t_conf->add_port(this, pg, nullptr); } - return (NULL); + bool found = std::any_of(t_luns.begin(), t_luns.end(), + [](struct lun *lun) { return (lun != nullptr); }); + if (!found && t_redirection.empty()) + log_warnx("no LUNs defined for %s", label()); + if (found && !t_redirection.empty()) + log_debugx("%s contains LUNs, but configured " + "for redirection", label()); } -struct lun * -lun_new(struct conf *conf, const char *name) +lun::lun(struct conf *conf, std::string_view name) + : l_conf(conf), l_options(nvlist_create(0)), l_name(name) { - struct lun *lun; +} - lun = lun_find(conf, name); - if (lun != NULL) { +struct lun * +conf::add_lun(const char *name) +{ + const auto &pair = conf_luns.try_emplace(name, + std::make_unique<lun>(this, name)); + if (!pair.second) { log_warnx("duplicated lun \"%s\"", name); return (NULL); } + return (pair.first->second.get()); +} + +void +conf::delete_target_luns(struct lun *lun) +{ + for (const auto &kv : conf_targets) + kv.second->remove_lun(lun); + for (const auto &kv : conf_controllers) + kv.second->remove_lun(lun); +} - lun = reinterpret_cast<struct lun *>(calloc(1, sizeof(*lun))); - if (lun == NULL) - log_err(1, "calloc"); - lun->l_conf = conf; - lun->l_name = checked_strdup(name); - lun->l_options = nvlist_create(0); - TAILQ_INSERT_TAIL(&conf->conf_luns, lun, l_next); - lun->l_ctl_lun = -1; +struct lun * +conf::find_lun(std::string_view name) +{ + auto it = conf_luns.find(std::string(name)); + if (it == conf_luns.end()) + return (nullptr); + return (it->second.get()); +} - return (lun); +static void +nvlist_replace_string(nvlist_t *nvl, const char *name, const char *value) +{ + if (nvlist_exists_string(nvl, name)) + nvlist_free_string(nvl, name); + nvlist_add_string(nvl, name, value); } -void -lun_delete(struct lun *lun) +freebsd::nvlist_up +lun::options() const { - struct target *targ; - int i; + freebsd::nvlist_up nvl(nvlist_clone(l_options.get())); + if (!l_path.empty()) + nvlist_replace_string(nvl.get(), "file", l_path.c_str()); - TAILQ_FOREACH(targ, &lun->l_conf->conf_targets, t_next) { - for (i = 0; i < MAX_LUNS; i++) { - if (targ->t_luns[i] == lun) - targ->t_luns[i] = NULL; - } - } - TAILQ_REMOVE(&lun->l_conf->conf_luns, lun, l_next); + nvlist_replace_string(nvl.get(), "ctld_name", l_name.c_str()); - nvlist_destroy(lun->l_options); - free(lun->l_name); - free(lun->l_backend); - free(lun->l_device_id); - free(lun->l_path); - free(lun->l_scsiname); - free(lun->l_serial); - free(lun); + if (!nvlist_exists_string(nvl.get(), "scsiname") && + !l_scsiname.empty()) + nvlist_add_string(nvl.get(), "scsiname", l_scsiname.c_str()); + return (nvl); } -struct lun * -lun_find(const struct conf *conf, const char *name) +bool +lun::add_option(const char *name, const char *value) { - struct lun *lun; + return (option_new(l_options.get(), name, value)); +} - TAILQ_FOREACH(lun, &conf->conf_luns, l_next) { - if (strcmp(lun->l_name, name) == 0) - return (lun); +bool +lun::set_backend(std::string_view value) +{ + if (!l_backend.empty()) { + log_warnx("backend for lun \"%s\" specified more than once", + name()); + return (false); } - return (NULL); + l_backend = value; + return (true); } -void -lun_set_scsiname(struct lun *lun, const char *value) +bool +lun::set_blocksize(size_t value) { - free(lun->l_scsiname); - lun->l_scsiname = checked_strdup(value); + if (l_blocksize != 0) { + log_warnx("blocksize for lun \"%s\" specified more than once", + name()); + return (false); + } + l_blocksize = value; + return (true); } bool -option_new(nvlist_t *nvl, const char *name, const char *value) +lun::set_ctl_lun(uint32_t value) { - int error; - - if (nvlist_exists_string(nvl, name)) { - log_warnx("duplicated option \"%s\"", name); + if (l_ctl_lun >= 0) { + log_warnx("ctl_lun for lun \"%s\" specified more than once", + name()); return (false); } - nvlist_add_string(nvl, name, value); - error = nvlist_error(nvl); - if (error != 0) { - log_warnc(error, "failed to add option \"%s\"", name); + l_ctl_lun = value; + return (true); +} + +bool +lun::set_device_type(uint8_t device_type) +{ + if (device_type > 15) { + log_warnx("invalid device-type \"%u\" for lun \"%s\"", + device_type, name()); return (false); } + + l_device_type = device_type; return (true); } -#ifdef ICL_KERNEL_PROXY +bool +lun::set_device_type(const char *value) +{ + const char *errstr; + int device_type; + + if (strcasecmp(value, "disk") == 0 || + strcasecmp(value, "direct") == 0) + device_type = T_DIRECT; + else if (strcasecmp(value, "processor") == 0) + device_type = T_PROCESSOR; + else if (strcasecmp(value, "cd") == 0 || + strcasecmp(value, "cdrom") == 0 || + strcasecmp(value, "dvd") == 0 || + strcasecmp(value, "dvdrom") == 0) + device_type = T_CDROM; + else { + device_type = strtonum(value, 0, 15, &errstr); + if (errstr != NULL) { + log_warnx("invalid device-type \"%s\" for lun \"%s\"", + value, name()); + return (false); + } + } -static void -pdu_receive_proxy(struct pdu *pdu) + l_device_type = device_type; + return (true); +} + +bool +lun::set_device_id(std::string_view value) { - struct connection *conn; - size_t len; + if (!l_device_id.empty()) { + log_warnx("device_id for lun \"%s\" specified more than once", + name()); + return (false); + } - assert(proxy_mode); - conn = pdu->pdu_connection; + l_device_id = value; + return (true); +} - kernel_receive(pdu); +bool +lun::set_path(std::string_view value) +{ + if (!l_path.empty()) { + log_warnx("path for lun \"%s\" specified more than once", + name()); + return (false); + } - len = pdu_ahs_length(pdu); - if (len > 0) - log_errx(1, "protocol error: non-empty AHS"); + l_path = value; + return (true); +} - len = pdu_data_segment_length(pdu); - assert(len <= (size_t)conn->conn_max_recv_data_segment_length); - pdu->pdu_data_len = len; +void +lun::set_scsiname(std::string_view value) +{ + l_scsiname = value; } -static void -pdu_send_proxy(struct pdu *pdu) +bool +lun::set_serial(std::string_view value) { + if (!l_serial.empty()) { + log_warnx("serial for lun \"%s\" specified more than once", + name()); + return (false); + } - assert(proxy_mode); + l_serial = value; + return (true); +} - pdu_set_data_segment_length(pdu, pdu->pdu_data_len); - kernel_send(pdu); +bool +lun::set_size(uint64_t value) +{ + if (l_size != 0) { + log_warnx("size for lun \"%s\" specified more than once", + name()); + return (false); + } + + l_size = value; + return (true); } -#endif /* ICL_KERNEL_PROXY */ -static void -pdu_fail(const struct connection *conn __unused, const char *reason __unused) +bool +lun::changed(const struct lun &newlun) const { + if (l_backend != newlun.l_backend) { + log_debugx("backend for lun \"%s\", CTL lun %d changed; " + "removing", name(), l_ctl_lun); + return (true); + } + if (l_blocksize != newlun.l_blocksize) { + log_debugx("blocksize for lun \"%s\", CTL lun %d changed; " + "removing", name(), l_ctl_lun); + return (true); + } + if (l_device_id != newlun.l_device_id) { + log_debugx("device-id for lun \"%s\", CTL lun %d changed; " + "removing", name(), l_ctl_lun); + return (true); + } + if (l_path != newlun.l_path) { + log_debugx("path for lun \"%s\", CTL lun %d, changed; " + "removing", name(), l_ctl_lun); + return (true); + } + if (l_serial != newlun.l_serial) { + log_debugx("serial for lun \"%s\", CTL lun %d changed; " + "removing", name(), l_ctl_lun); + return (true); + } + return (false); } -static struct ctld_connection * -connection_new(struct portal *portal, int fd, const char *host, - const struct sockaddr *client_sa) +bool +option_new(nvlist_t *nvl, const char *name, const char *value) { - struct ctld_connection *conn; + int error; - conn = reinterpret_cast<struct ctld_connection *>(calloc(1, sizeof(*conn))); - if (conn == NULL) - log_err(1, "calloc"); - connection_init(&conn->conn, &conn_ops, proxy_mode); - conn->conn.conn_socket = fd; - conn->conn_portal = portal; - conn->conn_initiator_addr = checked_strdup(host); - memcpy(&conn->conn_initiator_sa, client_sa, client_sa->sa_len); + if (nvlist_exists_string(nvl, name)) { + log_warnx("duplicated option \"%s\"", name); + return (false); + } - return (conn); + nvlist_add_string(nvl, name, value); + error = nvlist_error(nvl); + if (error != 0) { + log_warnc(error, "failed to add option \"%s\"", name); + return (false); + } + return (true); } -static bool -conf_verify_lun(struct lun *lun) +bool +lun::verify() { - const struct lun *lun2; - - if (lun->l_backend == NULL) - lun->l_backend = checked_strdup("block"); - if (strcmp(lun->l_backend, "block") == 0) { - if (lun->l_path == NULL) { + if (l_backend.empty()) + l_backend = "block"; + if (l_backend == "block") { + if (l_path.empty()) { log_warnx("missing path for lun \"%s\"", - lun->l_name); + name()); return (false); } - } else if (strcmp(lun->l_backend, "ramdisk") == 0) { - if (lun->l_size == 0) { + } else if (l_backend == "ramdisk") { + if (l_size == 0) { log_warnx("missing size for ramdisk-backed lun \"%s\"", - lun->l_name); + name()); return (false); } - if (lun->l_path != NULL) { + if (!l_path.empty()) { log_warnx("path must not be specified " "for ramdisk-backed lun \"%s\"", - lun->l_name); + name()); return (false); } } - if (lun->l_blocksize == 0) { - if (lun->l_device_type == T_CDROM) - lun->l_blocksize = DEFAULT_CD_BLOCKSIZE; + if (l_blocksize == 0) { + if (l_device_type == T_CDROM) + l_blocksize = DEFAULT_CD_BLOCKSIZE; else - lun->l_blocksize = DEFAULT_BLOCKSIZE; - } else if (lun->l_blocksize < 0) { - log_warnx("invalid blocksize for lun \"%s\"; " - "must be larger than 0", lun->l_name); + l_blocksize = DEFAULT_BLOCKSIZE; + } else if (l_blocksize < 0) { + log_warnx("invalid blocksize %d for lun \"%s\"; " + "must be larger than 0", l_blocksize, name()); return (false); } - if (lun->l_size != 0 && lun->l_size % lun->l_blocksize != 0) { + if (l_size != 0 && (l_size % l_blocksize) != 0) { log_warnx("invalid size for lun \"%s\"; " - "must be multiple of blocksize", lun->l_name); + "must be multiple of blocksize", name()); return (false); } - TAILQ_FOREACH(lun2, &lun->l_conf->conf_luns, l_next) { - if (lun == lun2) - continue; - if (lun->l_path != NULL && lun2->l_path != NULL && - strcmp(lun->l_path, lun2->l_path) == 0) { - log_debugx("WARNING: path \"%s\" duplicated " - "between lun \"%s\", and " - "lun \"%s\"", lun->l_path, - lun->l_name, lun2->l_name); - } - } - return (true); } bool -conf_verify(struct conf *conf) +conf::verify() { - struct auth_group *ag; - struct portal_group *pg; - struct port *port; - struct target *targ; - struct lun *lun; - bool found; - int i; + if (conf_pidfile_path.empty()) + conf_pidfile_path = DEFAULT_PIDFILE; - if (conf->conf_pidfile_path == NULL) - conf->conf_pidfile_path = checked_strdup(DEFAULT_PIDFILE); - - TAILQ_FOREACH(lun, &conf->conf_luns, l_next) { - if (!conf_verify_lun(lun)) + std::unordered_map<std::string, struct lun *> path_map; + for (const auto &kv : conf_luns) { + struct lun *lun = kv.second.get(); + if (!lun->verify()) return (false); - } - TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { - if (targ->t_auth_group == NULL) { - targ->t_auth_group = auth_group_find(conf, - "default"); - assert(targ->t_auth_group != NULL); - } - if (TAILQ_EMPTY(&targ->t_ports)) { - pg = portal_group_find(conf, "default"); - assert(pg != NULL); - port_new(conf, targ, pg); - } - found = false; - for (i = 0; i < MAX_LUNS; i++) { - if (targ->t_luns[i] != NULL) - found = true; - } - if (!found && targ->t_redirection == NULL) { - log_warnx("no LUNs defined for target \"%s\"", - targ->t_name); - } - if (found && targ->t_redirection != NULL) { - log_debugx("target \"%s\" contains luns, " - " but configured for redirection", - targ->t_name); - } - } - TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { - assert(pg->pg_name != NULL); - if (pg->pg_discovery_auth_group == NULL) { - pg->pg_discovery_auth_group = - auth_group_find(conf, "default"); - assert(pg->pg_discovery_auth_group != NULL); - } - if (pg->pg_discovery_filter == PG_FILTER_UNKNOWN) - pg->pg_discovery_filter = PG_FILTER_NONE; + const std::string &path = lun->path(); + if (path.empty()) + continue; - if (pg->pg_redirection != NULL) { - if (!TAILQ_EMPTY(&pg->pg_ports)) { - log_debugx("portal-group \"%s\" assigned " - "to target, but configured " - "for redirection", - pg->pg_name); - } - pg->pg_unassigned = false; - } else if (!TAILQ_EMPTY(&pg->pg_ports)) { - pg->pg_unassigned = false; - } else { - if (strcmp(pg->pg_name, "default") != 0) - log_warnx("portal-group \"%s\" not assigned " - "to any target", pg->pg_name); - pg->pg_unassigned = true; + const auto &pair = path_map.try_emplace(path, lun); + if (!pair.second) { + struct lun *lun2 = pair.first->second; + log_debugx("WARNING: path \"%s\" duplicated " + "between lun \"%s\", and " + "lun \"%s\"", path.c_str(), + lun->name(), lun2->name()); } } - TAILQ_FOREACH(ag, &conf->conf_auth_groups, ag_next) { - found = false; - TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { - if (targ->t_auth_group == ag) { - found = true; - break; - } - } - TAILQ_FOREACH(port, &conf->conf_ports, p_next) { - if (port->p_auth_group == ag) { - found = true; - break; - } - } - TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { - if (pg->pg_discovery_auth_group == ag) { - found = true; - break; - } - } - if (!found && ag->ag_name != NULL && - strcmp(ag->ag_name, "default") != 0 && - strcmp(ag->ag_name, "no-authentication") != 0 && - strcmp(ag->ag_name, "no-access") != 0) { + + for (auto &kv : conf_targets) { + kv.second->verify(); + } + for (auto &kv : conf_controllers) { + kv.second->verify(); + } + for (auto &kv : conf_portal_groups) { + kv.second->verify(this); + } + for (auto &kv : conf_transport_groups) { + kv.second->verify(this); + } + for (const auto &kv : conf_auth_groups) { + const std::string &ag_name = kv.first; + if (ag_name == "default" || + ag_name == "no-authentication" || + ag_name == "no-access") + continue; + + if (kv.second.use_count() == 1) { log_warnx("auth-group \"%s\" not assigned " - "to any target", ag->ag_name); + "to any target", ag_name.c_str()); } } return (true); } -static bool -portal_reuse_socket(struct portal *oldp, struct portal *newp) +bool +portal::reuse_socket(struct portal &oldp) { struct kevent kev; - if (strcmp(newp->p_listen, oldp->p_listen) != 0) + if (p_listen != oldp.p_listen) return (false); - if (oldp->p_socket <= 0) + if (!oldp.p_socket) return (false); - EV_SET(&kev, oldp->p_socket, EVFILT_READ, EV_ADD, 0, 0, newp); + EV_SET(&kev, oldp.p_socket, EVFILT_READ, EV_ADD, 0, 0, this); if (kevent(kqfd, &kev, 1, NULL, 0, NULL) == -1) return (false); - newp->p_socket = oldp->p_socket; - oldp->p_socket = 0; + p_socket = std::move(oldp.p_socket); return (true); } -static bool -portal_init_socket(struct portal *p) +bool +portal::init_socket() { - struct portal_group *pg = p->p_portal_group; + struct portal_group *pg = portal_group(); struct kevent kev; - int error, sockbuf; + freebsd::fd_up s; + int error; int one = 1; - log_debugx("listening on %s, portal-group \"%s\"", - p->p_listen, pg->pg_name); - p->p_socket = socket(p->p_ai->ai_family, p->p_ai->ai_socktype, - p->p_ai->ai_protocol); - if (p->p_socket < 0) { - log_warn("socket(2) failed for %s", - p->p_listen); +#ifdef ICL_KERNEL_PROXY + if (proxy_mode) { + int id = pg->conf()->add_proxy_portal(this); + log_debugx("listening on %s, %s \"%s\", " + "portal id %d, using ICL proxy", listen(), pg->keyword(), + pg->name(), id); + kernel_listen(ai(), protocol() == ISER, id); + return (true); + } +#endif + assert(proxy_mode == false); + assert(protocol() != portal_protocol::ISER); + + log_debugx("listening on %s, %s \"%s\"", listen(), pg->keyword(), + pg->name()); + s = ::socket(p_ai->ai_family, p_ai->ai_socktype, p_ai->ai_protocol); + if (!s) { + log_warn("socket(2) failed for %s", listen()); return (false); } - sockbuf = SOCKBUF_SIZE; - if (setsockopt(p->p_socket, SOL_SOCKET, SO_RCVBUF, &sockbuf, - sizeof(sockbuf)) == -1) - log_warn("setsockopt(SO_RCVBUF) failed for %s", - p->p_listen); - sockbuf = SOCKBUF_SIZE; - if (setsockopt(p->p_socket, SOL_SOCKET, SO_SNDBUF, &sockbuf, - sizeof(sockbuf)) == -1) - log_warn("setsockopt(SO_SNDBUF) failed for %s", p->p_listen); - if (setsockopt(p->p_socket, SOL_SOCKET, SO_NO_DDP, &one, + if (setsockopt(s, SOL_SOCKET, SO_NO_DDP, &one, sizeof(one)) == -1) - log_warn("setsockopt(SO_NO_DDP) failed for %s", p->p_listen); - error = setsockopt(p->p_socket, SOL_SOCKET, SO_REUSEADDR, &one, + log_warn("setsockopt(SO_NO_DDP) failed for %s", listen()); + error = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); if (error != 0) { - log_warn("setsockopt(SO_REUSEADDR) failed for %s", p->p_listen); - close(p->p_socket); - p->p_socket = 0; + log_warn("setsockopt(SO_REUSEADDR) failed for %s", listen()); return (false); } - if (pg->pg_dscp != -1) { + if (pg->dscp() != -1) { /* Only allow the 6-bit DSCP field to be modified */ - int tos = pg->pg_dscp << 2; - switch (p->p_ai->ai_family) { + int tos = pg->dscp() << 2; + switch (p_ai->ai_family) { case AF_INET: - if (setsockopt(p->p_socket, IPPROTO_IP, IP_TOS, + if (setsockopt(s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)) == -1) log_warn("setsockopt(IP_TOS) failed for %s", - p->p_listen); + listen()); break; case AF_INET6: - if (setsockopt(p->p_socket, IPPROTO_IPV6, IPV6_TCLASS, + if (setsockopt(s, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof(tos)) == -1) log_warn("setsockopt(IPV6_TCLASS) failed for %s", - p->p_listen); + listen()); break; } } - if (pg->pg_pcp != -1) { - int pcp = pg->pg_pcp; - switch (p->p_ai->ai_family) { + if (pg->pcp() != -1) { + int pcp = pg->pcp(); + switch (p_ai->ai_family) { case AF_INET: - if (setsockopt(p->p_socket, IPPROTO_IP, IP_VLAN_PCP, + if (setsockopt(s, IPPROTO_IP, IP_VLAN_PCP, &pcp, sizeof(pcp)) == -1) log_warn("setsockopt(IP_VLAN_PCP) failed for %s", - p->p_listen); + listen()); break; case AF_INET6: - if (setsockopt(p->p_socket, IPPROTO_IPV6, IPV6_VLAN_PCP, + if (setsockopt(s, IPPROTO_IPV6, IPV6_VLAN_PCP, &pcp, sizeof(pcp)) == -1) log_warn("setsockopt(IPV6_VLAN_PCP) failed for %s", - p->p_listen); + listen()); break; } } - error = bind(p->p_socket, p->p_ai->ai_addr, - p->p_ai->ai_addrlen); + if (!init_socket_options(s)) + return (false); + + error = bind(s, p_ai->ai_addr, p_ai->ai_addrlen); if (error != 0) { - log_warn("bind(2) failed for %s", p->p_listen); - close(p->p_socket); - p->p_socket = 0; + log_warn("bind(2) failed for %s", listen()); return (false); } - error = listen(p->p_socket, -1); + error = ::listen(s, -1); if (error != 0) { - log_warn("listen(2) failed for %s", p->p_listen); - close(p->p_socket); - p->p_socket = 0; + log_warn("listen(2) failed for %s", listen()); return (false); } - EV_SET(&kev, p->p_socket, EVFILT_READ, EV_ADD, 0, 0, p); + EV_SET(&kev, s, EVFILT_READ, EV_ADD, 0, 0, this); error = kevent(kqfd, &kev, 1, NULL, 0, NULL); if (error == -1) { - log_warn("kevent(2) failed to register for %s", p->p_listen); - close(p->p_socket); - p->p_socket = 0; + log_warn("kevent(2) failed to register for %s", listen()); return (false); } + p_socket = std::move(s); return (true); } -static int -conf_apply(struct conf *oldconf, struct conf *newconf) -{ - struct lun *oldlun, *newlun, *tmplun; - struct portal_group *oldpg, *newpg; - struct portal *oldp, *newp; - struct port *oldport, *newport, *tmpport; - struct isns *oldns, *newns; - int changed, cumulated_error = 0, error; - - if (oldconf->conf_debug != newconf->conf_debug) { - log_debugx("changing debug level to %d", newconf->conf_debug); - log_init(newconf->conf_debug); - } - - if (oldconf->conf_pidfile_path != NULL && - newconf->conf_pidfile_path != NULL) - { - if (strcmp(oldconf->conf_pidfile_path, - newconf->conf_pidfile_path) != 0) - { +bool +conf::reuse_portal_group_socket(struct portal &newp) +{ + for (auto &kv : conf_portal_groups) { + struct portal_group &pg = *kv.second; + + if (pg.reuse_socket(newp)) + return (true); + } + for (auto &kv : conf_transport_groups) { + struct portal_group &pg = *kv.second; + + if (pg.reuse_socket(newp)) + return (true); + } + return (false); +} + +int +conf::apply(struct conf *oldconf) +{ + int cumulated_error = 0; + + if (oldconf->conf_debug != conf_debug) { + log_debugx("changing debug level to %d", conf_debug); + log_init(conf_debug); + } + + /* + * On startup, oldconf created via conf_new_from_kernel will + * not contain a valid pidfile_path, and the current + * conf_pidfile will already own the pidfile. On shutdown, + * the temporary newconf will not contain a valid + * pidfile_path, and the pidfile will be cleaned up when the + * oldconf is deleted. + */ + if (!oldconf->conf_pidfile_path.empty() && + !conf_pidfile_path.empty()) { + if (oldconf->conf_pidfile_path != conf_pidfile_path) { /* pidfile has changed. rename it */ log_debugx("moving pidfile to %s", - newconf->conf_pidfile_path); - if (rename(oldconf->conf_pidfile_path, - newconf->conf_pidfile_path)) - { + conf_pidfile_path.c_str()); + if (rename(oldconf->conf_pidfile_path.c_str(), + conf_pidfile_path.c_str()) != 0) { log_err(1, "renaming pidfile %s -> %s", - oldconf->conf_pidfile_path, - newconf->conf_pidfile_path); + oldconf->conf_pidfile_path.c_str(), + conf_pidfile_path.c_str()); } } - newconf->conf_pidfh = oldconf->conf_pidfh; - oldconf->conf_pidfh = NULL; + conf_pidfile = std::move(oldconf->conf_pidfile); } /* * Go through the new portal groups, assigning tags or preserving old. */ - TAILQ_FOREACH(newpg, &newconf->conf_portal_groups, pg_next) { - if (newpg->pg_tag != 0) + for (auto &kv : conf_portal_groups) { + struct portal_group &newpg = *kv.second; + + if (newpg.tag() != 0) continue; - oldpg = portal_group_find(oldconf, newpg->pg_name); - if (oldpg != NULL) - newpg->pg_tag = oldpg->pg_tag; + auto it = oldconf->conf_portal_groups.find(kv.first); + if (it != oldconf->conf_portal_groups.end()) + newpg.set_tag(it->second->tag()); else - newpg->pg_tag = ++last_portal_group_tag; + newpg.allocate_tag(); + } + for (auto &kv : conf_transport_groups) { + struct portal_group &newpg = *kv.second; + + if (newpg.tag() != 0) + continue; + auto it = oldconf->conf_transport_groups.find(kv.first); + if (it != oldconf->conf_transport_groups.end()) + newpg.set_tag(it->second->tag()); + else + newpg.allocate_tag(); } /* Deregister on removed iSNS servers. */ - TAILQ_FOREACH(oldns, &oldconf->conf_isns, i_next) { - TAILQ_FOREACH(newns, &newconf->conf_isns, i_next) { - if (strcmp(oldns->i_addr, newns->i_addr) == 0) - break; - } - if (newns == NULL) - isns_deregister(oldns); + for (auto &kv : oldconf->conf_isns) { + if (conf_isns.count(kv.first) == 0) + oldconf->isns_deregister_targets(&kv.second); } /* * XXX: If target or lun removal fails, we should somehow "move" - * the old lun or target into newconf, so that subsequent - * conf_apply() would try to remove them again. That would + * the old lun or target into this, so that subsequent + * conf::apply() would try to remove them again. That would * be somewhat hairy, though, and lun deletion failures don't * really happen, so leave it as it is for now. */ @@ -1703,17 +2031,18 @@ conf_apply(struct conf *oldconf, struct conf *newconf) * First, remove any ports present in the old configuration * and missing in the new one. */ - TAILQ_FOREACH_SAFE(oldport, &oldconf->conf_ports, p_next, tmpport) { - if (port_is_dummy(oldport)) + for (const auto &kv : oldconf->conf_ports) { + const std::string &name = kv.first; + port *oldport = kv.second.get(); + + if (oldport->is_dummy()) continue; - newport = port_find(newconf, oldport->p_name); - if (newport != NULL && !port_is_dummy(newport)) + const auto it = conf_ports.find(name); + if (it != conf_ports.end() && !it->second->is_dummy()) continue; - log_debugx("removing port \"%s\"", oldport->p_name); - error = kernel_port_remove(oldport); - if (error != 0) { - log_warnx("failed to remove port %s", - oldport->p_name); + log_debugx("removing port \"%s\"", name.c_str()); + if (!oldport->kernel_remove()) { + log_warnx("failed to remove port %s", name.c_str()); /* * XXX: Uncomment after fixing the root cause. * @@ -1726,221 +2055,156 @@ conf_apply(struct conf *oldconf, struct conf *newconf) * Second, remove any LUNs present in the old configuration * and missing in the new one. */ - TAILQ_FOREACH_SAFE(oldlun, &oldconf->conf_luns, l_next, tmplun) { - newlun = lun_find(newconf, oldlun->l_name); - if (newlun == NULL) { + for (auto it = oldconf->conf_luns.begin(); + it != oldconf->conf_luns.end(); ) { + struct lun *oldlun = it->second.get(); + + auto newit = conf_luns.find(it->first); + if (newit == conf_luns.end()) { log_debugx("lun \"%s\", CTL lun %d " "not found in new configuration; " - "removing", oldlun->l_name, oldlun->l_ctl_lun); - error = kernel_lun_remove(oldlun); - if (error != 0) { + "removing", oldlun->name(), oldlun->ctl_lun()); + if (!oldlun->kernel_remove()) { log_warnx("failed to remove lun \"%s\", " "CTL lun %d", - oldlun->l_name, oldlun->l_ctl_lun); + oldlun->name(), oldlun->ctl_lun()); cumulated_error++; } + it++; continue; } /* * Also remove the LUNs changed by more than size. */ - changed = 0; - assert(oldlun->l_backend != NULL); - assert(newlun->l_backend != NULL); - if (strcmp(newlun->l_backend, oldlun->l_backend) != 0) { - log_debugx("backend for lun \"%s\", " - "CTL lun %d changed; removing", - oldlun->l_name, oldlun->l_ctl_lun); - changed = 1; - } - if (oldlun->l_blocksize != newlun->l_blocksize) { - log_debugx("blocksize for lun \"%s\", " - "CTL lun %d changed; removing", - oldlun->l_name, oldlun->l_ctl_lun); - changed = 1; - } - if (newlun->l_device_id != NULL && - (oldlun->l_device_id == NULL || - strcmp(oldlun->l_device_id, newlun->l_device_id) != - 0)) { - log_debugx("device-id for lun \"%s\", " - "CTL lun %d changed; removing", - oldlun->l_name, oldlun->l_ctl_lun); - changed = 1; - } - if (newlun->l_path != NULL && - (oldlun->l_path == NULL || - strcmp(oldlun->l_path, newlun->l_path) != 0)) { - log_debugx("path for lun \"%s\", " - "CTL lun %d, changed; removing", - oldlun->l_name, oldlun->l_ctl_lun); - changed = 1; - } - if (newlun->l_serial != NULL && - (oldlun->l_serial == NULL || - strcmp(oldlun->l_serial, newlun->l_serial) != 0)) { - log_debugx("serial for lun \"%s\", " - "CTL lun %d changed; removing", - oldlun->l_name, oldlun->l_ctl_lun); - changed = 1; - } - if (changed) { - error = kernel_lun_remove(oldlun); - if (error != 0) { + struct lun *newlun = newit->second.get(); + if (oldlun->changed(*newlun)) { + if (!oldlun->kernel_remove()) { log_warnx("failed to remove lun \"%s\", " "CTL lun %d", - oldlun->l_name, oldlun->l_ctl_lun); + oldlun->name(), oldlun->ctl_lun()); cumulated_error++; } - lun_delete(oldlun); + + /* + * Delete the lun from the old configuration + * so it is added as a new LUN below. + */ + it = oldconf->conf_luns.erase(it); continue; } - newlun->l_ctl_lun = oldlun->l_ctl_lun; + newlun->set_ctl_lun(oldlun->ctl_lun()); + it++; } - TAILQ_FOREACH_SAFE(newlun, &newconf->conf_luns, l_next, tmplun) { - oldlun = lun_find(oldconf, newlun->l_name); - if (oldlun != NULL) { + for (auto it = conf_luns.begin(); it != conf_luns.end(); ) { + struct lun *newlun = it->second.get(); + + auto oldit = oldconf->conf_luns.find(it->first); + if (oldit != oldconf->conf_luns.end()) { log_debugx("modifying lun \"%s\", CTL lun %d", - newlun->l_name, newlun->l_ctl_lun); - error = kernel_lun_modify(newlun); - if (error != 0) { + newlun->name(), newlun->ctl_lun()); + if (!newlun->kernel_modify()) { log_warnx("failed to " "modify lun \"%s\", CTL lun %d", - newlun->l_name, newlun->l_ctl_lun); + newlun->name(), newlun->ctl_lun()); cumulated_error++; } + it++; continue; } - log_debugx("adding lun \"%s\"", newlun->l_name); - error = kernel_lun_add(newlun); - if (error != 0) { - log_warnx("failed to add lun \"%s\"", newlun->l_name); - lun_delete(newlun); + + log_debugx("adding lun \"%s\"", newlun->name()); + if (!newlun->kernel_add()) { + log_warnx("failed to add lun \"%s\"", newlun->name()); + delete_target_luns(newlun); + it = conf_luns.erase(it); cumulated_error++; - } + } else + it++; } /* * Now add new ports or modify existing ones. */ - TAILQ_FOREACH_SAFE(newport, &newconf->conf_ports, p_next, tmpport) { - if (port_is_dummy(newport)) + for (auto it = conf_ports.begin(); it != conf_ports.end(); ) { + const std::string &name = it->first; + port *newport = it->second.get(); + + if (newport->is_dummy()) { + it++; continue; - oldport = port_find(oldconf, newport->p_name); + } + const auto oldit = oldconf->conf_ports.find(name); + if (oldit == oldconf->conf_ports.end() || + oldit->second->is_dummy()) { + log_debugx("adding port \"%s\"", name.c_str()); + if (!newport->kernel_add()) { + log_warnx("failed to add port %s", + name.c_str()); + + /* + * XXX: Uncomment after fixing the + * root cause. + * + * cumulated_error++; + */ - if (oldport == NULL || port_is_dummy(oldport)) { - log_debugx("adding port \"%s\"", newport->p_name); - error = kernel_port_add(newport); + /* + * conf "owns" the port, but other + * objects contain pointers to this + * port that must be removed before + * deleting the port. + */ + newport->clear_references(); + it = conf_ports.erase(it); + } else + it++; } else { - log_debugx("updating port \"%s\"", newport->p_name); - newport->p_ctl_port = oldport->p_ctl_port; - error = kernel_port_update(newport, oldport); - } - if (error != 0) { - log_warnx("failed to %s port %s", - (oldport == NULL) ? "add" : "update", - newport->p_name); - if (oldport == NULL || port_is_dummy(oldport)) - port_delete(newport); - /* - * XXX: Uncomment after fixing the root cause. - * - * cumulated_error++; - */ + log_debugx("updating port \"%s\"", name.c_str()); + if (!newport->kernel_update(oldit->second.get())) + log_warnx("failed to update port %s", + name.c_str()); + it++; } } /* * Go through the new portals, opening the sockets as necessary. */ - TAILQ_FOREACH(newpg, &newconf->conf_portal_groups, pg_next) { - if (newpg->pg_foreign) - continue; - if (newpg->pg_unassigned) { - log_debugx("not listening on portal-group \"%s\", " - "not assigned to any target", - newpg->pg_name); - continue; - } - TAILQ_FOREACH(newp, &newpg->pg_portals, p_next) { - /* - * Try to find already open portal and reuse - * the listening socket. We don't care about - * what portal or portal group that was, what - * matters is the listening address. - */ - TAILQ_FOREACH(oldpg, &oldconf->conf_portal_groups, - pg_next) { - TAILQ_FOREACH(oldp, &oldpg->pg_portals, - p_next) { - if (portal_reuse_socket(oldp, newp)) - goto reused; - } - } - reused: - if (newp->p_socket > 0) { - /* - * We're done with this portal. - */ - continue; - } - -#ifdef ICL_KERNEL_PROXY - if (proxy_mode) { - newpg->pg_conf->conf_portal_id++; - newp->p_id = newpg->pg_conf->conf_portal_id; - log_debugx("listening on %s, portal-group " - "\"%s\", portal id %d, using ICL proxy", - newp->p_listen, newpg->pg_name, newp->p_id); - kernel_listen(newp->p_ai, newp->p_iser, - newp->p_id); - continue; - } -#endif - assert(proxy_mode == false); - assert(newp->p_iser == false); - - if (!portal_init_socket(newp)) { - cumulated_error++; - continue; - } - } + for (auto &kv : conf_portal_groups) { + cumulated_error += kv.second->open_sockets(*oldconf); + } + for (auto &kv : conf_transport_groups) { + cumulated_error += kv.second->open_sockets(*oldconf); } /* * Go through the no longer used sockets, closing them. */ - TAILQ_FOREACH(oldpg, &oldconf->conf_portal_groups, pg_next) { - TAILQ_FOREACH(oldp, &oldpg->pg_portals, p_next) { - if (oldp->p_socket <= 0) - continue; - log_debugx("closing socket for %s, portal-group \"%s\"", - oldp->p_listen, oldpg->pg_name); - close(oldp->p_socket); - oldp->p_socket = 0; - } + for (auto &kv : oldconf->conf_portal_groups) { + kv.second->close_sockets(); + } + for (auto &kv : oldconf->conf_transport_groups) { + kv.second->close_sockets(); } /* (Re-)Register on remaining/new iSNS servers. */ - TAILQ_FOREACH(newns, &newconf->conf_isns, i_next) { - TAILQ_FOREACH(oldns, &oldconf->conf_isns, i_next) { - if (strcmp(oldns->i_addr, newns->i_addr) == 0) - break; - } - isns_register(newns, oldns); + for (auto &kv : conf_isns) { + auto it = oldconf->conf_isns.find(kv.first); + if (it == oldconf->conf_isns.end()) + isns_register_targets(&kv.second, nullptr); + else + isns_register_targets(&kv.second, oldconf); } - /* Schedule iSNS update */ - if (!TAILQ_EMPTY(&newconf->conf_isns)) - set_timeout((newconf->conf_isns_period + 2) / 3, false); + isns_schedule_update(); return (cumulated_error); } -static bool +bool timed_out(void) { @@ -1975,19 +2239,28 @@ sigalrm_handler(int dummy __unused) } void -set_timeout(int timeout, int fatal) +stop_timer() +{ + struct itimerval itv; + int error; + + log_debugx("session timeout disabled"); + bzero(&itv, sizeof(itv)); + error = setitimer(ITIMER_REAL, &itv, NULL); + if (error != 0) + log_err(1, "setitimer"); + sigalrm_received = false; +} + +void +start_timer(int timeout, bool fatal) { struct sigaction sa; struct itimerval itv; int error; if (timeout <= 0) { - log_debugx("session timeout disabled"); - bzero(&itv, sizeof(itv)); - error = setitimer(ITIMER_REAL, &itv, NULL); - if (error != 0) - log_err(1, "setitimer"); - sigalrm_received = false; + stop_timer(); return; } @@ -2003,7 +2276,7 @@ set_timeout(int timeout, int fatal) log_err(1, "sigaction"); /* - * First SIGALRM will arive after conf_timeout seconds. + * First SIGALRM will arive after timeout seconds. * If we do nothing, another one will arrive a second later. */ log_debugx("setting session timeout to %d seconds", timeout); @@ -2048,16 +2321,17 @@ wait_for_children(bool block) } static void -handle_connection(struct portal *portal, int fd, +handle_connection(struct portal *portal, freebsd::fd_up fd, const struct sockaddr *client_sa, bool dont_fork) { - struct ctld_connection *conn; + struct portal_group *pg; int error; pid_t pid; char host[NI_MAXHOST + 1]; struct conf *conf; - conf = portal->p_portal_group->pg_conf; + pg = portal->portal_group(); + conf = pg->conf(); if (dont_fork) { log_debugx("incoming connection; not forking due to -d flag"); @@ -2065,9 +2339,10 @@ handle_connection(struct portal *portal, int fd, nchildren -= wait_for_children(false); assert(nchildren >= 0); - while (conf->conf_maxproc > 0 && nchildren >= conf->conf_maxproc) { + while (conf->maxproc() > 0 && nchildren >= conf->maxproc()) { log_debugx("maxproc limit of %d child processes hit; " - "waiting for child process to exit", conf->conf_maxproc); + "waiting for child process to exit", + conf->maxproc()); nchildren -= wait_for_children(true); assert(nchildren >= 0); } @@ -2077,11 +2352,9 @@ handle_connection(struct portal *portal, int fd, pid = fork(); if (pid < 0) log_err(1, "fork"); - if (pid > 0) { - close(fd); + if (pid > 0) return; - } - pidfile_close(conf->conf_pidfh); + conf->close_pidfile(); } error = getnameinfo(client_sa, client_sa->sa_len, @@ -2090,21 +2363,11 @@ handle_connection(struct portal *portal, int fd, log_errx(1, "getnameinfo: %s", gai_strerror(error)); log_debugx("accepted connection from %s; portal group \"%s\"", - host, portal->p_portal_group->pg_name); + host, pg->name()); log_set_peer_addr(host); setproctitle("%s", host); - conn = connection_new(portal, fd, host, client_sa); - set_timeout(conf->conf_timeout, true); - kernel_capsicate(); - login(conn); - if (conn->conn_session_type == CONN_SESSION_TYPE_NORMAL) { - kernel_handoff(conn); - log_debugx("connection handed off to the kernel"); - } else { - assert(conn->conn_session_type == CONN_SESSION_TYPE_DISCOVERY); - discovery(conn); - } + portal->handle_connection(std::move(fd), host, client_sa); log_debugx("nothing more to do; exiting"); exit(0); } @@ -2135,18 +2398,12 @@ main_loop(bool dont_fork) log_debugx("incoming connection, id %d, portal id %d", connection_id, portal_id); - TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { - TAILQ_FOREACH(portal, &pg->pg_portals, p_next) { - if (portal->p_id == portal_id) { - goto found; - } - } - } - - log_errx(1, "kernel returned invalid portal_id %d", - portal_id); + portal = conf->proxy_portal(portal_id); + if (portal == nullptr) + log_errx(1, + "kernel returned invalid portal_id %d", + portal_id); -found: handle_connection(portal, connection_id, (struct sockaddr *)&client_sa, dont_fork); } else { @@ -2163,10 +2420,10 @@ found: switch (kev.filter) { case EVFILT_READ: portal = reinterpret_cast<struct portal *>(kev.udata); - assert(portal->p_socket == (int)kev.ident); + assert(portal->socket() == (int)kev.ident); client_salen = sizeof(client_sa); - client_fd = accept(portal->p_socket, + client_fd = accept(portal->socket(), (struct sockaddr *)&client_sa, &client_salen); if (client_fd < 0) { @@ -2270,33 +2527,35 @@ check_perms(const char *path) */ } -static struct conf * +static conf_up conf_new_from_file(const char *path, bool ucl) { - struct conf *conf; struct auth_group *ag; struct portal_group *pg; bool valid; log_debugx("obtaining configuration from %s", path); - conf = conf_new(); + conf_up conf = std::make_unique<struct conf>(); - ag = auth_group_new(conf, "default"); + ag = conf->add_auth_group("default"); assert(ag != NULL); - ag = auth_group_new(conf, "no-authentication"); + ag = conf->add_auth_group("no-authentication"); assert(ag != NULL); - ag->ag_type = AG_TYPE_NO_AUTHENTICATION; + ag->set_type(auth_type::NO_AUTHENTICATION); - ag = auth_group_new(conf, "no-access"); + ag = conf->add_auth_group("no-access"); assert(ag != NULL); - ag->ag_type = AG_TYPE_DENY; + ag->set_type(auth_type::DENY); - pg = portal_group_new(conf, "default"); + pg = conf->add_portal_group("default"); assert(pg != NULL); - conf_start(conf); + pg = conf->add_transport_group("default"); + assert(pg != NULL); + + conf_start(conf.get()); if (ucl) valid = uclparse_conf(path); else @@ -2304,34 +2563,39 @@ conf_new_from_file(const char *path, bool ucl) conf_finish(); if (!valid) { - conf_delete(conf); - return (NULL); + conf.reset(); + return {}; } check_perms(path); - if (conf->conf_default_ag_defined == false) { + if (!conf->default_auth_group_defined()) { log_debugx("auth-group \"default\" not defined; " "going with defaults"); - ag = auth_group_find(conf, "default"); + ag = conf->find_auth_group("default").get(); assert(ag != NULL); - ag->ag_type = AG_TYPE_DENY; + ag->set_type(auth_type::DENY); } - if (conf->conf_default_pg_defined == false) { + if (!conf->default_portal_group_defined()) { log_debugx("portal-group \"default\" not defined; " "going with defaults"); - pg = portal_group_find(conf, "default"); + pg = conf->find_portal_group("default"); assert(pg != NULL); - portal_group_add_portal(pg, "0.0.0.0", false); - portal_group_add_portal(pg, "[::]", false); + pg->add_default_portals(); } - conf->conf_kernel_port_on = true; + if (!conf->default_portal_group_defined()) { + log_debugx("transport-group \"default\" not defined; " + "going with defaults"); + pg = conf->find_transport_group("default"); + assert(pg != NULL); + pg->add_default_portals(); + } - if (!conf_verify(conf)) { - conf_delete(conf); - return (NULL); + if (!conf->verify()) { + conf.reset(); + return {}; } return (conf); @@ -2341,46 +2605,44 @@ conf_new_from_file(const char *path, bool ucl) * If the config file specifies physical ports for any target, associate them * with the config file. If necessary, create them. */ -static bool -new_pports_from_conf(struct conf *conf, struct kports *kports) +bool +conf::add_pports(struct kports &kports) { - struct target *targ; struct pport *pp; - struct port *tp; int ret, i_pp, i_vp; - TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { - if (!targ->t_pport) + for (auto &kv : conf_targets) { + struct target *targ = kv.second.get(); + + if (!targ->has_pport()) continue; - ret = sscanf(targ->t_pport, "ioctl/%d/%d", &i_pp, &i_vp); + ret = sscanf(targ->pport(), "ioctl/%d/%d", &i_pp, &i_vp); if (ret > 0) { - tp = port_new_ioctl(conf, kports, targ, i_pp, i_vp); - if (tp == NULL) { + if (!add_port(kports, targ, i_pp, i_vp)) { log_warnx("can't create new ioctl port " - "for target \"%s\"", targ->t_name); + "for %s", targ->label()); return (false); } continue; } - pp = pport_find(kports, targ->t_pport); + pp = kports.find_port(targ->pport()); if (pp == NULL) { - log_warnx("unknown port \"%s\" for target \"%s\"", - targ->t_pport, targ->t_name); + log_warnx("unknown port \"%s\" for %s", + targ->pport(), targ->label()); return (false); } - if (!TAILQ_EMPTY(&pp->pp_ports)) { - log_warnx("can't link port \"%s\" to target \"%s\", " + if (pp->linked()) { + log_warnx("can't link port \"%s\" to %s, " "port already linked to some target", - targ->t_pport, targ->t_name); + targ->pport(), targ->label()); return (false); } - tp = port_new_pp(conf, targ, pp); - if (tp == NULL) { - log_warnx("can't link port \"%s\" to target \"%s\"", - targ->t_pport, targ->t_name); + if (!add_port(targ, pp)) { + log_warnx("can't link port \"%s\" to %s", + targ->pport(), targ->label()); return (false); } } @@ -2391,11 +2653,8 @@ int main(int argc, char **argv) { struct kports kports; - struct conf *oldconf, *newconf, *tmpconf; - struct isns *newns; const char *config_path = DEFAULT_CONFIG_PATH; int debug = 0, ch, error; - pid_t otherpid; bool daemonize = true; bool test_config = false; bool use_ucl = false; @@ -2434,8 +2693,7 @@ main(int argc, char **argv) log_init(debug); kernel_init(); - TAILQ_INIT(&kports.pports); - newconf = conf_new_from_file(config_path, use_ucl); + conf_up newconf = conf_new_from_file(config_path, use_ucl); if (newconf == NULL) log_errx(1, "configuration error; exiting"); @@ -2443,85 +2701,69 @@ main(int argc, char **argv) if (test_config) return (0); - assert(newconf->conf_pidfile_path != NULL); - log_debugx("opening pidfile %s", newconf->conf_pidfile_path); - newconf->conf_pidfh = pidfile_open(newconf->conf_pidfile_path, 0600, - &otherpid); - if (newconf->conf_pidfh == NULL) { - if (errno == EEXIST) - log_errx(1, "daemon already running, pid: %jd.", - (intmax_t)otherpid); - log_err(1, "cannot open or create pidfile \"%s\"", - newconf->conf_pidfile_path); - } + newconf->open_pidfile(); register_signals(); - oldconf = conf_new_from_kernel(&kports); + conf_up oldconf = conf_new_from_kernel(kports); if (debug > 0) { - oldconf->conf_debug = debug; - newconf->conf_debug = debug; + oldconf->set_debug(debug); + newconf->set_debug(debug); } - if (!new_pports_from_conf(newconf, &kports)) + if (!newconf->add_pports(kports)) log_errx(1, "Error associating physical ports; exiting"); if (daemonize) { log_debugx("daemonizing"); if (daemon(0, 0) == -1) { log_warn("cannot daemonize"); - pidfile_remove(newconf->conf_pidfh); - exit(1); + return (1); } } kqfd = kqueue(); if (kqfd == -1) { log_warn("Cannot create kqueue"); - pidfile_remove(newconf->conf_pidfh); - exit(1); + return (1); } - error = conf_apply(oldconf, newconf); + error = newconf->apply(oldconf.get()); if (error != 0) log_errx(1, "failed to apply configuration; exiting"); - conf_delete(oldconf); - oldconf = NULL; + oldconf.reset(); - pidfile_write(newconf->conf_pidfh); + newconf->write_pidfile(); - /* Schedule iSNS update */ - if (!TAILQ_EMPTY(&newconf->conf_isns)) - set_timeout((newconf->conf_isns_period + 2) / 3, false); + newconf->isns_schedule_update(); for (;;) { main_loop(!daemonize); if (sighup_received) { sighup_received = false; log_debugx("received SIGHUP, reloading configuration"); - tmpconf = conf_new_from_file(config_path, use_ucl); + conf_up tmpconf = conf_new_from_file(config_path, + use_ucl); if (tmpconf == NULL) { log_warnx("configuration error, " "continuing with old configuration"); - } else if (!new_pports_from_conf(tmpconf, &kports)) { + } else if (!tmpconf->add_pports(kports)) { log_warnx("Error associating physical ports, " "continuing with old configuration"); - conf_delete(tmpconf); } else { if (debug > 0) - tmpconf->conf_debug = debug; - oldconf = newconf; - newconf = tmpconf; + tmpconf->set_debug(debug); + oldconf = std::move(newconf); + newconf = std::move(tmpconf); - error = conf_apply(oldconf, newconf); + error = newconf->apply(oldconf.get()); if (error != 0) log_warnx("failed to reload " "configuration"); - conf_delete(oldconf); - oldconf = NULL; + oldconf.reset(); } } else if (sigterm_received) { log_debugx("exiting on signal; " @@ -2530,36 +2772,22 @@ main(int argc, char **argv) log_debugx("removing CTL iSCSI ports " "and terminating all connections"); - oldconf = newconf; - newconf = conf_new(); + oldconf = std::move(newconf); + newconf = std::make_unique<conf>(); if (debug > 0) - newconf->conf_debug = debug; - error = conf_apply(oldconf, newconf); + newconf->set_debug(debug); + error = newconf->apply(oldconf.get()); if (error != 0) log_warnx("failed to apply configuration"); - if (oldconf->conf_pidfh) { - pidfile_remove(oldconf->conf_pidfh); - oldconf->conf_pidfh = NULL; - } - conf_delete(newconf); - conf_delete(oldconf); - oldconf = NULL; + oldconf.reset(); log_warnx("exiting on signal"); - exit(0); + return (0); } else { nchildren -= wait_for_children(false); assert(nchildren >= 0); if (timed_out()) { - set_timeout(0, false); - TAILQ_FOREACH(newns, &newconf->conf_isns, i_next) - isns_check(newns); - /* Schedule iSNS update */ - if (!TAILQ_EMPTY(&newconf->conf_isns)) { - set_timeout((newconf->conf_isns_period - + 2) / 3, - false); - } + newconf->isns_update(); } } } diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h deleted file mode 100644 index 2cc9139fed1d..000000000000 --- a/usr.sbin/ctld/ctld.h +++ /dev/null @@ -1,362 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2012 The FreeBSD Foundation - * - * This software was developed by Edward Tomasz Napierala under sponsorship - * from the FreeBSD Foundation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef CTLD_H -#define CTLD_H - -#include <sys/_nv.h> -#include <sys/queue.h> -#ifdef ICL_KERNEL_PROXY -#include <sys/types.h> -#endif -#include <sys/socket.h> -#include <stdbool.h> -#include <libiscsiutil.h> -#include <libutil.h> - -#define DEFAULT_CONFIG_PATH "/etc/ctl.conf" -#define DEFAULT_PIDFILE "/var/run/ctld.pid" -#define DEFAULT_BLOCKSIZE 512 -#define DEFAULT_CD_BLOCKSIZE 2048 - -#define MAX_LUNS 1024 -#define SOCKBUF_SIZE 1048576 - -struct auth { - TAILQ_ENTRY(auth) a_next; - struct auth_group *a_auth_group; - char *a_user; - char *a_secret; - char *a_mutual_user; - char *a_mutual_secret; -}; - -struct auth_name { - TAILQ_ENTRY(auth_name) an_next; - struct auth_group *an_auth_group; - char *an_initiator_name; -}; - -struct auth_portal { - TAILQ_ENTRY(auth_portal) ap_next; - struct auth_group *ap_auth_group; - char *ap_initiator_portal; - struct sockaddr_storage ap_sa; - int ap_mask; -}; - -#define AG_TYPE_UNKNOWN 0 -#define AG_TYPE_DENY 1 -#define AG_TYPE_NO_AUTHENTICATION 2 -#define AG_TYPE_CHAP 3 -#define AG_TYPE_CHAP_MUTUAL 4 - -struct auth_group { - TAILQ_ENTRY(auth_group) ag_next; - struct conf *ag_conf; - char *ag_name; - char *ag_label; - int ag_type; - TAILQ_HEAD(, auth) ag_auths; - TAILQ_HEAD(, auth_name) ag_names; - TAILQ_HEAD(, auth_portal) ag_portals; -}; - -struct portal { - TAILQ_ENTRY(portal) p_next; - struct portal_group *p_portal_group; - bool p_iser; - char *p_listen; - struct addrinfo *p_ai; -#ifdef ICL_KERNEL_PROXY - int p_id; -#endif - - TAILQ_HEAD(, target) p_targets; - int p_socket; -}; - -#define PG_FILTER_UNKNOWN 0 -#define PG_FILTER_NONE 1 -#define PG_FILTER_PORTAL 2 -#define PG_FILTER_PORTAL_NAME 3 -#define PG_FILTER_PORTAL_NAME_AUTH 4 - -struct portal_group { - TAILQ_ENTRY(portal_group) pg_next; - struct conf *pg_conf; - nvlist_t *pg_options; - char *pg_name; - struct auth_group *pg_discovery_auth_group; - int pg_discovery_filter; - bool pg_foreign; - bool pg_unassigned; - TAILQ_HEAD(, portal) pg_portals; - TAILQ_HEAD(, port) pg_ports; - char *pg_offload; - char *pg_redirection; - int pg_dscp; - int pg_pcp; - - uint16_t pg_tag; -}; - -/* Ports created by the kernel. Perhaps the "p" means "physical" ? */ -struct pport { - TAILQ_ENTRY(pport) pp_next; - TAILQ_HEAD(, port) pp_ports; - struct kports *pp_kports; - char *pp_name; - - uint32_t pp_ctl_port; -}; - -struct port { - TAILQ_ENTRY(port) p_next; - TAILQ_ENTRY(port) p_pgs; - TAILQ_ENTRY(port) p_pps; - TAILQ_ENTRY(port) p_ts; - struct conf *p_conf; - char *p_name; - struct auth_group *p_auth_group; - struct portal_group *p_portal_group; - struct pport *p_pport; - struct target *p_target; - - bool p_ioctl_port; - int p_ioctl_pp; - int p_ioctl_vp; - uint32_t p_ctl_port; -}; - -struct lun { - TAILQ_ENTRY(lun) l_next; - struct conf *l_conf; - nvlist_t *l_options; - char *l_name; - char *l_backend; - uint8_t l_device_type; - int l_blocksize; - char *l_device_id; - char *l_path; - char *l_scsiname; - char *l_serial; - uint64_t l_size; - - int l_ctl_lun; -}; - -struct target { - TAILQ_ENTRY(target) t_next; - struct conf *t_conf; - struct lun *t_luns[MAX_LUNS]; - struct auth_group *t_auth_group; - TAILQ_HEAD(, port) t_ports; - char *t_name; - char *t_alias; - char *t_redirection; - /* Name of this target's physical port, if any, i.e. "isp0" */ - char *t_pport; -}; - -struct isns { - TAILQ_ENTRY(isns) i_next; - struct conf *i_conf; - char *i_addr; - struct addrinfo *i_ai; -}; - -struct conf { - char *conf_pidfile_path; - TAILQ_HEAD(, lun) conf_luns; - TAILQ_HEAD(, target) conf_targets; - TAILQ_HEAD(, auth_group) conf_auth_groups; - TAILQ_HEAD(, port) conf_ports; - TAILQ_HEAD(, portal_group) conf_portal_groups; - TAILQ_HEAD(, isns) conf_isns; - int conf_isns_period; - int conf_isns_timeout; - int conf_debug; - int conf_timeout; - int conf_maxproc; - -#ifdef ICL_KERNEL_PROXY - int conf_portal_id; -#endif - struct pidfh *conf_pidfh; - - bool conf_default_pg_defined; - bool conf_default_ag_defined; - bool conf_kernel_port_on; -}; - -/* Physical ports exposed by the kernel */ -struct kports { - TAILQ_HEAD(, pport) pports; -}; - -#define CONN_SESSION_TYPE_NONE 0 -#define CONN_SESSION_TYPE_DISCOVERY 1 -#define CONN_SESSION_TYPE_NORMAL 2 - -struct ctld_connection { - struct connection conn; - struct portal *conn_portal; - struct port *conn_port; - struct target *conn_target; - int conn_session_type; - char *conn_initiator_name; - char *conn_initiator_addr; - char *conn_initiator_alias; - uint8_t conn_initiator_isid[6]; - struct sockaddr_storage conn_initiator_sa; - int conn_max_recv_data_segment_limit; - int conn_max_send_data_segment_limit; - int conn_max_burst_limit; - int conn_first_burst_limit; - const char *conn_user; - struct chap *conn_chap; -}; - -extern int ctl_fd; - -bool uclparse_conf(const char *path); - -struct conf *conf_new(void); -struct conf *conf_new_from_kernel(struct kports *kports); -void conf_delete(struct conf *conf); -void conf_finish(void); -void conf_start(struct conf *new_conf); -bool conf_verify(struct conf *conf); - -struct auth_group *auth_group_new(struct conf *conf, const char *name); -struct auth_group *auth_group_new(struct conf *conf, - struct target *target); -void auth_group_delete(struct auth_group *ag); -struct auth_group *auth_group_find(const struct conf *conf, - const char *name); - -bool auth_new_chap(struct auth_group *ag, const char *user, - const char *secret); -bool auth_new_chap_mutual(struct auth_group *ag, - const char *user, const char *secret, - const char *user2, const char *secret2); -const struct auth *auth_find(const struct auth_group *ag, - const char *user); - -bool auth_name_new(struct auth_group *ag, - const char *initiator_name); -bool auth_name_defined(const struct auth_group *ag); -const struct auth_name *auth_name_find(const struct auth_group *ag, - const char *initiator_name); -bool auth_name_check(const struct auth_group *ag, - const char *initiator_name); - -bool auth_portal_new(struct auth_group *ag, - const char *initiator_portal); -bool auth_portal_defined(const struct auth_group *ag); -const struct auth_portal *auth_portal_find(const struct auth_group *ag, - const struct sockaddr_storage *sa); -bool auth_portal_check(const struct auth_group *ag, - const struct sockaddr_storage *sa); - -struct portal_group *portal_group_new(struct conf *conf, const char *name); -void portal_group_delete(struct portal_group *pg); -struct portal_group *portal_group_find(const struct conf *conf, - const char *name); -bool portal_group_add_portal(struct portal_group *pg, - const char *value, bool iser); - -bool isns_new(struct conf *conf, const char *addr); -void isns_delete(struct isns *is); -void isns_register(struct isns *isns, struct isns *oldisns); -void isns_check(struct isns *isns); -void isns_deregister(struct isns *isns); - -struct pport *pport_new(struct kports *kports, const char *name, - uint32_t ctl_port); -struct pport *pport_find(const struct kports *kports, - const char *name); -struct pport *pport_copy(struct pport *pp, struct kports *kports); -void pport_delete(struct pport *pport); - -struct port *port_new(struct conf *conf, struct target *target, - struct portal_group *pg); -struct port *port_new_ioctl(struct conf *conf, - struct kports *kports, struct target *target, - int pp, int vp); -struct port *port_new_pp(struct conf *conf, struct target *target, - struct pport *pp); -struct port *port_find(const struct conf *conf, const char *name); -struct port *port_find_in_pg(const struct portal_group *pg, - const char *target); -void port_delete(struct port *port); -bool port_is_dummy(struct port *port); - -struct target *target_new(struct conf *conf, const char *name); -void target_delete(struct target *target); -struct target *target_find(struct conf *conf, - const char *name); - -struct lun *lun_new(struct conf *conf, const char *name); -void lun_delete(struct lun *lun); -struct lun *lun_find(const struct conf *conf, const char *name); -void lun_set_scsiname(struct lun *lun, const char *value); - -bool option_new(nvlist_t *nvl, - const char *name, const char *value); - -void kernel_init(void); -int kernel_lun_add(struct lun *lun); -int kernel_lun_modify(struct lun *lun); -int kernel_lun_remove(struct lun *lun); -void kernel_handoff(struct ctld_connection *conn); -int kernel_port_add(struct port *port); -int kernel_port_update(struct port *port, struct port *old); -int kernel_port_remove(struct port *port); -void kernel_capsicate(void); - -#ifdef ICL_KERNEL_PROXY -void kernel_listen(struct addrinfo *ai, bool iser, - int portal_id); -void kernel_accept(int *connection_id, int *portal_id, - struct sockaddr *client_sa, - socklen_t *client_salen); -void kernel_send(struct pdu *pdu); -void kernel_receive(struct pdu *pdu); -#endif - -void login(struct ctld_connection *conn); - -void discovery(struct ctld_connection *conn); - -void set_timeout(int timeout, int fatal); - -#endif /* !CTLD_H */ diff --git a/usr.sbin/ctld/ctld.hh b/usr.sbin/ctld/ctld.hh new file mode 100644 index 000000000000..a5aab65e339b --- /dev/null +++ b/usr.sbin/ctld/ctld.hh @@ -0,0 +1,637 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2012 The FreeBSD Foundation + * + * This software was developed by Edward Tomasz Napierala under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef __CTLD_HH__ +#define __CTLD_HH__ + +#include <sys/_nv.h> +#include <sys/queue.h> +#ifdef ICL_KERNEL_PROXY +#include <sys/types.h> +#endif +#include <sys/socket.h> +#include <stdbool.h> +#include <libiscsiutil.h> +#include <libutil.h> + +#include <array> +#include <list> +#include <memory> +#include <string> +#include <string_view> +#include <unordered_map> +#include <unordered_set> +#include <libutil++.hh> + +#define DEFAULT_CONFIG_PATH "/etc/ctl.conf" +#define DEFAULT_PIDFILE "/var/run/ctld.pid" +#define DEFAULT_BLOCKSIZE 512 +#define DEFAULT_CD_BLOCKSIZE 2048 + +#define MAX_LUNS 1024 + +struct isns_req; +struct port; + +struct auth { + auth(std::string_view secret) : a_secret(secret) {} + auth(std::string_view secret, std::string_view mutual_user, + std::string_view mutual_secret) : + a_secret(secret), a_mutual_user(mutual_user), + a_mutual_secret(mutual_secret) {} + + bool mutual() const { return !a_mutual_user.empty(); } + + const char *secret() const { return a_secret.c_str(); } + const char *mutual_user() const { return a_mutual_user.c_str(); } + const char *mutual_secret() const { return a_mutual_secret.c_str(); } + +private: + std::string a_secret; + std::string a_mutual_user; + std::string a_mutual_secret; +}; + +struct auth_portal { + bool matches(const struct sockaddr *sa) const; + bool parse(const char *portal); + +private: + struct sockaddr_storage ap_sa; + int ap_mask = 0; +}; + +enum class auth_type { + UNKNOWN, + DENY, + NO_AUTHENTICATION, + CHAP, + CHAP_MUTUAL +}; + +struct auth_group { + auth_group(std::string label) : ag_label(label) {} + + auth_type type() const { return ag_type; } + bool set_type(const char *str); + void set_type(auth_type type); + + const char *label() const { return ag_label.c_str(); } + + bool add_chap(const char *user, const char *secret); + bool add_chap_mutual(const char *user, const char *secret, + const char *user2, const char *secret2); + const struct auth *find_auth(std::string_view user) const; + + bool add_host_nqn(std::string_view nqn); + bool host_permitted(std::string_view nqn) const; + + bool add_host_address(const char *address); + bool host_permitted(const struct sockaddr *sa) const; + + bool add_initiator_name(std::string_view initiator_name); + bool initiator_permitted(std::string_view initiator_name) const; + + bool add_initiator_portal(const char *initiator_portal); + bool initiator_permitted(const struct sockaddr *sa) const; + +private: + void check_secret_length(const char *user, const char *secret, + const char *secret_type); + + std::string ag_label; + auth_type ag_type = auth_type::UNKNOWN; + std::unordered_map<std::string, auth> ag_auths; + std::unordered_set<std::string> ag_host_names; + std::list<auth_portal> ag_host_addresses; + std::unordered_set<std::string> ag_initiator_names; + std::list<auth_portal> ag_initiator_portals; +}; + +using auth_group_sp = std::shared_ptr<auth_group>; + +enum class portal_protocol { + ISCSI, + ISER, + NVME_TCP, + NVME_DISCOVERY_TCP, +}; + +struct portal { + portal(struct portal_group *pg, std::string_view listen, + portal_protocol protocol, freebsd::addrinfo_up ai) : + p_portal_group(pg), p_listen(listen), p_ai(std::move(ai)), + p_protocol(protocol) {} + virtual ~portal() = default; + + bool reuse_socket(portal &oldp); + bool init_socket(); + virtual bool init_socket_options(int s __unused) { return true; } + virtual void handle_connection(freebsd::fd_up fd, const char *host, + const struct sockaddr *client_sa) = 0; + + portal_group *portal_group() const { return p_portal_group; } + const char *listen() const { return p_listen.c_str(); } + const addrinfo *ai() const { return p_ai.get(); } + portal_protocol protocol() const { return p_protocol; } + int socket() const { return p_socket; } + void close() { p_socket.reset(); } + +private: + struct portal_group *p_portal_group; + std::string p_listen; + freebsd::addrinfo_up p_ai; + portal_protocol p_protocol; + + freebsd::fd_up p_socket; +}; + +using portal_up = std::unique_ptr<portal>; +using port_up = std::unique_ptr<port>; + +enum class discovery_filter { + UNKNOWN, + NONE, + PORTAL, + PORTAL_NAME, + PORTAL_NAME_AUTH +}; + +struct portal_group { + portal_group(struct conf *conf, std::string_view name); + virtual ~portal_group() = default; + + struct conf *conf() const { return pg_conf; } + virtual const char *keyword() const = 0; + const char *name() const { return pg_name.c_str(); } + bool assigned() const { return pg_assigned; } + bool is_dummy() const; + bool is_redirecting() const { return !pg_redirection.empty(); } + struct auth_group *discovery_auth_group() const + { return pg_discovery_auth_group.get(); } + discovery_filter discovery_filter() const + { return pg_discovery_filter; } + int dscp() const { return pg_dscp; } + const char *offload() const { return pg_offload.c_str(); } + const char *redirection() const { return pg_redirection.c_str(); } + int pcp() const { return pg_pcp; } + uint16_t tag() const { return pg_tag; } + + freebsd::nvlist_up options() const; + + const std::list<portal_up> &portals() const { return pg_portals; } + const std::unordered_map<std::string, port *> &ports() const + { return pg_ports; } + + virtual void allocate_tag() = 0; + virtual bool add_portal(const char *value, + portal_protocol protocol) = 0; + virtual void add_default_portals() = 0; + bool add_option(const char *name, const char *value); + bool set_discovery_auth_group(const char *name); + bool set_dscp(u_int dscp); + virtual bool set_filter(const char *str) = 0; + void set_foreign(); + bool set_offload(const char *offload); + bool set_pcp(u_int pcp); + bool set_redirection(const char *addr); + void set_tag(uint16_t tag); + + virtual port_up create_port(struct target *target, auth_group_sp ag) = + 0; + virtual port_up create_port(struct target *target, uint32_t ctl_port) = + 0; + + void add_port(struct portal_group_port *port); + const struct port *find_port(std::string_view target) const; + void remove_port(struct portal_group_port *port); + void verify(struct conf *conf); + + bool reuse_socket(struct portal &newp); + int open_sockets(struct conf &oldconf); + void close_sockets(); + +protected: + struct conf *pg_conf; + freebsd::nvlist_up pg_options; + const char *pg_keyword; + std::string pg_name; + auth_group_sp pg_discovery_auth_group; + enum discovery_filter pg_discovery_filter = + discovery_filter::UNKNOWN; + bool pg_foreign = false; + bool pg_assigned = false; + std::list<portal_up> pg_portals; + std::unordered_map<std::string, port *> pg_ports; + std::string pg_offload; + std::string pg_redirection; + int pg_dscp = -1; + int pg_pcp = -1; + + uint16_t pg_tag = 0; +}; + +using portal_group_up = std::unique_ptr<portal_group>; + +struct port { + port(struct target *target); + virtual ~port() = default; + + struct target *target() const { return p_target; } + virtual struct auth_group *auth_group() const { return nullptr; } + virtual struct portal_group *portal_group() const { return nullptr; } + + virtual bool is_dummy() const { return true; } + + virtual void clear_references(); + + bool kernel_add(); + bool kernel_update(const port *oport); + bool kernel_remove(); + + virtual bool kernel_create_port() = 0; + virtual bool kernel_remove_port() = 0; + +protected: + struct target *p_target; + + uint32_t p_ctl_port = 0; +}; + +struct portal_group_port : public port { + portal_group_port(struct target *target, struct portal_group *pg, + auth_group_sp ag); + portal_group_port(struct target *target, struct portal_group *pg, + uint32_t ctl_port); + ~portal_group_port() override = default; + + struct auth_group *auth_group() const override + { return p_auth_group.get(); } + struct portal_group *portal_group() const override + { return p_portal_group; } + + bool is_dummy() const override; + + void clear_references() override; + +protected: + auth_group_sp p_auth_group; + struct portal_group *p_portal_group; +}; + +struct ioctl_port final : public port { + ioctl_port(struct target *target, int pp, int vp) : + port(target), p_ioctl_pp(pp), p_ioctl_vp(vp) {} + ~ioctl_port() override = default; + + bool kernel_create_port() override; + bool kernel_remove_port() override; + +private: + int p_ioctl_pp; + int p_ioctl_vp; +}; + +struct kernel_port final : public port { + kernel_port(struct target *target, struct pport *pp) : + port(target), p_pport(pp) {} + ~kernel_port() override = default; + + bool kernel_create_port() override; + bool kernel_remove_port() override; + +private: + struct pport *p_pport; +}; + +struct lun { + lun(struct conf *conf, std::string_view name); + + const char *name() const { return l_name.c_str(); } + const std::string &path() const { return l_path; } + int ctl_lun() const { return l_ctl_lun; } + + freebsd::nvlist_up options() const; + + bool add_option(const char *name, const char *value); + bool set_backend(std::string_view value); + bool set_blocksize(size_t value); + bool set_ctl_lun(uint32_t value); + bool set_device_type(uint8_t device_type); + bool set_device_type(const char *value); + bool set_device_id(std::string_view value); + bool set_path(std::string_view value); + void set_scsiname(std::string_view value); + bool set_serial(std::string_view value); + bool set_size(uint64_t value); + + bool changed(const struct lun &old) const; + bool verify(); + + bool kernel_add(); + bool kernel_modify() const; + bool kernel_remove() const; + +private: + struct conf *l_conf; + freebsd::nvlist_up l_options; + std::string l_name; + std::string l_backend; + uint8_t l_device_type = 0; + int l_blocksize = 0; + std::string l_device_id; + std::string l_path; + std::string l_scsiname; + std::string l_serial; + uint64_t l_size = 0; + + int l_ctl_lun = -1; +}; + +struct target { + target(struct conf *conf, const char *keyword, std::string_view name); + virtual ~target() = default; + + bool has_alias() const { return !t_alias.empty(); } + bool has_pport() const { return !t_pport.empty(); } + bool has_redirection() const { return !t_redirection.empty(); } + const char *alias() const { return t_alias.c_str(); } + const char *name() const { return t_name.c_str(); } + const char *label() const { return t_label.c_str(); } + const char *pport() const { return t_pport.c_str(); } + bool private_auth() const { return t_private_auth; } + const char *redirection() const { return t_redirection.c_str(); } + + struct auth_group *auth_group() const { return t_auth_group.get(); } + const std::list<port *> &ports() const { return t_ports; } + const struct lun *lun(int idx) const { return t_luns[idx]; } + + bool add_chap(const char *user, const char *secret); + bool add_chap_mutual(const char *user, const char *secret, + const char *user2, const char *secret2); + virtual bool add_host_address(const char *) { return false; } + virtual bool add_host_nqn(std::string_view) { return false; } + virtual bool add_initiator_name(std::string_view) { return false; } + virtual bool add_initiator_portal(const char *) { return false; } + virtual bool add_lun(u_int, const char *) { return false; } + virtual bool add_namespace(u_int, const char *) { return false; } + virtual bool add_portal_group(const char *pg_name, + const char *ag_name) = 0; + bool set_alias(std::string_view alias); + bool set_auth_group(const char *ag_name); + bool set_auth_type(const char *type); + bool set_physical_port(std::string_view pport); + bool set_redirection(const char *addr); + virtual struct lun *start_lun(u_int) { return nullptr; } + virtual struct lun *start_namespace(u_int) { return nullptr; } + + void add_port(struct port *port); + void remove_lun(struct lun *lun); + void remove_port(struct port *port); + void verify(); + +protected: + bool use_private_auth(const char *keyword); + bool add_lun(u_int id, const char *lun_label, const char *lun_name); + struct lun *start_lun(u_int id, const char *lun_label, + const char *lun_name); + virtual struct portal_group *default_portal_group() = 0; + + struct conf *t_conf; + std::array<struct lun *, MAX_LUNS> t_luns; + auth_group_sp t_auth_group; + std::list<port *> t_ports; + std::string t_name; + std::string t_label; + std::string t_alias; + std::string t_redirection; + /* Name of this target's physical port, if any, i.e. "isp0" */ + std::string t_pport; + bool t_private_auth; +}; + +using target_up = std::unique_ptr<target>; + +struct isns { + isns(std::string_view addr, freebsd::addrinfo_up ai) : + i_addr(addr), i_ai(std::move(ai)) {} + + const char *addr() const { return i_addr.c_str(); } + + freebsd::fd_up connect(); + bool send_request(int s, struct isns_req req); + +private: + std::string i_addr; + freebsd::addrinfo_up i_ai; +}; + +struct conf { + conf(); + + int maxproc() const { return conf_maxproc; } + int timeout() const { return conf_timeout; } + uint32_t genctr() const { return conf_genctr; } + + bool default_auth_group_defined() const + { return conf_default_ag_defined; } + bool default_portal_group_defined() const + { return conf_default_pg_defined; } + bool default_transport_group_defined() const + { return conf_default_tg_defined; } + + struct auth_group *add_auth_group(const char *ag_name); + struct auth_group *define_default_auth_group(); + auth_group_sp find_auth_group(std::string_view ag_name); + + struct portal_group *add_portal_group(const char *name); + struct portal_group *define_default_portal_group(); + struct portal_group *find_portal_group(std::string_view name); + + struct portal_group *add_transport_group(const char *name); + struct portal_group *define_default_transport_group(); + struct portal_group *find_transport_group(std::string_view name); + + bool add_port(struct target *target, struct portal_group *pg, + auth_group_sp ag); + bool add_port(struct target *target, struct portal_group *pg, + uint32_t ctl_port); + bool add_port(struct target *target, struct pport *pp); + bool add_port(struct kports &kports, struct target *target, int pp, + int vp); + bool add_pports(struct kports &kports); + + struct target *add_controller(const char *name); + struct target *find_controller(std::string_view name); + + struct target *add_target(const char *name); + struct target *find_target(std::string_view name); + + struct lun *add_lun(const char *name); + struct lun *find_lun(std::string_view name); + + void set_debug(int debug); + void set_isns_period(int period); + void set_isns_timeout(int timeout); + void set_maxproc(int maxproc); + bool set_pidfile_path(std::string_view path); + void set_timeout(int timeout); + + void open_pidfile(); + void write_pidfile(); + void close_pidfile(); + + bool add_isns(const char *addr); + void isns_register_targets(struct isns *isns, struct conf *oldconf); + void isns_deregister_targets(struct isns *isns); + void isns_schedule_update(); + void isns_update(); + + int apply(struct conf *oldconf); + void delete_target_luns(struct lun *lun); + bool reuse_portal_group_socket(struct portal &newp); + bool verify(); + +private: + struct isns_req isns_register_request(const char *hostname); + struct isns_req isns_check_request(const char *hostname); + struct isns_req isns_deregister_request(const char *hostname); + void isns_check(struct isns *isns); + + std::string conf_pidfile_path; + std::unordered_map<std::string, std::unique_ptr<lun>> conf_luns; + std::unordered_map<std::string, target_up> conf_targets; + std::unordered_map<std::string, target_up> conf_controllers; + std::unordered_map<std::string, auth_group_sp> conf_auth_groups; + std::unordered_map<std::string, std::unique_ptr<port>> conf_ports; + std::unordered_map<std::string, portal_group_up> conf_portal_groups; + std::unordered_map<std::string, portal_group_up> conf_transport_groups; + std::unordered_map<std::string, isns> conf_isns; + struct target *conf_first_target = nullptr; + int conf_isns_period = 900; + int conf_isns_timeout = 5; + int conf_debug = 0; + int conf_timeout = 60; + int conf_maxproc = 30; + uint32_t conf_genctr = 0; + + freebsd::pidfile conf_pidfile; + + bool conf_default_pg_defined = false; + bool conf_default_tg_defined = false; + bool conf_default_ag_defined = false; + + static uint32_t global_genctr; + +#ifdef ICL_KERNEL_PROXY +public: + int add_proxy_portal(portal *); + portal *proxy_portal(int); +private: + std::vector<portal *> conf_proxy_portals; +#endif +}; + +using conf_up = std::unique_ptr<conf>; + +/* Physical ports exposed by the kernel */ +struct pport { + pport(std::string_view name, uint32_t ctl_port) : pp_name(name), + pp_ctl_port(ctl_port) {} + + const char *name() const { return pp_name.c_str(); } + uint32_t ctl_port() const { return pp_ctl_port; } + + bool linked() const { return pp_linked; } + void link() { pp_linked = true; } + +private: + std::string pp_name; + uint32_t pp_ctl_port; + bool pp_linked; +}; + +struct kports { + bool add_port(std::string &name, uint32_t ctl_port); + bool has_port(std::string_view name); + struct pport *find_port(std::string_view name); + +private: + std::unordered_map<std::string, struct pport> pports; +}; + +extern bool proxy_mode; +extern int ctl_fd; + +bool parse_conf(const char *path); +bool uclparse_conf(const char *path); + +conf_up conf_new_from_kernel(struct kports &kports); +void conf_finish(void); +void conf_start(struct conf *new_conf); + +bool option_new(nvlist_t *nvl, + const char *name, const char *value); + +freebsd::addrinfo_up parse_addr_port(const char *address, + const char *def_port); + +void kernel_init(void); +void kernel_capsicate(void); + +#ifdef ICL_KERNEL_PROXY +void kernel_listen(struct addrinfo *ai, bool iser, + int portal_id); +void kernel_accept(int *connection_id, int *portal_id, + struct sockaddr *client_sa, + socklen_t *client_salen); +void kernel_send(struct pdu *pdu); +void kernel_receive(struct pdu *pdu); +#endif + +bool ctl_create_port(const char *driver, + const nvlist_t *nvl, uint32_t *ctl_port); +bool ctl_remove_port(const char *driver, nvlist_t *nvl); + +portal_group_up iscsi_make_portal_group(struct conf *conf, + std::string_view name); +target_up iscsi_make_target(struct conf *conf, + std::string_view name); + +portal_group_up nvmf_make_transport_group(struct conf *conf, + std::string_view name); +target_up nvmf_make_controller(struct conf *conf, + std::string_view name); + +void start_timer(int timeout, bool fatal = false); +void stop_timer(); +bool timed_out(); + +#endif /* !__CTLD_HH__ */ diff --git a/usr.sbin/ctld/discovery.cc b/usr.sbin/ctld/discovery.cc index 3ae18786f1c2..8f6d371b696d 100644 --- a/usr.sbin/ctld/discovery.cc +++ b/usr.sbin/ctld/discovery.cc @@ -38,7 +38,8 @@ #include <netdb.h> #include <sys/socket.h> -#include "ctld.h" +#include "ctld.hh" +#include "iscsi.hh" #include "iscsi_proto.h" static struct pdu * @@ -101,19 +102,21 @@ logout_new_response(struct pdu *request) static void discovery_add_target(struct keys *response_keys, const struct target *targ) { - struct port *port; - struct portal *portal; char *buf; char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; - struct addrinfo *ai; + const struct addrinfo *ai; int ret; - keys_add(response_keys, "TargetName", targ->t_name); - TAILQ_FOREACH(port, &targ->t_ports, p_ts) { - if (port->p_portal_group == NULL) + keys_add(response_keys, "TargetName", targ->name()); + for (const port *port : targ->ports()) { + const struct portal_group *pg = port->portal_group(); + if (pg == nullptr) continue; - TAILQ_FOREACH(portal, &port->p_portal_group->pg_portals, p_next) { - ai = portal->p_ai; + for (const portal_up &portal : pg->portals()) { + if (portal->protocol() != portal_protocol::ISCSI && + portal->protocol() != portal_protocol::ISER) + continue; + ai = portal->ai(); ret = getnameinfo(ai->ai_addr, ai->ai_addrlen, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV); @@ -126,13 +129,13 @@ discovery_add_target(struct keys *response_keys, const struct target *targ) if (strcmp(hbuf, "0.0.0.0") == 0) continue; ret = asprintf(&buf, "%s:%s,%d", hbuf, sbuf, - port->p_portal_group->pg_tag); + pg->tag()); break; case AF_INET6: if (strcmp(hbuf, "::") == 0) continue; ret = asprintf(&buf, "[%s]:%s,%d", hbuf, sbuf, - port->p_portal_group->pg_tag); + pg->tag()); break; default: continue; @@ -145,9 +148,8 @@ discovery_add_target(struct keys *response_keys, const struct target *targ) } } -static bool -discovery_target_filtered_out(const struct ctld_connection *conn, - const struct port *port) +bool +iscsi_connection::discovery_target_filtered_out(const struct port *port) const { const struct auth_group *ag; const struct portal_group *pg; @@ -155,52 +157,53 @@ discovery_target_filtered_out(const struct ctld_connection *conn, const struct auth *auth; int error; - targ = port->p_target; - ag = port->p_auth_group; - if (ag == NULL) - ag = targ->t_auth_group; - pg = conn->conn_portal->p_portal_group; + targ = port->target(); + ag = port->auth_group(); + if (ag == nullptr) + ag = targ->auth_group(); + pg = conn_portal->portal_group(); - assert(pg->pg_discovery_filter != PG_FILTER_UNKNOWN); + assert(pg->discovery_filter() != discovery_filter::UNKNOWN); - if (pg->pg_discovery_filter >= PG_FILTER_PORTAL && - !auth_portal_check(ag, &conn->conn_initiator_sa)) { + if (pg->discovery_filter() >= discovery_filter::PORTAL && + !ag->initiator_permitted(conn_initiator_sa)) { log_debugx("initiator does not match initiator portals " - "allowed for target \"%s\"; skipping", targ->t_name); + "allowed for target \"%s\"; skipping", targ->name()); return (true); } - if (pg->pg_discovery_filter >= PG_FILTER_PORTAL_NAME && - !auth_name_check(ag, conn->conn_initiator_name)) { + if (pg->discovery_filter() >= discovery_filter::PORTAL_NAME && + !ag->initiator_permitted(conn_initiator_name)) { log_debugx("initiator does not match initiator names " - "allowed for target \"%s\"; skipping", targ->t_name); + "allowed for target \"%s\"; skipping", targ->name()); return (true); } - if (pg->pg_discovery_filter >= PG_FILTER_PORTAL_NAME_AUTH && - ag->ag_type != AG_TYPE_NO_AUTHENTICATION) { - if (conn->conn_chap == NULL) { - assert(pg->pg_discovery_auth_group->ag_type == - AG_TYPE_NO_AUTHENTICATION); + if (pg->discovery_filter() >= discovery_filter::PORTAL_NAME_AUTH && + ag->type() != auth_type::NO_AUTHENTICATION) { + if (conn_chap == nullptr) { + assert(pg->discovery_auth_group()->type() == + auth_type::NO_AUTHENTICATION); log_debugx("initiator didn't authenticate, but target " - "\"%s\" requires CHAP; skipping", targ->t_name); + "\"%s\" requires CHAP; skipping", targ->name()); return (true); } - assert(conn->conn_user != NULL); - auth = auth_find(ag, conn->conn_user); + assert(!conn_user.empty()); + auth = ag->find_auth(conn_user); if (auth == NULL) { log_debugx("CHAP user \"%s\" doesn't match target " - "\"%s\"; skipping", conn->conn_user, targ->t_name); + "\"%s\"; skipping", conn_user.c_str(), + targ->name()); return (true); } - error = chap_authenticate(conn->conn_chap, auth->a_secret); + error = chap_authenticate(conn_chap, auth->secret()); if (error != 0) { log_debugx("password for CHAP user \"%s\" doesn't " "match target \"%s\"; skipping", - conn->conn_user, targ->t_name); + conn_user.c_str(), targ->name()); return (true); } } @@ -209,7 +212,7 @@ discovery_target_filtered_out(const struct ctld_connection *conn, } void -discovery(struct ctld_connection *conn) +iscsi_connection::discovery() { struct pdu *request, *response; struct keys *request_keys, *response_keys; @@ -217,10 +220,10 @@ discovery(struct ctld_connection *conn) const struct portal_group *pg; const char *send_targets; - pg = conn->conn_portal->p_portal_group; + pg = conn_portal->portal_group(); log_debugx("beginning discovery session; waiting for TextRequest PDU"); - request_keys = text_read_request(&conn->conn, &request); + request_keys = text_read_request(&conn, &request); send_targets = keys_find(request_keys, "SendTargets"); if (send_targets == NULL) @@ -229,23 +232,25 @@ discovery(struct ctld_connection *conn) response_keys = keys_new(); if (strcmp(send_targets, "All") == 0) { - TAILQ_FOREACH(port, &pg->pg_ports, p_pgs) { - if (discovery_target_filtered_out(conn, port)) { + for (const auto &kv : pg->ports()) { + port = kv.second; + if (discovery_target_filtered_out(port)) { /* Ignore this target. */ continue; } - discovery_add_target(response_keys, port->p_target); + discovery_add_target(response_keys, port->target()); } } else { - port = port_find_in_pg(pg, send_targets); + port = pg->find_port(send_targets); if (port == NULL) { log_debugx("initiator requested information on unknown " "target \"%s\"; returning nothing", send_targets); } else { - if (discovery_target_filtered_out(conn, port)) { + if (discovery_target_filtered_out(port)) { /* Ignore this target. */ } else { - discovery_add_target(response_keys, port->p_target); + discovery_add_target(response_keys, + port->target()); } } } @@ -256,7 +261,7 @@ discovery(struct ctld_connection *conn) keys_delete(request_keys); log_debugx("done sending targets; waiting for Logout PDU"); - request = logout_receive(&conn->conn); + request = logout_receive(&conn); response = logout_new_response(request); pdu_send(response); diff --git a/usr.sbin/ctld/iscsi.cc b/usr.sbin/ctld/iscsi.cc new file mode 100644 index 000000000000..bee036b95bf2 --- /dev/null +++ b/usr.sbin/ctld/iscsi.cc @@ -0,0 +1,508 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2003, 2004 Silicon Graphics International Corp. + * Copyright (c) 1997-2007 Kenneth D. Merry + * Copyright (c) 2012 The FreeBSD Foundation + * Copyright (c) 2017 Jakub Wojciech Klama <jceel@FreeBSD.org> + * All rights reserved. + * Copyright (c) 2025 Chelsio Communications, Inc. + * + * Portions of this software were developed by Edward Tomasz Napierala + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + */ + +#include <sys/param.h> +#include <sys/linker.h> +#include <sys/module.h> +#include <sys/time.h> +#include <assert.h> +#include <libiscsiutil.h> +#include <stdio.h> +#include <stdlib.h> +#include <cam/ctl/ctl.h> +#include <cam/ctl/ctl_io.h> +#include <cam/ctl/ctl_ioctl.h> + +#include "ctld.hh" +#include "iscsi.hh" + +#define SOCKBUF_SIZE 1048576 + +struct iscsi_portal final : public portal { + iscsi_portal(struct portal_group *pg, const char *listen, + portal_protocol protocol, freebsd::addrinfo_up ai) : + portal(pg, listen, protocol, std::move(ai)) {} + + bool init_socket_options(int s) override; + void handle_connection(freebsd::fd_up fd, const char *host, + const struct sockaddr *client_sa) override; +}; + +struct iscsi_portal_group final : public portal_group { + iscsi_portal_group(struct conf *conf, std::string_view name) : + portal_group(conf, name) {} + + const char *keyword() const override + { return "portal-group"; } + + void allocate_tag() override; + bool add_portal(const char *value, portal_protocol protocol) + override; + void add_default_portals() override; + bool set_filter(const char *str) override; + + virtual port_up create_port(struct target *target, auth_group_sp ag) + override; + virtual port_up create_port(struct target *target, uint32_t ctl_port) + override; +private: + static uint16_t last_portal_group_tag; +}; + +struct iscsi_port final : public portal_group_port { + iscsi_port(struct target *target, struct portal_group *pg, + auth_group_sp ag) : + portal_group_port(target, pg, ag) {} + iscsi_port(struct target *target, struct portal_group *pg, + uint32_t ctl_port) : + portal_group_port(target, pg, ctl_port) {} + + bool kernel_create_port() override; + bool kernel_remove_port() override; + +private: + static bool module_loaded; + static void load_kernel_module(); +}; + +struct iscsi_target final : public target { + iscsi_target(struct conf *conf, std::string_view name) : + target(conf, "target", name) {} + + bool add_initiator_name(std::string_view name) override; + bool add_initiator_portal(const char *addr) override; + bool add_lun(u_int id, const char *lun_name) override; + bool add_portal_group(const char *pg_name, const char *ag_name) + override; + struct lun *start_lun(u_int id) override; + +protected: + struct portal_group *default_portal_group() override; +}; + +#ifdef ICL_KERNEL_PROXY +static void pdu_receive_proxy(struct pdu *pdu); +static void pdu_send_proxy(struct pdu *pdu); +#endif /* ICL_KERNEL_PROXY */ +static void pdu_fail(const struct connection *conn, const char *reason); + +uint16_t iscsi_portal_group::last_portal_group_tag = 0xff; +bool iscsi_port::module_loaded = false; + +static struct connection_ops conn_ops = { + .timed_out = timed_out, +#ifdef ICL_KERNEL_PROXY + .pdu_receive_proxy = pdu_receive_proxy, + .pdu_send_proxy = pdu_send_proxy, +#else + .pdu_receive_proxy = nullptr, + .pdu_send_proxy = nullptr, +#endif + .fail = pdu_fail, +}; + +portal_group_up +iscsi_make_portal_group(struct conf *conf, std::string_view name) +{ + return std::make_unique<iscsi_portal_group>(conf, name); +} + +target_up +iscsi_make_target(struct conf *conf, std::string_view name) +{ + return std::make_unique<iscsi_target>(conf, name); +} + +void +iscsi_portal_group::allocate_tag() +{ + set_tag(++last_portal_group_tag); +} + +bool +iscsi_portal_group::add_portal(const char *value, portal_protocol protocol) +{ + switch (protocol) { + case portal_protocol::ISCSI: + case portal_protocol::ISER: + break; + default: + log_warnx("unsupported portal protocol for %s", value); + return (false); + } + + freebsd::addrinfo_up ai = parse_addr_port(value, "3260"); + if (!ai) { + log_warnx("invalid listen address %s", value); + return (false); + } + + /* + * XXX: getaddrinfo(3) may return multiple addresses; we should turn + * those into multiple portals. + */ + + pg_portals.emplace_back(std::make_unique<iscsi_portal>(this, value, + protocol, std::move(ai))); + return (true); +} + +void +iscsi_portal_group::add_default_portals() +{ + add_portal("0.0.0.0", portal_protocol::ISCSI); + add_portal("[::]", portal_protocol::ISCSI); +} + +bool +iscsi_portal_group::set_filter(const char *str) +{ + enum discovery_filter filter; + + if (strcmp(str, "none") == 0) { + filter = discovery_filter::NONE; + } else if (strcmp(str, "portal") == 0) { + filter = discovery_filter::PORTAL; + } else if (strcmp(str, "portal-name") == 0) { + filter = discovery_filter::PORTAL_NAME; + } else if (strcmp(str, "portal-name-auth") == 0) { + filter = discovery_filter::PORTAL_NAME_AUTH; + } else { + log_warnx("invalid discovery-filter \"%s\" for portal-group " + "\"%s\"; valid values are \"none\", \"portal\", " + "\"portal-name\", and \"portal-name-auth\"", + str, name()); + return (false); + } + + if (pg_discovery_filter != discovery_filter::UNKNOWN && + pg_discovery_filter != filter) { + log_warnx("cannot set discovery-filter to \"%s\" for " + "portal-group \"%s\"; already has a different " + "value", str, name()); + return (false); + } + + pg_discovery_filter = filter; + return (true); +} + +port_up +iscsi_portal_group::create_port(struct target *target, auth_group_sp ag) +{ + return std::make_unique<iscsi_port>(target, this, ag); +} + +port_up +iscsi_portal_group::create_port(struct target *target, uint32_t ctl_port) +{ + return std::make_unique<iscsi_port>(target, this, ctl_port); +} + +void +iscsi_port::load_kernel_module() +{ + int saved_errno; + + if (module_loaded) + return; + + saved_errno = errno; + if (modfind("cfiscsi") == -1 && kldload("cfiscsi") == -1) + log_warn("couldn't load cfiscsi"); + errno = saved_errno; + module_loaded = true; +} + +bool +iscsi_port::kernel_create_port() +{ + struct portal_group *pg = p_portal_group; + struct target *targ = p_target; + + load_kernel_module(); + + freebsd::nvlist_up nvl = pg->options(); + nvlist_add_string(nvl.get(), "cfiscsi_target", targ->name()); + nvlist_add_string(nvl.get(), "ctld_portal_group_name", pg->name()); + nvlist_add_stringf(nvl.get(), "cfiscsi_portal_group_tag", "%u", + pg->tag()); + + if (targ->has_alias()) { + nvlist_add_string(nvl.get(), "cfiscsi_target_alias", + targ->alias()); + } + + return (ctl_create_port("iscsi", nvl.get(), &p_ctl_port)); +} + +bool +iscsi_port::kernel_remove_port() +{ + freebsd::nvlist_up nvl(nvlist_create(0)); + nvlist_add_string(nvl.get(), "cfiscsi_target", p_target->name()); + nvlist_add_stringf(nvl.get(), "cfiscsi_portal_group_tag", "%u", + p_portal_group->tag()); + + return (ctl_remove_port("iscsi", nvl.get())); +} + +bool +iscsi_portal::init_socket_options(int s) +{ + int sockbuf; + + sockbuf = SOCKBUF_SIZE; + if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, &sockbuf, + sizeof(sockbuf)) == -1) { + log_warn("setsockopt(SO_RCVBUF) failed for %s", listen()); + return (false); + } + sockbuf = SOCKBUF_SIZE; + if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &sockbuf, + sizeof(sockbuf)) == -1) { + log_warn("setsockopt(SO_SNDBUF) failed for %s", listen()); + return (false); + } + return (true); +} + +bool +iscsi_target::add_initiator_name(std::string_view name) +{ + if (!use_private_auth("initiator-name")) + return (false); + return (t_auth_group->add_initiator_name(name)); +} + +bool +iscsi_target::add_initiator_portal(const char *addr) +{ + if (!use_private_auth("initiator-portal")) + return (false); + return (t_auth_group->add_initiator_portal(addr)); +} + +bool +iscsi_target::add_lun(u_int id, const char *lun_name) +{ + std::string lun_label = "LUN " + std::to_string(id); + return target::add_lun(id, lun_label.c_str(), lun_name); +} + +bool +iscsi_target::add_portal_group(const char *pg_name, const char *ag_name) +{ + struct portal_group *pg; + auth_group_sp ag; + + pg = t_conf->find_portal_group(pg_name); + if (pg == NULL) { + log_warnx("unknown portal-group \"%s\" for %s", pg_name, + label()); + return (false); + } + + if (ag_name != NULL) { + ag = t_conf->find_auth_group(ag_name); + if (ag == NULL) { + log_warnx("unknown auth-group \"%s\" for %s", ag_name, + label()); + return (false); + } + } + + if (!t_conf->add_port(this, pg, std::move(ag))) { + log_warnx("can't link portal-group \"%s\" to %s", pg_name, + label()); + return (false); + } + return (true); +} + +struct lun * +iscsi_target::start_lun(u_int id) +{ + std::string lun_label = "LUN " + std::to_string(id); + std::string lun_name = freebsd::stringf("%s,lun,%u", name(), id); + return target::start_lun(id, lun_label.c_str(), lun_name.c_str()); +} + +struct portal_group * +iscsi_target::default_portal_group() +{ + return t_conf->find_portal_group("default"); +} + +#ifdef ICL_KERNEL_PROXY + +static void +pdu_receive_proxy(struct pdu *pdu) +{ + struct connection *conn; + size_t len; + + assert(proxy_mode); + conn = pdu->pdu_connection; + + kernel_receive(pdu); + + len = pdu_ahs_length(pdu); + if (len > 0) + log_errx(1, "protocol error: non-empty AHS"); + + len = pdu_data_segment_length(pdu); + assert(len <= (size_t)conn->conn_max_recv_data_segment_length); + pdu->pdu_data_len = len; +} + +static void +pdu_send_proxy(struct pdu *pdu) +{ + + assert(proxy_mode); + + pdu_set_data_segment_length(pdu, pdu->pdu_data_len); + kernel_send(pdu); +} + +#endif /* ICL_KERNEL_PROXY */ + +static void +pdu_fail(const struct connection *conn __unused, const char *reason __unused) +{ +} + +iscsi_connection::iscsi_connection(struct portal *portal, freebsd::fd_up fd, + const char *host, const struct sockaddr *client_sa) : + conn_portal(portal), conn_fd(std::move(fd)), conn_initiator_addr(host), + conn_initiator_sa(client_sa) +{ + connection_init(&conn, &conn_ops, proxy_mode); + conn.conn_socket = conn_fd; +} + +iscsi_connection::~iscsi_connection() +{ + chap_delete(conn_chap); +} + +void +iscsi_connection::kernel_handoff() +{ + struct portal_group *pg = conn_portal->portal_group(); + struct ctl_iscsi req; + + bzero(&req, sizeof(req)); + + req.type = CTL_ISCSI_HANDOFF; + strlcpy(req.data.handoff.initiator_name, conn_initiator_name.c_str(), + sizeof(req.data.handoff.initiator_name)); + strlcpy(req.data.handoff.initiator_addr, conn_initiator_addr.c_str(), + sizeof(req.data.handoff.initiator_addr)); + if (!conn_initiator_alias.empty()) { + strlcpy(req.data.handoff.initiator_alias, + conn_initiator_alias.c_str(), + sizeof(req.data.handoff.initiator_alias)); + } + memcpy(req.data.handoff.initiator_isid, conn_initiator_isid, + sizeof(req.data.handoff.initiator_isid)); + strlcpy(req.data.handoff.target_name, conn_target->name(), + sizeof(req.data.handoff.target_name)); + strlcpy(req.data.handoff.offload, pg->offload(), + sizeof(req.data.handoff.offload)); +#ifdef ICL_KERNEL_PROXY + if (proxy_mode) + req.data.handoff.connection_id = conn.conn_socket; + else + req.data.handoff.socket = conn.conn_socket; +#else + req.data.handoff.socket = conn.conn_socket; +#endif + req.data.handoff.portal_group_tag = pg->tag(); + if (conn.conn_header_digest == CONN_DIGEST_CRC32C) + req.data.handoff.header_digest = CTL_ISCSI_DIGEST_CRC32C; + if (conn.conn_data_digest == CONN_DIGEST_CRC32C) + req.data.handoff.data_digest = CTL_ISCSI_DIGEST_CRC32C; + req.data.handoff.cmdsn = conn.conn_cmdsn; + req.data.handoff.statsn = conn.conn_statsn; + req.data.handoff.max_recv_data_segment_length = + conn.conn_max_recv_data_segment_length; + req.data.handoff.max_send_data_segment_length = + conn.conn_max_send_data_segment_length; + req.data.handoff.max_burst_length = conn.conn_max_burst_length; + req.data.handoff.first_burst_length = conn.conn_first_burst_length; + req.data.handoff.immediate_data = conn.conn_immediate_data; + + if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { + log_err(1, "error issuing CTL_ISCSI ioctl; " + "dropping connection"); + } + + if (req.status != CTL_ISCSI_OK) { + log_errx(1, "error returned from CTL iSCSI handoff request: " + "%s; dropping connection", req.error_str); + } +} + +void +iscsi_connection::handle() +{ + login(); + if (conn_session_type == CONN_SESSION_TYPE_NORMAL) { + kernel_handoff(); + log_debugx("connection handed off to the kernel"); + } else { + assert(conn_session_type == CONN_SESSION_TYPE_DISCOVERY); + discovery(); + } +} + +void +iscsi_portal::handle_connection(freebsd::fd_up fd, const char *host, + const struct sockaddr *client_sa) +{ + struct conf *conf = portal_group()->conf(); + + iscsi_connection conn(this, std::move(fd), host, client_sa); + start_timer(conf->timeout(), true); + kernel_capsicate(); + conn.handle(); +} diff --git a/usr.sbin/ctld/iscsi.hh b/usr.sbin/ctld/iscsi.hh new file mode 100644 index 000000000000..d510e8c6731b --- /dev/null +++ b/usr.sbin/ctld/iscsi.hh @@ -0,0 +1,79 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2012 The FreeBSD Foundation + * + * This software was developed by Edward Tomasz Napierala under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef __ISCSI_HH__ +#define __ISCSI_HH__ + +#define CONN_SESSION_TYPE_NONE 0 +#define CONN_SESSION_TYPE_DISCOVERY 1 +#define CONN_SESSION_TYPE_NORMAL 2 + +struct iscsi_connection { + iscsi_connection(struct portal *portal, freebsd::fd_up fd, + const char *host, const struct sockaddr *client_sa); + ~iscsi_connection(); + + void handle(); +private: + void login(); + void login_chap(struct auth_group *ag); + void login_negotiate_key(struct pdu *request, const char *name, + const char *value, bool skipped_security, + struct keys *response_keys); + bool login_portal_redirect(struct pdu *request); + bool login_target_redirect(struct pdu *request); + void login_negotiate(struct pdu *request); + void login_wait_transition(); + + void discovery(); + bool discovery_target_filtered_out(const struct port *port) const; + + void kernel_handoff(); + + struct connection conn; + struct portal *conn_portal = nullptr; + const struct port *conn_port = nullptr; + struct target *conn_target = nullptr; + freebsd::fd_up conn_fd; + int conn_session_type = CONN_SESSION_TYPE_NONE; + std::string conn_initiator_name; + std::string conn_initiator_addr; + std::string conn_initiator_alias; + uint8_t conn_initiator_isid[6]; + const struct sockaddr *conn_initiator_sa = nullptr; + int conn_max_recv_data_segment_limit = 0; + int conn_max_send_data_segment_limit = 0; + int conn_max_burst_limit = 0; + int conn_first_burst_limit = 0; + std::string conn_user; + struct chap *conn_chap = nullptr; +}; + +#endif /* !__ISCSI_HH__ */ diff --git a/usr.sbin/ctld/isns.cc b/usr.sbin/ctld/isns.cc index e4d3744b84dc..9877a4bc000d 100644 --- a/usr.sbin/ctld/isns.cc +++ b/usr.sbin/ctld/isns.cc @@ -27,7 +27,7 @@ * */ -#include <sys/types.h> +#include <sys/param.h> #include <sys/time.h> #include <sys/socket.h> #include <sys/wait.h> @@ -40,132 +40,90 @@ #include <string.h> #include <unistd.h> -#include "ctld.h" -#include "isns.h" +#include "ctld.hh" +#include "isns.hh" -struct isns_req * -isns_req_alloc(void) +isns_req::isns_req(uint16_t func, uint16_t flags, const char *descr) + : ir_descr(descr) { - struct isns_req *req; + struct isns_hdr hdr; - req = reinterpret_cast<struct isns_req *>(calloc(1, sizeof(struct isns_req))); - if (req == NULL) { - log_err(1, "calloc"); - return (NULL); - } - req->ir_buflen = sizeof(struct isns_hdr); - req->ir_usedlen = 0; - req->ir_buf = reinterpret_cast<uint8_t *>(calloc(1, req->ir_buflen)); - if (req->ir_buf == NULL) { - free(req); - log_err(1, "calloc"); - return (NULL); - } - return (req); -} - -struct isns_req * -isns_req_create(uint16_t func, uint16_t flags) -{ - struct isns_req *req; - struct isns_hdr *hdr; - - req = isns_req_alloc(); - req->ir_usedlen = sizeof(struct isns_hdr); - hdr = (struct isns_hdr *)req->ir_buf; - be16enc(hdr->ih_version, ISNS_VERSION); - be16enc(hdr->ih_function, func); - be16enc(hdr->ih_flags, flags); - return (req); + be16enc(&hdr.ih_version, ISNS_VERSION); + be16enc(&hdr.ih_function, func); + be16enc(&hdr.ih_flags, flags); + append(&hdr, sizeof(hdr)); } void -isns_req_free(struct isns_req *req) +isns_req::getspace(uint32_t len) { - - free(req->ir_buf); - free(req); + ir_buf.reserve(ir_buf.size() + len); } -static int -isns_req_getspace(struct isns_req *req, uint32_t len) +void +isns_req::append(const void *buf, size_t len) { - void *newbuf; - int newlen; - - if (req->ir_usedlen + len <= req->ir_buflen) - return (0); - newlen = 1 << flsl(req->ir_usedlen + len); - newbuf = realloc(req->ir_buf, newlen); - if (newbuf == NULL) { - log_err(1, "realloc"); - return (1); - } - req->ir_buf = reinterpret_cast<uint8_t *>(newbuf); - req->ir_buflen = newlen; - return (0); + const char *cp = reinterpret_cast<const char *>(buf); + ir_buf.insert(ir_buf.end(), cp, cp + len); } void -isns_req_add(struct isns_req *req, uint32_t tag, uint32_t len, - const void *value) +isns_req::add(uint32_t tag, uint32_t len, const void *value) { - struct isns_tlv *tlv; + struct isns_tlv tlv; uint32_t vlen; - vlen = len + ((len & 3) ? (4 - (len & 3)) : 0); - isns_req_getspace(req, sizeof(*tlv) + vlen); - tlv = (struct isns_tlv *)&req->ir_buf[req->ir_usedlen]; - be32enc(tlv->it_tag, tag); - be32enc(tlv->it_length, vlen); - memcpy(tlv->it_value, value, len); + vlen = roundup2(len, 4); + getspace(sizeof(tlv) + vlen); + be32enc(&tlv.it_tag, tag); + be32enc(&tlv.it_length, vlen); + append(&tlv, sizeof(tlv)); + append(value, len); if (vlen != len) - memset(&tlv->it_value[len], 0, vlen - len); - req->ir_usedlen += sizeof(*tlv) + vlen; + ir_buf.insert(ir_buf.end(), vlen - len, 0); } void -isns_req_add_delim(struct isns_req *req) +isns_req::add_delim() { - - isns_req_add(req, 0, 0, NULL); + add(0, 0, nullptr); } void -isns_req_add_str(struct isns_req *req, uint32_t tag, const char *value) +isns_req::add_str(uint32_t tag, const char *value) { - isns_req_add(req, tag, strlen(value) + 1, value); + add(tag, strlen(value) + 1, value); } void -isns_req_add_32(struct isns_req *req, uint32_t tag, uint32_t value) +isns_req::add_32(uint32_t tag, uint32_t value) { uint32_t beval; be32enc(&beval, value); - isns_req_add(req, tag, sizeof(value), &beval); + add(tag, sizeof(value), &beval); } void -isns_req_add_addr(struct isns_req *req, uint32_t tag, struct addrinfo *ai) +isns_req::add_addr(uint32_t tag, const struct addrinfo *ai) { - struct sockaddr_in *in4; - struct sockaddr_in6 *in6; + const struct sockaddr_in *in4; + const struct sockaddr_in6 *in6; uint8_t buf[16]; switch (ai->ai_addr->sa_family) { case AF_INET: - in4 = (struct sockaddr_in *)(void *)ai->ai_addr; + in4 = (const struct sockaddr_in *)ai->ai_addr; memset(buf, 0, 10); buf[10] = 0xff; buf[11] = 0xff; memcpy(&buf[12], &in4->sin_addr, sizeof(in4->sin_addr)); - isns_req_add(req, tag, sizeof(buf), buf); + add(tag, sizeof(buf), buf); break; case AF_INET6: - in6 = (struct sockaddr_in6 *)(void *)ai->ai_addr; - isns_req_add(req, tag, sizeof(in6->sin6_addr), &in6->sin6_addr); + in6 = (const struct sockaddr_in6 *)ai->ai_addr; + add(tag, sizeof(in6->sin6_addr), &in6->sin6_addr); break; default: log_errx(1, "Unsupported address family %d", @@ -174,22 +132,22 @@ isns_req_add_addr(struct isns_req *req, uint32_t tag, struct addrinfo *ai) } void -isns_req_add_port(struct isns_req *req, uint32_t tag, struct addrinfo *ai) +isns_req::add_port(uint32_t tag, const struct addrinfo *ai) { - struct sockaddr_in *in4; - struct sockaddr_in6 *in6; + const struct sockaddr_in *in4; + const struct sockaddr_in6 *in6; uint32_t buf; switch (ai->ai_addr->sa_family) { case AF_INET: - in4 = (struct sockaddr_in *)(void *)ai->ai_addr; + in4 = (const struct sockaddr_in *)ai->ai_addr; be32enc(&buf, ntohs(in4->sin_port)); - isns_req_add(req, tag, sizeof(buf), &buf); + add(tag, sizeof(buf), &buf); break; case AF_INET6: - in6 = (struct sockaddr_in6 *)(void *)ai->ai_addr; + in6 = (const struct sockaddr_in6 *)ai->ai_addr; be32enc(&buf, ntohs(in6->sin6_port)); - isns_req_add(req, tag, sizeof(buf), &buf); + add(tag, sizeof(buf), &buf); break; default: log_errx(1, "Unsupported address family %d", @@ -197,55 +155,54 @@ isns_req_add_port(struct isns_req *req, uint32_t tag, struct addrinfo *ai) } } -int -isns_req_send(int s, struct isns_req *req) +bool +isns_req::send(int s) { struct isns_hdr *hdr; int res; - hdr = (struct isns_hdr *)req->ir_buf; - be16enc(hdr->ih_length, req->ir_usedlen - sizeof(*hdr)); + hdr = (struct isns_hdr *)ir_buf.data(); + be16enc(hdr->ih_length, ir_buf.size() - sizeof(*hdr)); be16enc(hdr->ih_flags, be16dec(hdr->ih_flags) | ISNS_FLAG_LAST | ISNS_FLAG_FIRST); be16enc(hdr->ih_transaction, 0); be16enc(hdr->ih_sequence, 0); - res = write(s, req->ir_buf, req->ir_usedlen); - return ((res < 0) ? -1 : 0); + res = write(s, ir_buf.data(), ir_buf.size()); + return (res > 0 && (size_t)res == ir_buf.size()); } -int -isns_req_receive(int s, struct isns_req *req) +bool +isns_req::receive(int s) { struct isns_hdr *hdr; ssize_t res, len; - req->ir_usedlen = 0; - isns_req_getspace(req, sizeof(*hdr)); - res = read(s, req->ir_buf, sizeof(*hdr)); - if (res < (ssize_t)sizeof(*hdr)) - return (-1); - req->ir_usedlen = sizeof(*hdr); - hdr = (struct isns_hdr *)req->ir_buf; + ir_buf.resize(sizeof(*hdr)); + res = read(s, ir_buf.data(), sizeof(*hdr)); + if (res < (ssize_t)sizeof(*hdr)) { + ir_buf.clear(); + return (false); + } + hdr = (struct isns_hdr *)ir_buf.data(); if (be16dec(hdr->ih_version) != ISNS_VERSION) - return (-1); + return (false); if ((be16dec(hdr->ih_flags) & (ISNS_FLAG_LAST | ISNS_FLAG_FIRST)) != (ISNS_FLAG_LAST | ISNS_FLAG_FIRST)) - return (-1); + return (false); len = be16dec(hdr->ih_length); - isns_req_getspace(req, len); - res = read(s, &req->ir_buf[req->ir_usedlen], len); + ir_buf.resize(sizeof(*hdr) + len); + res = read(s, ir_buf.data() + sizeof(*hdr), len); if (res < len) - return (-1); - req->ir_usedlen += len; - return (0); + return (false); + return (res == len); } uint32_t -isns_req_get_status(struct isns_req *req) +isns_req::get_status() { - if (req->ir_usedlen < sizeof(struct isns_hdr) + 4) + if (ir_buf.size() < sizeof(struct isns_hdr) + 4) return (-1); - return (be32dec(&req->ir_buf[sizeof(struct isns_hdr)])); + return (be32dec(&ir_buf[sizeof(struct isns_hdr)])); } diff --git a/usr.sbin/ctld/isns.h b/usr.sbin/ctld/isns.hh index 70404b6f74e1..08a479626338 100644 --- a/usr.sbin/ctld/isns.h +++ b/usr.sbin/ctld/isns.hh @@ -24,8 +24,10 @@ * SUCH DAMAGE. */ -#ifndef _ISNS_H -#define _ISNS_H +#ifndef __ISNS_HH__ +#define __ISNS_HH__ + +#include <vector> #define ISNS_VERSION 0x0001 @@ -68,23 +70,26 @@ struct isns_tlv { }; struct isns_req { - u_int ir_buflen; - u_int ir_usedlen; - uint8_t *ir_buf; -}; + isns_req() {} + isns_req(uint16_t func, uint16_t flags, const char *descr); + + const char *descr() const { return ir_descr; } -struct isns_req * isns_req_alloc(void); -struct isns_req * isns_req_create(uint16_t func, uint16_t flags); -void isns_req_free(struct isns_req *req); -void isns_req_add(struct isns_req *req, uint32_t tag, uint32_t len, - const void *value); -void isns_req_add_delim(struct isns_req *req); -void isns_req_add_str(struct isns_req *req, uint32_t tag, const char *value); -void isns_req_add_32(struct isns_req *req, uint32_t tag, uint32_t value); -void isns_req_add_addr(struct isns_req *req, uint32_t tag, struct addrinfo *ai); -void isns_req_add_port(struct isns_req *req, uint32_t tag, struct addrinfo *ai); -int isns_req_send(int s, struct isns_req *req); -int isns_req_receive(int s, struct isns_req *req); -uint32_t isns_req_get_status(struct isns_req *req); + void add(uint32_t tag, uint32_t len, const void *value); + void add_delim(); + void add_str(uint32_t tag, const char *value); + void add_32(uint32_t tag, uint32_t value); + void add_addr(uint32_t tag, const struct addrinfo *ai); + void add_port(uint32_t tag, const struct addrinfo *ai); + bool send(int s); + bool receive(int s); + uint32_t get_status(); +private: + void getspace(uint32_t len); + void append(const void *buf, size_t len); + + std::vector<char> ir_buf; + const char *ir_descr; +}; -#endif /* _ISNS_H */ +#endif /* __ISNS_HH__ */ diff --git a/usr.sbin/ctld/kernel.cc b/usr.sbin/ctld/kernel.cc index 0cd0eaff6c6f..b214cd4e8c29 100644 --- a/usr.sbin/ctld/kernel.cc +++ b/usr.sbin/ctld/kernel.cc @@ -46,7 +46,6 @@ #include <sys/module.h> #include <sys/queue.h> #include <sys/sbuf.h> -#include <sys/nv.h> #include <sys/stat.h> #include <assert.h> #include <bsdxml.h> @@ -68,7 +67,7 @@ #include <cam/ctl/ctl_util.h> #include <cam/ctl/ctl_scsi_all.h> -#include "ctld.h" +#include "ctld.hh" #ifdef ICL_KERNEL_PROXY #include <netdb.h> @@ -76,8 +75,6 @@ #define NVLIST_BUFSIZE 1024 -extern bool proxy_mode; - int ctl_fd = 0; void @@ -109,42 +106,43 @@ kernel_init(void) /* * Backend LUN information. */ +using attr_list = std::list<std::pair<std::string, std::string>>; + struct cctl_lun { uint64_t lun_id; - char *backend_type; + std::string backend_type; uint8_t device_type; uint64_t size_blocks; uint32_t blocksize; - char *serial_number; - char *device_id; - char *ctld_name; - nvlist_t *attr_list; - STAILQ_ENTRY(cctl_lun) links; + std::string serial_number; + std::string device_id; + std::string ctld_name; + attr_list attr_list; }; struct cctl_port { uint32_t port_id; - char *port_frontend; - char *port_name; + std::string port_frontend; + std::string port_name; int pp; int vp; + uint16_t portid; int cfiscsi_state; - char *cfiscsi_target; + std::string cfiscsi_target; + std::string nqn; uint16_t cfiscsi_portal_group_tag; - char *ctld_portal_group_name; - nvlist_t *attr_list; - STAILQ_ENTRY(cctl_port) links; + std::string ctld_portal_group_name; + std::string ctld_transport_group_name; + attr_list attr_list; }; struct cctl_devlist_data { - int num_luns; - STAILQ_HEAD(,cctl_lun) lun_list; - struct cctl_lun *cur_lun; - int num_ports; - STAILQ_HEAD(,cctl_port) port_list; - struct cctl_port *cur_port; - int level; - struct sbuf *cur_sb[32]; + std::list<cctl_lun> lun_list; + struct cctl_lun *cur_lun = nullptr; + std::list<cctl_port> port_list; + struct cctl_port *cur_port = nullptr; + u_int level = 0; + struct sbuf *cur_sb[32] = {}; }; static void @@ -157,9 +155,8 @@ cctl_start_element(void *user_data, const char *name, const char **attr) devlist = (struct cctl_devlist_data *)user_data; cur_lun = devlist->cur_lun; devlist->level++; - if ((u_int)devlist->level >= (sizeof(devlist->cur_sb) / - sizeof(devlist->cur_sb[0]))) - log_errx(1, "%s: too many nesting levels, %zd max", __func__, + if (devlist->level >= nitems(devlist->cur_sb)) + log_errx(1, "%s: too many nesting levels, %zu max", __func__, nitems(devlist->cur_sb)); devlist->cur_sb[devlist->level] = sbuf_new_auto(); @@ -171,17 +168,11 @@ cctl_start_element(void *user_data, const char *name, const char **attr) log_errx(1, "%s: improper lun element nesting", __func__); - cur_lun = reinterpret_cast<struct cctl_lun *>(calloc(1, sizeof(*cur_lun))); - if (cur_lun == NULL) - log_err(1, "%s: cannot allocate %zd bytes", __func__, - sizeof(*cur_lun)); + devlist->lun_list.emplace_back(); + cur_lun = &devlist->lun_list.back(); - devlist->num_luns++; devlist->cur_lun = cur_lun; - cur_lun->attr_list = nvlist_create(0); - STAILQ_INSERT_TAIL(&devlist->lun_list, cur_lun, links); - for (i = 0; attr[i] != NULL; i += 2) { if (strcmp(attr[i], "id") == 0) { cur_lun->lun_id = strtoull(attr[i+1], NULL, 0); @@ -198,8 +189,7 @@ cctl_end_element(void *user_data, const char *name) { struct cctl_devlist_data *devlist; struct cctl_lun *cur_lun; - char *str; - int error; + std::string str; devlist = (struct cctl_devlist_data *)user_data; cur_lun = devlist->cur_lun; @@ -213,55 +203,39 @@ cctl_end_element(void *user_data, const char *name) devlist->level, name); sbuf_finish(devlist->cur_sb[devlist->level]); - str = checked_strdup(sbuf_data(devlist->cur_sb[devlist->level])); - - if (strlen(str) == 0) { - free(str); - str = NULL; - } + str = sbuf_data(devlist->cur_sb[devlist->level]); sbuf_delete(devlist->cur_sb[devlist->level]); devlist->cur_sb[devlist->level] = NULL; devlist->level--; if (strcmp(name, "backend_type") == 0) { - cur_lun->backend_type = str; - str = NULL; + cur_lun->backend_type = std::move(str); } else if (strcmp(name, "lun_type") == 0) { - if (str == NULL) + if (str.empty()) log_errx(1, "%s: %s missing its argument", __func__, name); - cur_lun->device_type = strtoull(str, NULL, 0); + cur_lun->device_type = strtoull(str.c_str(), NULL, 0); } else if (strcmp(name, "size") == 0) { - if (str == NULL) + if (str.empty()) log_errx(1, "%s: %s missing its argument", __func__, name); - cur_lun->size_blocks = strtoull(str, NULL, 0); + cur_lun->size_blocks = strtoull(str.c_str(), NULL, 0); } else if (strcmp(name, "blocksize") == 0) { - if (str == NULL) + if (str.empty()) log_errx(1, "%s: %s missing its argument", __func__, name); - cur_lun->blocksize = strtoul(str, NULL, 0); + cur_lun->blocksize = strtoul(str.c_str(), NULL, 0); } else if (strcmp(name, "serial_number") == 0) { - cur_lun->serial_number = str; - str = NULL; + cur_lun->serial_number = std::move(str); } else if (strcmp(name, "device_id") == 0) { - cur_lun->device_id = str; - str = NULL; + cur_lun->device_id = std::move(str); } else if (strcmp(name, "ctld_name") == 0) { - cur_lun->ctld_name = str; - str = NULL; + cur_lun->ctld_name = std::move(str); } else if (strcmp(name, "lun") == 0) { devlist->cur_lun = NULL; } else if (strcmp(name, "ctllunlist") == 0) { /* Nothing. */ } else { - nvlist_move_string(cur_lun->attr_list, name, str); - error = nvlist_error(cur_lun->attr_list); - if (error != 0) - log_errc(1, error, "%s: failed to add nv pair for %s", - __func__, name); - str = NULL; + cur_lun->attr_list.emplace_back(name, std::move(str)); } - - free(str); } static void @@ -274,9 +248,8 @@ cctl_start_pelement(void *user_data, const char *name, const char **attr) devlist = (struct cctl_devlist_data *)user_data; cur_port = devlist->cur_port; devlist->level++; - if ((u_int)devlist->level >= (sizeof(devlist->cur_sb) / - sizeof(devlist->cur_sb[0]))) - log_errx(1, "%s: too many nesting levels, %zd max", __func__, + if (devlist->level >= nitems(devlist->cur_sb)) + log_errx(1, "%s: too many nesting levels, %zu max", __func__, nitems(devlist->cur_sb)); devlist->cur_sb[devlist->level] = sbuf_new_auto(); @@ -288,17 +261,10 @@ cctl_start_pelement(void *user_data, const char *name, const char **attr) log_errx(1, "%s: improper port element nesting (%s)", __func__, name); - cur_port = reinterpret_cast<struct cctl_port *>(calloc(1, sizeof(*cur_port))); - if (cur_port == NULL) - log_err(1, "%s: cannot allocate %zd bytes", __func__, - sizeof(*cur_port)); - - devlist->num_ports++; + devlist->port_list.emplace_back(); + cur_port = &devlist->port_list.back(); devlist->cur_port = cur_port; - cur_port->attr_list = nvlist_create(0); - STAILQ_INSERT_TAIL(&devlist->port_list, cur_port, links); - for (i = 0; attr[i] != NULL; i += 2) { if (strcmp(attr[i], "id") == 0) { cur_port->port_id = strtoul(attr[i+1], NULL, 0); @@ -315,8 +281,7 @@ cctl_end_pelement(void *user_data, const char *name) { struct cctl_devlist_data *devlist; struct cctl_port *cur_port; - char *str; - int error; + std::string str; devlist = (struct cctl_devlist_data *)user_data; cur_port = devlist->cur_port; @@ -330,59 +295,51 @@ cctl_end_pelement(void *user_data, const char *name) devlist->level, name); sbuf_finish(devlist->cur_sb[devlist->level]); - str = checked_strdup(sbuf_data(devlist->cur_sb[devlist->level])); - - if (strlen(str) == 0) { - free(str); - str = NULL; - } + str = sbuf_data(devlist->cur_sb[devlist->level]); sbuf_delete(devlist->cur_sb[devlist->level]); devlist->cur_sb[devlist->level] = NULL; devlist->level--; if (strcmp(name, "frontend_type") == 0) { - cur_port->port_frontend = str; - str = NULL; + cur_port->port_frontend = std::move(str); } else if (strcmp(name, "port_name") == 0) { - cur_port->port_name = str; - str = NULL; + cur_port->port_name = std::move(str); } else if (strcmp(name, "physical_port") == 0) { - if (str == NULL) + if (str.empty()) log_errx(1, "%s: %s missing its argument", __func__, name); - cur_port->pp = strtoul(str, NULL, 0); + cur_port->pp = strtoul(str.c_str(), NULL, 0); } else if (strcmp(name, "virtual_port") == 0) { - if (str == NULL) + if (str.empty()) log_errx(1, "%s: %s missing its argument", __func__, name); - cur_port->vp = strtoul(str, NULL, 0); + cur_port->vp = strtoul(str.c_str(), NULL, 0); } else if (strcmp(name, "cfiscsi_target") == 0) { - cur_port->cfiscsi_target = str; - str = NULL; + cur_port->cfiscsi_target = std::move(str); } else if (strcmp(name, "cfiscsi_state") == 0) { - if (str == NULL) + if (str.empty()) log_errx(1, "%s: %s missing its argument", __func__, name); - cur_port->cfiscsi_state = strtoul(str, NULL, 0); + cur_port->cfiscsi_state = strtoul(str.c_str(), NULL, 0); } else if (strcmp(name, "cfiscsi_portal_group_tag") == 0) { - if (str == NULL) + if (str.empty()) log_errx(1, "%s: %s missing its argument", __func__, name); - cur_port->cfiscsi_portal_group_tag = strtoul(str, NULL, 0); + cur_port->cfiscsi_portal_group_tag = strtoul(str.c_str(), NULL, 0); } else if (strcmp(name, "ctld_portal_group_name") == 0) { - cur_port->ctld_portal_group_name = str; - str = NULL; + cur_port->ctld_portal_group_name = std::move(str); + } else if (strcmp(name, "ctld_transport_group_name") == 0) { + cur_port->ctld_transport_group_name = std::move(str); + } else if (strcmp(name, "nqn") == 0) { + cur_port->nqn = std::move(str); + } else if (strcmp(name, "portid") == 0) { + if (str.empty()) + log_errx(1, "%s: %s missing its argument", __func__, name); + cur_port->portid = strtoul(str.c_str(), NULL, 0); } else if (strcmp(name, "targ_port") == 0) { devlist->cur_port = NULL; } else if (strcmp(name, "ctlportlist") == 0) { /* Nothing. */ } else { - nvlist_move_string(cur_port->attr_list, name, str); - error = nvlist_error(cur_port->attr_list); - if (error != 0) - log_errc(1, error, "%s: failed to add nv pair for %s", - __func__, name); - str = NULL; + cur_port->attr_list.emplace_back(name, std::move(str)); } - - free(str); } static void @@ -395,329 +352,307 @@ cctl_char_handler(void *user_data, const XML_Char *str, int len) sbuf_bcat(devlist->cur_sb[devlist->level], str, len); } -struct conf * -conf_new_from_kernel(struct kports *kports) +static bool +parse_kernel_config(struct cctl_devlist_data &devlist) { - struct conf *conf = NULL; - struct target *targ; - struct portal_group *pg; - struct pport *pp; - struct port *cp; - struct lun *cl; struct ctl_lun_list list; - struct cctl_devlist_data devlist; - struct cctl_lun *lun; - struct cctl_port *port; XML_Parser parser; - const char *key; - char *str, *name; - void *cookie; - int error, len, retval; - - bzero(&devlist, sizeof(devlist)); - STAILQ_INIT(&devlist.lun_list); - STAILQ_INIT(&devlist.port_list); + int retval; - log_debugx("obtaining previously configured CTL luns from the kernel"); - - str = NULL; - len = 4096; + std::vector<char> buf(4096); retry: - str = reinterpret_cast<char *>(realloc(str, len)); - if (str == NULL) - log_err(1, "realloc"); - bzero(&list, sizeof(list)); - list.alloc_len = len; + list.alloc_len = buf.size(); list.status = CTL_LUN_LIST_NONE; - list.lun_xml = str; + list.lun_xml = buf.data(); if (ioctl(ctl_fd, CTL_LUN_LIST, &list) == -1) { log_warn("error issuing CTL_LUN_LIST ioctl"); - free(str); - return (NULL); + return (false); } if (list.status == CTL_LUN_LIST_ERROR) { log_warnx("error returned from CTL_LUN_LIST ioctl: %s", list.error_str); - free(str); - return (NULL); + return (false); } if (list.status == CTL_LUN_LIST_NEED_MORE_SPACE) { - len = len << 1; + buf.resize(buf.size() << 1); goto retry; } parser = XML_ParserCreate(NULL); if (parser == NULL) { log_warnx("unable to create XML parser"); - free(str); - return (NULL); + return (false); } XML_SetUserData(parser, &devlist); XML_SetElementHandler(parser, cctl_start_element, cctl_end_element); XML_SetCharacterDataHandler(parser, cctl_char_handler); - retval = XML_Parse(parser, str, strlen(str), 1); + retval = XML_Parse(parser, buf.data(), strlen(buf.data()), 1); XML_ParserFree(parser); - free(str); if (retval != 1) { log_warnx("XML_Parse failed"); - return (NULL); + return (false); } - str = NULL; - len = 4096; retry_port: - str = reinterpret_cast<char *>(realloc(str, len)); - if (str == NULL) - log_err(1, "realloc"); - bzero(&list, sizeof(list)); - list.alloc_len = len; + list.alloc_len = buf.size(); list.status = CTL_LUN_LIST_NONE; - list.lun_xml = str; + list.lun_xml = buf.data(); if (ioctl(ctl_fd, CTL_PORT_LIST, &list) == -1) { log_warn("error issuing CTL_PORT_LIST ioctl"); - free(str); - return (NULL); + return (false); } if (list.status == CTL_LUN_LIST_ERROR) { log_warnx("error returned from CTL_PORT_LIST ioctl: %s", list.error_str); - free(str); - return (NULL); + return (false); } if (list.status == CTL_LUN_LIST_NEED_MORE_SPACE) { - len = len << 1; + buf.resize(buf.size() << 1); goto retry_port; } parser = XML_ParserCreate(NULL); if (parser == NULL) { log_warnx("unable to create XML parser"); - free(str); - return (NULL); + return (false); } XML_SetUserData(parser, &devlist); XML_SetElementHandler(parser, cctl_start_pelement, cctl_end_pelement); XML_SetCharacterDataHandler(parser, cctl_char_handler); - retval = XML_Parse(parser, str, strlen(str), 1); + retval = XML_Parse(parser, buf.data(), strlen(buf.data()), 1); XML_ParserFree(parser); - free(str); if (retval != 1) { log_warnx("XML_Parse failed"); - return (NULL); + return (false); } - conf = conf_new(); + return (true); +} - name = NULL; - STAILQ_FOREACH(port, &devlist.port_list, links) { - if (strcmp(port->port_frontend, "ha") == 0) - continue; - free(name); - if (port->pp == 0 && port->vp == 0) { - name = checked_strdup(port->port_name); - } else if (port->vp == 0) { - retval = asprintf(&name, "%s/%d", - port->port_name, port->pp); - if (retval <= 0) - log_err(1, "asprintf"); - } else { - retval = asprintf(&name, "%s/%d/%d", - port->port_name, port->pp, port->vp); - if (retval <= 0) - log_err(1, "asprintf"); +void +add_iscsi_port(struct kports &kports, struct conf *conf, + const struct cctl_port &port, std::string &name) +{ + if (port.cfiscsi_target.empty()) { + log_debugx("CTL port %u \"%s\" wasn't managed by ctld; ", + port.port_id, name.c_str()); + if (!kports.has_port(name)) { + if (!kports.add_port(name, port.port_id)) { + log_warnx("kports::add_port failed"); + return; + } } + return; + } + if (port.cfiscsi_state != 1) { + log_debugx("CTL port %ju is not active (%d); ignoring", + (uintmax_t)port.port_id, port.cfiscsi_state); + return; + } - if (port->cfiscsi_target == NULL) { - log_debugx("CTL port %u \"%s\" wasn't managed by ctld; ", - port->port_id, name); - pp = pport_find(kports, name); - if (pp == NULL) { - pp = pport_new(kports, name, port->port_id); - if (pp == NULL) { - log_warnx("pport_new failed"); - continue; - } - } - continue; + const char *t_name = port.cfiscsi_target.c_str(); + struct target *targ = conf->find_target(t_name); + if (targ == nullptr) { + targ = conf->add_target(t_name); + if (targ == nullptr) { + log_warnx("Failed to add target \"%s\"", t_name); + return; } - if (port->cfiscsi_state != 1) { - log_debugx("CTL port %ju is not active (%d); ignoring", - (uintmax_t)port->port_id, port->cfiscsi_state); - continue; + } + + if (port.ctld_portal_group_name.empty()) + return; + + const char *pg_name = port.ctld_portal_group_name.c_str(); + struct portal_group *pg = conf->find_portal_group(pg_name); + if (pg == nullptr) { + pg = conf->add_portal_group(pg_name); + if (pg == nullptr) { + log_warnx("Failed to add portal-group \"%s\"", pg_name); + return; } + } + pg->set_tag(port.cfiscsi_portal_group_tag); + if (!conf->add_port(targ, pg, port.port_id)) { + log_warnx("Failed to add port for target \"%s\" and portal-group \"%s\"", + t_name, pg_name); + } +} - targ = target_find(conf, port->cfiscsi_target); - if (targ == NULL) { - targ = target_new(conf, port->cfiscsi_target); - if (targ == NULL) { - log_warnx("target_new failed"); - continue; - } +void +add_nvmf_port(struct conf *conf, const struct cctl_port &port, + std::string &name) +{ + if (port.nqn.empty() || port.ctld_transport_group_name.empty()) { + log_debugx("CTL port %u \"%s\" wasn't managed by ctld; ", + port.port_id, name.c_str()); + return; + } + + const char *nqn = port.nqn.c_str(); + struct target *targ = conf->find_controller(nqn); + if (targ == nullptr) { + targ = conf->add_controller(nqn); + if (targ == nullptr) { + log_warnx("Failed to add controller \"%s\"", nqn); + return; } + } - if (port->ctld_portal_group_name == NULL) - continue; - pg = portal_group_find(conf, port->ctld_portal_group_name); - if (pg == NULL) { - pg = portal_group_new(conf, port->ctld_portal_group_name); - if (pg == NULL) { - log_warnx("portal_group_new failed"); - continue; - } + const char *tg_name = port.ctld_transport_group_name.c_str(); + struct portal_group *pg = conf->find_transport_group(tg_name); + if (pg == nullptr) { + pg = conf->add_transport_group(tg_name); + if (pg == nullptr) { + log_warnx("Failed to add transport-group \"%s\"", + tg_name); + return; } - pg->pg_tag = port->cfiscsi_portal_group_tag; - cp = port_new(conf, targ, pg); - if (cp == NULL) { - log_warnx("port_new failed"); + } + pg->set_tag(port.portid); + if (!conf->add_port(targ, pg, port.port_id)) { + log_warnx("Failed to add port for controller \"%s\" and transport-group \"%s\"", + nqn, tg_name); + } +} + +conf_up +conf_new_from_kernel(struct kports &kports) +{ + struct cctl_devlist_data devlist; + + log_debugx("obtaining previously configured CTL luns from the kernel"); + + if (!parse_kernel_config(devlist)) + return {}; + + conf_up conf = std::make_unique<struct conf>(); + + for (const auto &port : devlist.port_list) { + if (port.port_frontend == "ha") continue; + + std::string name = port.port_name; + if (port.pp != 0) { + name += "/" + std::to_string(port.pp); + if (port.vp != 0) + name += "/" + std::to_string(port.vp); + } + + if (port.port_frontend == "iscsi") { + add_iscsi_port(kports, conf.get(), port, name); + } else if (port.port_frontend == "nvmf") { + add_nvmf_port(conf.get(), port, name); + } else { + /* XXX: Treat all unknown ports as iSCSI? */ + add_iscsi_port(kports, conf.get(), port, name); } - cp->p_ctl_port = port->port_id; - } - while ((port = STAILQ_FIRST(&devlist.port_list))) { - STAILQ_REMOVE_HEAD(&devlist.port_list, links); - free(port->port_frontend); - free(port->port_name); - free(port->cfiscsi_target); - free(port->ctld_portal_group_name); - nvlist_destroy(port->attr_list); - free(port); } - free(name); - STAILQ_FOREACH(lun, &devlist.lun_list, links) { - if (lun->ctld_name == NULL) { + for (const auto &lun : devlist.lun_list) { + if (lun.ctld_name.empty()) { log_debugx("CTL lun %ju wasn't managed by ctld; " - "ignoring", (uintmax_t)lun->lun_id); + "ignoring", (uintmax_t)lun.lun_id); continue; } - cl = lun_find(conf, lun->ctld_name); + const char *l_name = lun.ctld_name.c_str(); + struct lun *cl = conf->find_lun(l_name); if (cl != NULL) { log_warnx("found CTL lun %ju \"%s\", " "also backed by CTL lun %d; ignoring", - (uintmax_t)lun->lun_id, lun->ctld_name, - cl->l_ctl_lun); + (uintmax_t)lun.lun_id, l_name, + cl->ctl_lun()); continue; } log_debugx("found CTL lun %ju \"%s\"", - (uintmax_t)lun->lun_id, lun->ctld_name); + (uintmax_t)lun.lun_id, l_name); - cl = lun_new(conf, lun->ctld_name); + cl = conf->add_lun(l_name); if (cl == NULL) { log_warnx("lun_new failed"); continue; } - cl->l_backend = lun->backend_type; - lun->backend_type = NULL; - cl->l_device_type = lun->device_type; - cl->l_blocksize = lun->blocksize; - cl->l_device_id = lun->device_id; - lun->device_id = NULL; - cl->l_serial = lun->serial_number; - lun->serial_number = NULL; - cl->l_size = lun->size_blocks * cl->l_blocksize; - cl->l_ctl_lun = lun->lun_id; - - cookie = NULL; - while ((key = nvlist_next(lun->attr_list, NULL, &cookie)) != - NULL) { - if (strcmp(key, "file") == 0 || - strcmp(key, "dev") == 0) { - cl->l_path = checked_strdup( - cnvlist_get_string(cookie)); + cl->set_backend(lun.backend_type.c_str()); + cl->set_device_type(lun.device_type); + cl->set_blocksize(lun.blocksize); + cl->set_device_id(lun.device_id.c_str()); + cl->set_serial(lun.serial_number.c_str()); + cl->set_size(lun.size_blocks * lun.blocksize); + cl->set_ctl_lun(lun.lun_id); + + for (const auto &pair : lun.attr_list) { + const char *key = pair.first.c_str(); + const char *value = pair.second.c_str(); + if (pair.first == "file" || pair.first == "dev") { + cl->set_path(value); continue; } - nvlist_add_string(cl->l_options, key, - cnvlist_get_string(cookie)); - error = nvlist_error(cl->l_options); - if (error != 0) - log_warnc(error, "unable to add CTL lun option " + if (!cl->add_option(key, value)) + log_warnx("unable to add CTL lun option " "%s for CTL lun %ju \"%s\"", - key, (uintmax_t)lun->lun_id, - cl->l_name); + key, (uintmax_t)lun.lun_id, + cl->name()); } } - while ((lun = STAILQ_FIRST(&devlist.lun_list))) { - STAILQ_REMOVE_HEAD(&devlist.lun_list, links); - nvlist_destroy(lun->attr_list); - free(lun); - } return (conf); } -static void -nvlist_replace_string(nvlist_t *nvl, const char *name, const char *value) -{ - if (nvlist_exists_string(nvl, name)) - nvlist_free_string(nvl, name); - nvlist_add_string(nvl, name, value); -} - -int -kernel_lun_add(struct lun *lun) +bool +lun::kernel_add() { struct ctl_lun_req req; int error; bzero(&req, sizeof(req)); - strlcpy(req.backend, lun->l_backend, sizeof(req.backend)); + strlcpy(req.backend, l_backend.c_str(), sizeof(req.backend)); req.reqtype = CTL_LUNREQ_CREATE; - req.reqdata.create.blocksize_bytes = lun->l_blocksize; + req.reqdata.create.blocksize_bytes = l_blocksize; - if (lun->l_size != 0) - req.reqdata.create.lun_size_bytes = lun->l_size; + if (l_size != 0) + req.reqdata.create.lun_size_bytes = l_size; - if (lun->l_ctl_lun >= 0) { - req.reqdata.create.req_lun_id = lun->l_ctl_lun; + if (l_ctl_lun >= 0) { + req.reqdata.create.req_lun_id = l_ctl_lun; req.reqdata.create.flags |= CTL_LUN_FLAG_ID_REQ; } req.reqdata.create.flags |= CTL_LUN_FLAG_DEV_TYPE; - req.reqdata.create.device_type = lun->l_device_type; + req.reqdata.create.device_type = l_device_type; - if (lun->l_serial != NULL) { - strncpy((char *)req.reqdata.create.serial_num, lun->l_serial, + if (!l_serial.empty()) { + strncpy((char *)req.reqdata.create.serial_num, l_serial.c_str(), sizeof(req.reqdata.create.serial_num)); req.reqdata.create.flags |= CTL_LUN_FLAG_SERIAL_NUM; } - if (lun->l_device_id != NULL) { - strncpy((char *)req.reqdata.create.device_id, lun->l_device_id, - sizeof(req.reqdata.create.device_id)); + if (!l_device_id.empty()) { + strncpy((char *)req.reqdata.create.device_id, + l_device_id.c_str(), sizeof(req.reqdata.create.device_id)); req.reqdata.create.flags |= CTL_LUN_FLAG_DEVID; } - if (lun->l_path != NULL) - nvlist_replace_string(lun->l_options, "file", lun->l_path); - - nvlist_replace_string(lun->l_options, "ctld_name", lun->l_name); - - if (!nvlist_exists_string(lun->l_options, "scsiname") && - lun->l_scsiname != NULL) - nvlist_add_string(lun->l_options, "scsiname", lun->l_scsiname); - - if (!nvlist_empty(lun->l_options)) { - req.args = nvlist_pack(lun->l_options, &req.args_len); - if (req.args == NULL) { - log_warn("error packing nvlist"); - return (1); - } + freebsd::nvlist_up nvl = options(); + req.args = nvlist_pack(nvl.get(), &req.args_len); + if (req.args == NULL) { + log_warn("error packing nvlist"); + return (false); } error = ioctl(ctl_fd, CTL_LUN_REQ, &req); @@ -725,13 +660,13 @@ kernel_lun_add(struct lun *lun) if (error != 0) { log_warn("error issuing CTL_LUN_REQ ioctl"); - return (1); + return (false); } switch (req.status) { case CTL_LUN_ERROR: log_warnx("LUN creation error: %s", req.error_str); - return (1); + return (false); case CTL_LUN_WARNING: log_warnx("LUN creation warning: %s", req.error_str); break; @@ -740,42 +675,32 @@ kernel_lun_add(struct lun *lun) default: log_warnx("unknown LUN creation status: %d", req.status); - return (1); + return (false); } - lun->l_ctl_lun = req.reqdata.create.req_lun_id; - return (0); + l_ctl_lun = req.reqdata.create.req_lun_id; + return (true); } -int -kernel_lun_modify(struct lun *lun) +bool +lun::kernel_modify() const { struct ctl_lun_req req; int error; bzero(&req, sizeof(req)); - strlcpy(req.backend, lun->l_backend, sizeof(req.backend)); + strlcpy(req.backend, l_backend.c_str(), sizeof(req.backend)); req.reqtype = CTL_LUNREQ_MODIFY; - req.reqdata.modify.lun_id = lun->l_ctl_lun; - req.reqdata.modify.lun_size_bytes = lun->l_size; - - if (lun->l_path != NULL) - nvlist_replace_string(lun->l_options, "file", lun->l_path); - - nvlist_replace_string(lun->l_options, "ctld_name", lun->l_name); + req.reqdata.modify.lun_id = l_ctl_lun; + req.reqdata.modify.lun_size_bytes = l_size; - if (!nvlist_exists_string(lun->l_options, "scsiname") && - lun->l_scsiname != NULL) - nvlist_add_string(lun->l_options, "scsiname", lun->l_scsiname); - - if (!nvlist_empty(lun->l_options)) { - req.args = nvlist_pack(lun->l_options, &req.args_len); - if (req.args == NULL) { - log_warn("error packing nvlist"); - return (1); - } + freebsd::nvlist_up nvl = options(); + req.args = nvlist_pack(nvl.get(), &req.args_len); + if (req.args == NULL) { + log_warn("error packing nvlist"); + return (false); } error = ioctl(ctl_fd, CTL_LUN_REQ, &req); @@ -783,13 +708,13 @@ kernel_lun_modify(struct lun *lun) if (error != 0) { log_warn("error issuing CTL_LUN_REQ ioctl"); - return (1); + return (false); } switch (req.status) { case CTL_LUN_ERROR: log_warnx("LUN modification error: %s", req.error_str); - return (1); + return (false); case CTL_LUN_WARNING: log_warnx("LUN modification warning: %s", req.error_str); break; @@ -798,33 +723,33 @@ kernel_lun_modify(struct lun *lun) default: log_warnx("unknown LUN modification status: %d", req.status); - return (1); + return (false); } - return (0); + return (true); } -int -kernel_lun_remove(struct lun *lun) +bool +lun::kernel_remove() const { struct ctl_lun_req req; bzero(&req, sizeof(req)); - strlcpy(req.backend, lun->l_backend, sizeof(req.backend)); + strlcpy(req.backend, l_backend.c_str(), sizeof(req.backend)); req.reqtype = CTL_LUNREQ_RM; - req.reqdata.rm.lun_id = lun->l_ctl_lun; + req.reqdata.rm.lun_id = l_ctl_lun; if (ioctl(ctl_fd, CTL_LUN_REQ, &req) == -1) { log_warn("error issuing CTL_LUN_REQ ioctl"); - return (1); + return (false); } switch (req.status) { case CTL_LUN_ERROR: log_warnx("LUN removal error: %s", req.error_str); - return (1); + return (false); case CTL_LUN_WARNING: log_warnx("LUN removal warning: %s", req.error_str); break; @@ -832,167 +757,104 @@ kernel_lun_remove(struct lun *lun) break; default: log_warnx("unknown LUN removal status: %d", req.status); - return (1); + return (false); } - return (0); + return (true); } -void -kernel_handoff(struct ctld_connection *conn) +bool +ctl_create_port(const char *driver, const nvlist_t *nvl, uint32_t *ctl_port) { - struct ctl_iscsi req; + struct ctl_req req; + char result_buf[NVLIST_BUFSIZE]; + int error; bzero(&req, sizeof(req)); + req.reqtype = CTL_REQ_CREATE; - req.type = CTL_ISCSI_HANDOFF; - strlcpy(req.data.handoff.initiator_name, - conn->conn_initiator_name, sizeof(req.data.handoff.initiator_name)); - strlcpy(req.data.handoff.initiator_addr, - conn->conn_initiator_addr, sizeof(req.data.handoff.initiator_addr)); - if (conn->conn_initiator_alias != NULL) { - strlcpy(req.data.handoff.initiator_alias, - conn->conn_initiator_alias, sizeof(req.data.handoff.initiator_alias)); + strlcpy(req.driver, driver, sizeof(req.driver)); + req.args = nvlist_pack(nvl, &req.args_len); + if (req.args == NULL) { + log_warn("error packing nvlist"); + return (false); } - memcpy(req.data.handoff.initiator_isid, conn->conn_initiator_isid, - sizeof(req.data.handoff.initiator_isid)); - strlcpy(req.data.handoff.target_name, - conn->conn_target->t_name, sizeof(req.data.handoff.target_name)); - if (conn->conn_portal->p_portal_group->pg_offload != NULL) { - strlcpy(req.data.handoff.offload, - conn->conn_portal->p_portal_group->pg_offload, - sizeof(req.data.handoff.offload)); + + req.result = result_buf; + req.result_len = sizeof(result_buf); + error = ioctl(ctl_fd, CTL_PORT_REQ, &req); + free(req.args); + + if (error != 0) { + log_warn("error issuing CTL_PORT_REQ ioctl"); + return (false); + } + if (req.status == CTL_LUN_ERROR) { + log_warnx("error returned from port creation request: %s", + req.error_str); + return (false); + } + if (req.status != CTL_LUN_OK) { + log_warnx("unknown port creation request status %d", + req.status); + return (false); } -#ifdef ICL_KERNEL_PROXY - if (proxy_mode) - req.data.handoff.connection_id = conn->conn.conn_socket; - else - req.data.handoff.socket = conn->conn.conn_socket; -#else - req.data.handoff.socket = conn->conn.conn_socket; -#endif - req.data.handoff.portal_group_tag = - conn->conn_portal->p_portal_group->pg_tag; - if (conn->conn.conn_header_digest == CONN_DIGEST_CRC32C) - req.data.handoff.header_digest = CTL_ISCSI_DIGEST_CRC32C; - if (conn->conn.conn_data_digest == CONN_DIGEST_CRC32C) - req.data.handoff.data_digest = CTL_ISCSI_DIGEST_CRC32C; - req.data.handoff.cmdsn = conn->conn.conn_cmdsn; - req.data.handoff.statsn = conn->conn.conn_statsn; - req.data.handoff.max_recv_data_segment_length = - conn->conn.conn_max_recv_data_segment_length; - req.data.handoff.max_send_data_segment_length = - conn->conn.conn_max_send_data_segment_length; - req.data.handoff.max_burst_length = conn->conn.conn_max_burst_length; - req.data.handoff.first_burst_length = - conn->conn.conn_first_burst_length; - req.data.handoff.immediate_data = conn->conn.conn_immediate_data; - if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { - log_err(1, "error issuing CTL_ISCSI ioctl; " - "dropping connection"); + freebsd::nvlist_up result_nvl(nvlist_unpack(result_buf, req.result_len, + 0)); + if (result_nvl == NULL) { + log_warnx("error unpacking result nvlist"); + return (false); } - if (req.status != CTL_ISCSI_OK) { - log_errx(1, "error returned from CTL iSCSI handoff request: " - "%s; dropping connection", req.error_str); + *ctl_port = nvlist_get_number(result_nvl.get(), "port_id"); + return (true); +} + +bool +ioctl_port::kernel_create_port() +{ + freebsd::nvlist_up nvl(nvlist_create(0)); + nvlist_add_stringf(nvl.get(), "pp", "%d", p_ioctl_pp); + nvlist_add_stringf(nvl.get(), "vp", "%d", p_ioctl_vp); + + return (ctl_create_port("ioctl", nvl.get(), &p_ctl_port)); +} + +bool +kernel_port::kernel_create_port() +{ + struct ctl_port_entry entry; + struct target *targ = p_target; + + p_ctl_port = p_pport->ctl_port(); + + if (strncmp(targ->name(), "naa.", 4) == 0 && + strlen(targ->name()) == 20) { + bzero(&entry, sizeof(entry)); + entry.port_type = CTL_PORT_NONE; + entry.targ_port = p_ctl_port; + entry.flags |= CTL_PORT_WWNN_VALID; + entry.wwnn = strtoull(targ->name() + 4, NULL, 16); + if (ioctl(ctl_fd, CTL_SET_PORT_WWNS, &entry) == -1) + log_warn("CTL_SET_PORT_WWNS ioctl failed"); } + return (true); } -int -kernel_port_add(struct port *port) +bool +port::kernel_add() { struct ctl_port_entry entry; - struct ctl_req req; struct ctl_lun_map lm; - struct target *targ = port->p_target; - struct portal_group *pg = port->p_portal_group; - char result_buf[NVLIST_BUFSIZE]; + struct target *targ = p_target; int error, i; - /* Create iSCSI port. */ - if (port->p_portal_group || port->p_ioctl_port) { - bzero(&req, sizeof(req)); - req.reqtype = CTL_REQ_CREATE; - - if (port->p_portal_group) { - strlcpy(req.driver, "iscsi", sizeof(req.driver)); - req.args_nvl = nvlist_clone(pg->pg_options); - nvlist_add_string(req.args_nvl, "cfiscsi_target", - targ->t_name); - nvlist_add_string(req.args_nvl, - "ctld_portal_group_name", pg->pg_name); - nvlist_add_stringf(req.args_nvl, - "cfiscsi_portal_group_tag", "%u", pg->pg_tag); - - if (targ->t_alias) { - nvlist_add_string(req.args_nvl, - "cfiscsi_target_alias", targ->t_alias); - } - } - - if (port->p_ioctl_port) { - strlcpy(req.driver, "ioctl", sizeof(req.driver)); - req.args_nvl = nvlist_create(0); - nvlist_add_stringf(req.args_nvl, "pp", "%d", - port->p_ioctl_pp); - nvlist_add_stringf(req.args_nvl, "vp", "%d", - port->p_ioctl_vp); - } - - req.args = nvlist_pack(req.args_nvl, &req.args_len); - if (req.args == NULL) { - nvlist_destroy(req.args_nvl); - log_warn("error packing nvlist"); - return (1); - } - - req.result = result_buf; - req.result_len = sizeof(result_buf); - error = ioctl(ctl_fd, CTL_PORT_REQ, &req); - free(req.args); - nvlist_destroy(req.args_nvl); - - if (error != 0) { - log_warn("error issuing CTL_PORT_REQ ioctl"); - return (1); - } - if (req.status == CTL_LUN_ERROR) { - log_warnx("error returned from port creation request: %s", - req.error_str); - return (1); - } - if (req.status != CTL_LUN_OK) { - log_warnx("unknown port creation request status %d", - req.status); - return (1); - } - - req.result_nvl = nvlist_unpack(result_buf, req.result_len, 0); - if (req.result_nvl == NULL) { - log_warnx("error unpacking result nvlist"); - return (1); - } - - port->p_ctl_port = nvlist_get_number(req.result_nvl, "port_id"); - nvlist_destroy(req.result_nvl); - } else if (port->p_pport) { - port->p_ctl_port = port->p_pport->pp_ctl_port; - - if (strncmp(targ->t_name, "naa.", 4) == 0 && - strlen(targ->t_name) == 20) { - bzero(&entry, sizeof(entry)); - entry.port_type = CTL_PORT_NONE; - entry.targ_port = port->p_ctl_port; - entry.flags |= CTL_PORT_WWNN_VALID; - entry.wwnn = strtoull(targ->t_name + 4, NULL, 16); - if (ioctl(ctl_fd, CTL_SET_PORT_WWNS, &entry) == -1) - log_warn("CTL_SET_PORT_WWNS ioctl failed"); - } - } + if (!kernel_create_port()) + return (false); /* Explicitly enable mapping to block any access except allowed. */ - lm.port = port->p_ctl_port; + lm.port = p_ctl_port; lm.plun = UINT32_MAX; lm.lun = 0; error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); @@ -1001,11 +863,11 @@ kernel_port_add(struct port *port) /* Map configured LUNs */ for (i = 0; i < MAX_LUNS; i++) { - if (targ->t_luns[i] == NULL) + if (targ->lun(i) == nullptr) continue; - lm.port = port->p_ctl_port; + lm.port = p_ctl_port; lm.plun = i; - lm.lun = targ->t_luns[i]->l_ctl_lun; + lm.lun = targ->lun(i)->ctl_lun(); error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); if (error != 0) log_warn("CTL_LUN_MAP ioctl failed"); @@ -1013,120 +875,122 @@ kernel_port_add(struct port *port) /* Enable port */ bzero(&entry, sizeof(entry)); - entry.targ_port = port->p_ctl_port; + entry.targ_port = p_ctl_port; error = ioctl(ctl_fd, CTL_ENABLE_PORT, &entry); if (error != 0) { log_warn("CTL_ENABLE_PORT ioctl failed"); - return (-1); + return (false); } - return (0); + return (true); } -int -kernel_port_update(struct port *port, struct port *oport) +bool +port::kernel_update(const struct port *oport) { struct ctl_lun_map lm; - struct target *targ = port->p_target; + struct target *targ = p_target; struct target *otarg = oport->p_target; int error, i; uint32_t olun; + p_ctl_port = oport->p_ctl_port; + /* Map configured LUNs and unmap others */ for (i = 0; i < MAX_LUNS; i++) { - lm.port = port->p_ctl_port; + lm.port = p_ctl_port; lm.plun = i; - if (targ->t_luns[i] == NULL) + if (targ->lun(i) == nullptr) lm.lun = UINT32_MAX; else - lm.lun = targ->t_luns[i]->l_ctl_lun; - if (otarg->t_luns[i] == NULL) + lm.lun = targ->lun(i)->ctl_lun(); + if (otarg->lun(i) == nullptr) olun = UINT32_MAX; else - olun = otarg->t_luns[i]->l_ctl_lun; + olun = otarg->lun(i)->ctl_lun(); if (lm.lun == olun) continue; error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); if (error != 0) log_warn("CTL_LUN_MAP ioctl failed"); } - return (0); + return (true); } -int -kernel_port_remove(struct port *port) +bool +ctl_remove_port(const char *driver, nvlist_t *nvl) { - struct ctl_port_entry entry; - struct ctl_lun_map lm; struct ctl_req req; - struct target *targ = port->p_target; - struct portal_group *pg = port->p_portal_group; int error; - /* Disable port */ - bzero(&entry, sizeof(entry)); - entry.targ_port = port->p_ctl_port; - error = ioctl(ctl_fd, CTL_DISABLE_PORT, &entry); + strlcpy(req.driver, driver, sizeof(req.driver)); + req.reqtype = CTL_REQ_REMOVE; + req.args = nvlist_pack(nvl, &req.args_len); + if (req.args == NULL) { + log_warn("error packing nvlist"); + return (false); + } + + error = ioctl(ctl_fd, CTL_PORT_REQ, &req); + free(req.args); + if (error != 0) { - log_warn("CTL_DISABLE_PORT ioctl failed"); - return (-1); + log_warn("error issuing CTL_PORT_REQ ioctl"); + return (false); + } + if (req.status == CTL_LUN_ERROR) { + log_warnx("error returned from port removal request: %s", + req.error_str); + return (false); } + if (req.status != CTL_LUN_OK) { + log_warnx("unknown port removal request status %d", req.status); + return (false); + } + return (true); +} - /* Remove iSCSI or ioctl port. */ - if (port->p_portal_group || port->p_ioctl_port) { - bzero(&req, sizeof(req)); - strlcpy(req.driver, port->p_ioctl_port ? "ioctl" : "iscsi", - sizeof(req.driver)); - req.reqtype = CTL_REQ_REMOVE; - req.args_nvl = nvlist_create(0); - if (req.args_nvl == NULL) - log_err(1, "nvlist_create"); - - if (port->p_ioctl_port) - nvlist_add_stringf(req.args_nvl, "port_id", "%d", - port->p_ctl_port); - else { - nvlist_add_string(req.args_nvl, "cfiscsi_target", - targ->t_name); - nvlist_add_stringf(req.args_nvl, - "cfiscsi_portal_group_tag", "%u", pg->pg_tag); - } +bool +ioctl_port::kernel_remove_port() +{ + freebsd::nvlist_up nvl(nvlist_create(0)); + nvlist_add_stringf(nvl.get(), "port_id", "%d", p_ctl_port); - req.args = nvlist_pack(req.args_nvl, &req.args_len); - if (req.args == NULL) { - nvlist_destroy(req.args_nvl); - log_warn("error packing nvlist"); - return (1); - } + return (ctl_remove_port("ioctl", nvl.get())); +} - error = ioctl(ctl_fd, CTL_PORT_REQ, &req); - free(req.args); - nvlist_destroy(req.args_nvl); +bool +kernel_port::kernel_remove_port() +{ + struct ctl_lun_map lm; + int error; - if (error != 0) { - log_warn("error issuing CTL_PORT_REQ ioctl"); - return (1); - } - if (req.status == CTL_LUN_ERROR) { - log_warnx("error returned from port removal request: %s", - req.error_str); - return (1); - } - if (req.status != CTL_LUN_OK) { - log_warnx("unknown port removal request status %d", - req.status); - return (1); - } - } else { - /* Disable LUN mapping. */ - lm.port = port->p_ctl_port; - lm.plun = UINT32_MAX; - lm.lun = UINT32_MAX; - error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); - if (error != 0) - log_warn("CTL_LUN_MAP ioctl failed"); + /* Disable LUN mapping. */ + lm.port = p_ctl_port; + lm.plun = UINT32_MAX; + lm.lun = UINT32_MAX; + error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); + if (error != 0) + log_warn("CTL_LUN_MAP ioctl failed"); + return (true); +} + +bool +port::kernel_remove() +{ + struct ctl_port_entry entry; + int error; + + /* Disable port */ + bzero(&entry, sizeof(entry)); + entry.targ_port = p_ctl_port; + error = ioctl(ctl_fd, CTL_DISABLE_PORT, &entry); + if (error != 0) { + log_warn("CTL_DISABLE_PORT ioctl failed"); + return (false); } - return (0); + + return (kernel_remove_port()); } #ifdef ICL_KERNEL_PROXY @@ -1246,7 +1110,7 @@ void kernel_capsicate(void) { cap_rights_t rights; - const unsigned long cmds[] = { CTL_ISCSI }; + const unsigned long cmds[] = { CTL_ISCSI, CTL_NVMF }; cap_rights_init(&rights, CAP_IOCTL); if (caph_rights_limit(ctl_fd, &rights) < 0) diff --git a/usr.sbin/ctld/login.cc b/usr.sbin/ctld/login.cc index 961f57eb03fb..cda11cc1f21b 100644 --- a/usr.sbin/ctld/login.cc +++ b/usr.sbin/ctld/login.cc @@ -41,7 +41,8 @@ #include <cam/ctl/ctl_io.h> #include <cam/ctl/ctl_ioctl.h> -#include "ctld.h" +#include "ctld.hh" +#include "iscsi.hh" #include "iscsi_proto.h" #define MAX_DATA_SEGMENT_LENGTH (128 * 1024) @@ -60,9 +61,7 @@ kernel_limits(const char *offload, int s, int *max_recv_dsl, int *max_send_dsl, req.type = CTL_ISCSI_LIMITS; cilp = (struct ctl_iscsi_limits_params *)&(req.data.limits); - if (offload != NULL) { - strlcpy(cilp->offload, offload, sizeof(cilp->offload)); - } + strlcpy(cilp->offload, offload, sizeof(cilp->offload)); cilp->socket = s; if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { @@ -88,7 +87,7 @@ kernel_limits(const char *offload, int s, int *max_recv_dsl, int *max_send_dsl, if (*max_burst_length < *first_burst_length) *first_burst_length = *max_burst_length; - if (offload != NULL) { + if (offload[0] != '\0') { log_debugx("Kernel limits for offload \"%s\" are " "MaxRecvDataSegment=%d, max_send_dsl=%d, " "MaxBurstLength=%d, FirstBurstLength=%d", @@ -336,7 +335,7 @@ login_send_chap_c(struct pdu *request, struct chap *chap) static struct pdu * login_receive_chap_r(struct connection *conn, struct auth_group *ag, - struct chap *chap, const struct auth **authp) + struct chap *chap, const struct auth **authp, std::string &user) { struct pdu *request; struct keys *request_keys; @@ -367,24 +366,22 @@ login_receive_chap_r(struct connection *conn, struct auth_group *ag, /* * Verify the response. */ - assert(ag->ag_type == AG_TYPE_CHAP || - ag->ag_type == AG_TYPE_CHAP_MUTUAL); - auth = auth_find(ag, chap_n); + assert(ag->type() == auth_type::CHAP || + ag->type() == auth_type::CHAP_MUTUAL); + auth = ag->find_auth(chap_n); if (auth == NULL) { login_send_error(request, 0x02, 0x01); log_errx(1, "received CHAP Login with invalid user \"%s\"", chap_n); } - assert(auth->a_secret != NULL); - assert(strlen(auth->a_secret) > 0); - - error = chap_authenticate(chap, auth->a_secret); + error = chap_authenticate(chap, auth->secret()); if (error != 0) { login_send_error(request, 0x02, 0x01); log_errx(1, "CHAP authentication failed for user \"%s\"", - auth->a_user); + chap_n); } + user = chap_n; keys_delete(request_keys); @@ -394,7 +391,7 @@ login_receive_chap_r(struct connection *conn, struct auth_group *ag, static void login_send_chap_success(struct pdu *request, - const struct auth *auth) + const struct auth *auth, const std::string &user) { struct pdu *response; struct keys *request_keys, *response_keys; @@ -424,17 +421,17 @@ login_send_chap_success(struct pdu *request, log_errx(1, "initiator requested target " "authentication, but didn't send CHAP_C"); } - if (auth->a_auth_group->ag_type != AG_TYPE_CHAP_MUTUAL) { + if (!auth->mutual()) { login_send_error(request, 0x02, 0x01); log_errx(1, "initiator requests target authentication " "for user \"%s\", but mutual user/secret " - "is not set", auth->a_user); + "is not set", user.c_str()); } log_debugx("performing mutual authentication as user \"%s\"", - auth->a_mutual_user); + auth->mutual_user()); - rchap = rchap_new(auth->a_mutual_secret); + rchap = rchap_new(auth->mutual_secret()); error = rchap_receive(rchap, chap_i, chap_c); if (error != 0) { login_send_error(request, 0x02, 0x07); @@ -444,7 +441,7 @@ login_send_chap_success(struct pdu *request, chap_r = rchap_get_response(rchap); rchap_delete(rchap); response_keys = keys_new(); - keys_add(response_keys, "CHAP_N", auth->a_mutual_user); + keys_add(response_keys, "CHAP_N", auth->mutual_user()); keys_add(response_keys, "CHAP_R", chap_r); free(chap_r); keys_save_pdu(response_keys, response); @@ -458,9 +455,10 @@ login_send_chap_success(struct pdu *request, pdu_delete(response); } -static void -login_chap(struct ctld_connection *conn, struct auth_group *ag) +void +iscsi_connection::login_chap(struct auth_group *ag) { + std::string user; const struct auth *auth; struct chap *chap; struct pdu *request; @@ -469,7 +467,7 @@ login_chap(struct ctld_connection *conn, struct auth_group *ag) * Receive CHAP_A PDU. */ log_debugx("beginning CHAP authentication; waiting for CHAP_A"); - request = login_receive_chap_a(&conn->conn); + request = login_receive_chap_a(&conn); /* * Generate the challenge. @@ -488,32 +486,31 @@ login_chap(struct ctld_connection *conn, struct auth_group *ag) * Receive CHAP_N/CHAP_R PDU and authenticate. */ log_debugx("waiting for CHAP_N/CHAP_R"); - request = login_receive_chap_r(&conn->conn, ag, chap, &auth); + request = login_receive_chap_r(&conn, ag, chap, &auth, user); /* * Yay, authentication succeeded! */ log_debugx("authentication succeeded for user \"%s\"; " - "transitioning to operational parameter negotiation", auth->a_user); - login_send_chap_success(request, auth); + "transitioning to operational parameter negotiation", user.c_str()); + login_send_chap_success(request, auth, user); pdu_delete(request); /* * Leave username and CHAP information for discovery(). */ - conn->conn_user = auth->a_user; - conn->conn_chap = chap; + conn_user = user; + conn_chap = chap; } -static void -login_negotiate_key(struct pdu *request, const char *name, +void +iscsi_connection::login_negotiate_key(struct pdu *request, const char *name, const char *value, bool skipped_security, struct keys *response_keys) { int which; size_t tmp; - struct ctld_connection *conn; - conn = (struct ctld_connection *)request->pdu_connection; + assert(request->pdu_connection == &conn); if (strcmp(name, "InitiatorName") == 0) { if (!skipped_security) @@ -525,16 +522,14 @@ login_negotiate_key(struct pdu *request, const char *name, if (!skipped_security) log_errx(1, "initiator resent TargetName"); } else if (strcmp(name, "InitiatorAlias") == 0) { - if (conn->conn_initiator_alias != NULL) - free(conn->conn_initiator_alias); - conn->conn_initiator_alias = checked_strdup(value); + conn_initiator_alias = value; } else if (strcmp(value, "Irrelevant") == 0) { /* Ignore. */ } else if (strcmp(name, "HeaderDigest") == 0) { /* * We don't handle digests for discovery sessions. */ - if (conn->conn_session_type == CONN_SESSION_TYPE_DISCOVERY) { + if (conn_session_type == CONN_SESSION_TYPE_DISCOVERY) { log_debugx("discovery session; digests disabled"); keys_add(response_keys, name, "None"); return; @@ -545,7 +540,7 @@ login_negotiate_key(struct pdu *request, const char *name, case 1: log_debugx("initiator prefers CRC32C " "for header digest; we'll use it"); - conn->conn.conn_header_digest = CONN_DIGEST_CRC32C; + conn.conn_header_digest = CONN_DIGEST_CRC32C; keys_add(response_keys, name, "CRC32C"); break; case 2: @@ -560,7 +555,7 @@ login_negotiate_key(struct pdu *request, const char *name, break; } } else if (strcmp(name, "DataDigest") == 0) { - if (conn->conn_session_type == CONN_SESSION_TYPE_DISCOVERY) { + if (conn_session_type == CONN_SESSION_TYPE_DISCOVERY) { log_debugx("discovery session; digests disabled"); keys_add(response_keys, name, "None"); return; @@ -571,7 +566,7 @@ login_negotiate_key(struct pdu *request, const char *name, case 1: log_debugx("initiator prefers CRC32C " "for data digest; we'll use it"); - conn->conn.conn_data_digest = CONN_DIGEST_CRC32C; + conn.conn_data_digest = CONN_DIGEST_CRC32C; keys_add(response_keys, name, "CRC32C"); break; case 2: @@ -590,15 +585,15 @@ login_negotiate_key(struct pdu *request, const char *name, } else if (strcmp(name, "InitialR2T") == 0) { keys_add(response_keys, name, "Yes"); } else if (strcmp(name, "ImmediateData") == 0) { - if (conn->conn_session_type == CONN_SESSION_TYPE_DISCOVERY) { + if (conn_session_type == CONN_SESSION_TYPE_DISCOVERY) { log_debugx("discovery session; ImmediateData irrelevant"); keys_add(response_keys, name, "Irrelevant"); } else { if (strcmp(value, "Yes") == 0) { - conn->conn.conn_immediate_data = true; + conn.conn_immediate_data = true; keys_add(response_keys, name, "Yes"); } else { - conn->conn.conn_immediate_data = false; + conn.conn_immediate_data = false; keys_add(response_keys, name, "No"); } } @@ -616,25 +611,25 @@ login_negotiate_key(struct pdu *request, const char *name, * our MaxRecvDataSegmentLength is not influenced by the * initiator in any way. */ - if ((int)tmp > conn->conn_max_send_data_segment_limit) { + if ((int)tmp > conn_max_send_data_segment_limit) { log_debugx("capping MaxRecvDataSegmentLength " "from %zd to %d", tmp, - conn->conn_max_send_data_segment_limit); - tmp = conn->conn_max_send_data_segment_limit; + conn_max_send_data_segment_limit); + tmp = conn_max_send_data_segment_limit; } - conn->conn.conn_max_send_data_segment_length = tmp; + conn.conn_max_send_data_segment_length = tmp; } else if (strcmp(name, "MaxBurstLength") == 0) { tmp = strtoul(value, NULL, 10); if (tmp <= 0) { login_send_error(request, 0x02, 0x00); log_errx(1, "received invalid MaxBurstLength"); } - if ((int)tmp > conn->conn_max_burst_limit) { + if ((int)tmp > conn_max_burst_limit) { log_debugx("capping MaxBurstLength from %zd to %d", - tmp, conn->conn_max_burst_limit); - tmp = conn->conn_max_burst_limit; + tmp, conn_max_burst_limit); + tmp = conn_max_burst_limit; } - conn->conn.conn_max_burst_length = tmp; + conn.conn_max_burst_length = tmp; keys_add_int(response_keys, name, tmp); } else if (strcmp(name, "FirstBurstLength") == 0) { tmp = strtoul(value, NULL, 10); @@ -642,12 +637,12 @@ login_negotiate_key(struct pdu *request, const char *name, login_send_error(request, 0x02, 0x00); log_errx(1, "received invalid FirstBurstLength"); } - if ((int)tmp > conn->conn_first_burst_limit) { + if ((int)tmp > conn_first_burst_limit) { log_debugx("capping FirstBurstLength from %zd to %d", - tmp, conn->conn_first_burst_limit); - tmp = conn->conn_first_burst_limit; + tmp, conn_first_burst_limit); + tmp = conn_first_burst_limit; } - conn->conn.conn_first_burst_length = tmp; + conn.conn_first_burst_length = tmp; keys_add_int(response_keys, name, tmp); } else if (strcmp(name, "DefaultTime2Wait") == 0) { keys_add(response_keys, name, value); @@ -699,102 +694,100 @@ login_redirect(struct pdu *request, const char *target_address) keys_delete(response_keys); } -static bool -login_portal_redirect(struct ctld_connection *conn, struct pdu *request) +bool +iscsi_connection::login_portal_redirect(struct pdu *request) { const struct portal_group *pg; - pg = conn->conn_portal->p_portal_group; - if (pg->pg_redirection == NULL) + pg = conn_portal->portal_group(); + if (!pg->is_redirecting()) return (false); log_debugx("portal-group \"%s\" configured to redirect to %s", - pg->pg_name, pg->pg_redirection); - login_redirect(request, pg->pg_redirection); + pg->name(), pg->redirection()); + login_redirect(request, pg->redirection()); return (true); } -static bool -login_target_redirect(struct ctld_connection *conn, struct pdu *request) +bool +iscsi_connection::login_target_redirect(struct pdu *request) { const char *target_address; - assert(conn->conn_portal->p_portal_group->pg_redirection == NULL); + assert(!conn_portal->portal_group()->is_redirecting()); - if (conn->conn_target == NULL) + if (conn_target == NULL) return (false); - target_address = conn->conn_target->t_redirection; - if (target_address == NULL) + if (!conn_target->has_redirection()) return (false); + target_address = conn_target->redirection(); log_debugx("target \"%s\" configured to redirect to %s", - conn->conn_target->t_name, target_address); + conn_target->name(), target_address); login_redirect(request, target_address); return (true); } -static void -login_negotiate(struct ctld_connection *conn, struct pdu *request) +void +iscsi_connection::login_negotiate(struct pdu *request) { + struct portal_group *pg = conn_portal->portal_group(); struct pdu *response; struct iscsi_bhs_login_response *bhslr2; struct keys *request_keys, *response_keys; int i; bool redirected, skipped_security; - if (conn->conn_session_type == CONN_SESSION_TYPE_NORMAL) { + if (conn_session_type == CONN_SESSION_TYPE_NORMAL) { /* * Query the kernel for various size limits. In case of * offload, it depends on hardware capabilities. */ - assert(conn->conn_target != NULL); - conn->conn_max_recv_data_segment_limit = (1 << 24) - 1; - conn->conn_max_send_data_segment_limit = (1 << 24) - 1; - conn->conn_max_burst_limit = (1 << 24) - 1; - conn->conn_first_burst_limit = (1 << 24) - 1; - kernel_limits(conn->conn_portal->p_portal_group->pg_offload, - conn->conn.conn_socket, - &conn->conn_max_recv_data_segment_limit, - &conn->conn_max_send_data_segment_limit, - &conn->conn_max_burst_limit, - &conn->conn_first_burst_limit); + assert(conn_target != NULL); + conn_max_recv_data_segment_limit = (1 << 24) - 1; + conn_max_send_data_segment_limit = (1 << 24) - 1; + conn_max_burst_limit = (1 << 24) - 1; + conn_first_burst_limit = (1 << 24) - 1; + kernel_limits(pg->offload(), + conn_fd, + &conn_max_recv_data_segment_limit, + &conn_max_send_data_segment_limit, + &conn_max_burst_limit, + &conn_first_burst_limit); /* We expect legal, usable values at this point. */ - assert(conn->conn_max_recv_data_segment_limit >= 512); - assert(conn->conn_max_recv_data_segment_limit < (1 << 24)); - assert(conn->conn_max_send_data_segment_limit >= 512); - assert(conn->conn_max_send_data_segment_limit < (1 << 24)); - assert(conn->conn_max_burst_limit >= 512); - assert(conn->conn_max_burst_limit < (1 << 24)); - assert(conn->conn_first_burst_limit >= 512); - assert(conn->conn_first_burst_limit < (1 << 24)); - assert(conn->conn_first_burst_limit <= - conn->conn_max_burst_limit); + assert(conn_max_recv_data_segment_limit >= 512); + assert(conn_max_recv_data_segment_limit < (1 << 24)); + assert(conn_max_send_data_segment_limit >= 512); + assert(conn_max_send_data_segment_limit < (1 << 24)); + assert(conn_max_burst_limit >= 512); + assert(conn_max_burst_limit < (1 << 24)); + assert(conn_first_burst_limit >= 512); + assert(conn_first_burst_limit < (1 << 24)); + assert(conn_first_burst_limit <= conn_max_burst_limit); /* * Limit default send length in case it won't be negotiated. * We can't do it for other limits, since they may affect both * sender and receiver operation, and we must obey defaults. */ - if (conn->conn_max_send_data_segment_limit < - conn->conn.conn_max_send_data_segment_length) { - conn->conn.conn_max_send_data_segment_length = - conn->conn_max_send_data_segment_limit; + if (conn_max_send_data_segment_limit < + conn.conn_max_send_data_segment_length) { + conn.conn_max_send_data_segment_length = + conn_max_send_data_segment_limit; } } else { - conn->conn_max_recv_data_segment_limit = - MAX_DATA_SEGMENT_LENGTH; - conn->conn_max_send_data_segment_limit = - MAX_DATA_SEGMENT_LENGTH; + conn_max_recv_data_segment_limit = MAX_DATA_SEGMENT_LENGTH; + conn_max_send_data_segment_limit = MAX_DATA_SEGMENT_LENGTH; } if (request == NULL) { log_debugx("beginning operational parameter negotiation; " "waiting for Login PDU"); - request = login_receive(&conn->conn, false); + request = login_receive(&conn, false); skipped_security = false; } else skipped_security = true; @@ -805,7 +798,7 @@ login_negotiate(struct ctld_connection *conn, struct pdu *request) * authentication, but MUST be accepted afterwards; that's * why we're doing it here and not earlier. */ - redirected = login_target_redirect(conn, request); + redirected = login_target_redirect(request); if (redirected) { log_debugx("initiator redirected; exiting"); exit(0); @@ -822,12 +815,12 @@ login_negotiate(struct ctld_connection *conn, struct pdu *request) response_keys = keys_new(); if (skipped_security && - conn->conn_session_type == CONN_SESSION_TYPE_NORMAL) { - if (conn->conn_target->t_alias != NULL) + conn_session_type == CONN_SESSION_TYPE_NORMAL) { + if (conn_target->has_alias()) keys_add(response_keys, - "TargetAlias", conn->conn_target->t_alias); + "TargetAlias", conn_target->alias()); keys_add_int(response_keys, "TargetPortalGroupTag", - conn->conn_portal->p_portal_group->pg_tag); + pg->tag()); } for (i = 0; i < KEYS_MAX; i++) { @@ -846,16 +839,15 @@ login_negotiate(struct ctld_connection *conn, struct pdu *request) * pairs in the order they are in the request we might have ended up * with illegal values here. */ - if (conn->conn_session_type == CONN_SESSION_TYPE_NORMAL && - conn->conn.conn_first_burst_length > - conn->conn.conn_max_burst_length) { + if (conn_session_type == CONN_SESSION_TYPE_NORMAL && + conn.conn_first_burst_length > conn.conn_max_burst_length) { log_errx(1, "initiator sent FirstBurstLength > MaxBurstLength"); } - conn->conn.conn_max_recv_data_segment_length = - conn->conn_max_recv_data_segment_limit; + conn.conn_max_recv_data_segment_length = + conn_max_recv_data_segment_limit; keys_add_int(response_keys, "MaxRecvDataSegmentLength", - conn->conn.conn_max_recv_data_segment_length); + conn.conn_max_recv_data_segment_length); log_debugx("operational parameter negotiation done; " "transitioning to Full Feature Phase"); @@ -868,14 +860,14 @@ login_negotiate(struct ctld_connection *conn, struct pdu *request) keys_delete(request_keys); } -static void -login_wait_transition(struct ctld_connection *conn) +void +iscsi_connection::login_wait_transition() { struct pdu *request, *response; struct iscsi_bhs_login_request *bhslr; log_debugx("waiting for state transition request"); - request = login_receive(&conn->conn, false); + request = login_receive(&conn, false); bhslr = (struct iscsi_bhs_login_request *)request->pdu_bhs; if ((bhslr->bhslr_flags & BHSLR_FLAGS_TRANSIT) == 0) { login_send_error(request, 0x02, 0x00); @@ -889,11 +881,11 @@ login_wait_transition(struct ctld_connection *conn) pdu_send(response); pdu_delete(response); - login_negotiate(conn, NULL); + login_negotiate(nullptr); } void -login(struct ctld_connection *conn) +iscsi_connection::login() { struct pdu *request, *response; struct iscsi_bhs_login_request *bhslr; @@ -910,17 +902,17 @@ login(struct ctld_connection *conn) * is required, or call appropriate authentication code. */ log_debugx("beginning Login Phase; waiting for Login PDU"); - request = login_receive(&conn->conn, true); + request = login_receive(&conn, true); bhslr = (struct iscsi_bhs_login_request *)request->pdu_bhs; if (bhslr->bhslr_tsih != 0) { login_send_error(request, 0x02, 0x0a); log_errx(1, "received Login PDU with non-zero TSIH"); } - pg = conn->conn_portal->p_portal_group; + pg = conn_portal->portal_group(); - memcpy(conn->conn_initiator_isid, bhslr->bhslr_isid, - sizeof(conn->conn_initiator_isid)); + memcpy(conn_initiator_isid, bhslr->bhslr_isid, + sizeof(conn_initiator_isid)); /* * XXX: Implement the C flag some day. @@ -928,7 +920,7 @@ login(struct ctld_connection *conn) request_keys = keys_new(); keys_load_pdu(request_keys, request); - assert(conn->conn_initiator_name == NULL); + assert(conn_initiator_name.empty()); initiator_name = keys_find(request_keys, "InitiatorName"); if (initiator_name == NULL) { login_send_error(request, 0x02, 0x07); @@ -938,11 +930,12 @@ login(struct ctld_connection *conn) login_send_error(request, 0x02, 0x00); log_errx(1, "received Login PDU with invalid InitiatorName"); } - conn->conn_initiator_name = checked_strdup(initiator_name); - log_set_peer_name(conn->conn_initiator_name); - setproctitle("%s (%s)", conn->conn_initiator_addr, conn->conn_initiator_name); + conn_initiator_name = initiator_name; + log_set_peer_name(conn_initiator_name.c_str()); + setproctitle("%s (%s)", conn_initiator_addr.c_str(), + conn_initiator_name.c_str()); - redirected = login_portal_redirect(conn, request); + redirected = login_portal_redirect(request); if (redirected) { log_debugx("initiator redirected; exiting"); exit(0); @@ -950,69 +943,69 @@ login(struct ctld_connection *conn) initiator_alias = keys_find(request_keys, "InitiatorAlias"); if (initiator_alias != NULL) - conn->conn_initiator_alias = checked_strdup(initiator_alias); + conn_initiator_alias = initiator_alias; - assert(conn->conn_session_type == CONN_SESSION_TYPE_NONE); + assert(conn_session_type == CONN_SESSION_TYPE_NONE); session_type = keys_find(request_keys, "SessionType"); if (session_type != NULL) { if (strcmp(session_type, "Normal") == 0) { - conn->conn_session_type = CONN_SESSION_TYPE_NORMAL; + conn_session_type = CONN_SESSION_TYPE_NORMAL; } else if (strcmp(session_type, "Discovery") == 0) { - conn->conn_session_type = CONN_SESSION_TYPE_DISCOVERY; + conn_session_type = CONN_SESSION_TYPE_DISCOVERY; } else { login_send_error(request, 0x02, 0x00); log_errx(1, "received Login PDU with invalid " "SessionType \"%s\"", session_type); } } else - conn->conn_session_type = CONN_SESSION_TYPE_NORMAL; + conn_session_type = CONN_SESSION_TYPE_NORMAL; - assert(conn->conn_target == NULL); - if (conn->conn_session_type == CONN_SESSION_TYPE_NORMAL) { + assert(conn_target == NULL); + if (conn_session_type == CONN_SESSION_TYPE_NORMAL) { target_name = keys_find(request_keys, "TargetName"); if (target_name == NULL) { login_send_error(request, 0x02, 0x07); log_errx(1, "received Login PDU without TargetName"); } - conn->conn_port = port_find_in_pg(pg, target_name); - if (conn->conn_port == NULL) { + conn_port = pg->find_port(target_name); + if (conn_port == NULL) { login_send_error(request, 0x02, 0x03); log_errx(1, "requested target \"%s\" not found", target_name); } - conn->conn_target = conn->conn_port->p_target; + conn_target = conn_port->target(); } /* * At this point we know what kind of authentication we need. */ - if (conn->conn_session_type == CONN_SESSION_TYPE_NORMAL) { - ag = conn->conn_port->p_auth_group; - if (ag == NULL) - ag = conn->conn_target->t_auth_group; - if (ag->ag_name != NULL) { + if (conn_session_type == CONN_SESSION_TYPE_NORMAL) { + ag = conn_port->auth_group(); + if (ag == nullptr) + ag = conn_target->auth_group(); + if (conn_port->auth_group() == nullptr && + conn_target->private_auth()) { log_debugx("initiator requests to connect " - "to target \"%s\"; auth-group \"%s\"", - conn->conn_target->t_name, - ag->ag_name); + "to target \"%s\"", conn_target->name()); } else { log_debugx("initiator requests to connect " - "to target \"%s\"", conn->conn_target->t_name); + "to target \"%s\"; %s", + conn_target->name(), ag->label()); } } else { - assert(conn->conn_session_type == CONN_SESSION_TYPE_DISCOVERY); - ag = pg->pg_discovery_auth_group; + assert(conn_session_type == CONN_SESSION_TYPE_DISCOVERY); + ag = pg->discovery_auth_group(); log_debugx("initiator requests discovery session; %s", - ag->ag_label); + ag->label()); } - if (ag->ag_type == AG_TYPE_DENY) { + if (ag->type() == auth_type::DENY) { login_send_error(request, 0x02, 0x01); log_errx(1, "auth-type is \"deny\""); } - if (ag->ag_type == AG_TYPE_UNKNOWN) { + if (ag->type() == auth_type::UNKNOWN) { /* * This can happen with empty auth-group. */ @@ -1023,12 +1016,12 @@ login(struct ctld_connection *conn) /* * Enforce initiator-name and initiator-portal. */ - if (!auth_name_check(ag, initiator_name)) { + if (!ag->initiator_permitted(initiator_name)) { login_send_error(request, 0x02, 0x02); log_errx(1, "initiator does not match allowed initiator names"); } - if (!auth_portal_check(ag, &conn->conn_initiator_sa)) { + if (!ag->initiator_permitted(conn_initiator_sa)) { login_send_error(request, 0x02, 0x02); log_errx(1, "initiator does not match allowed " "initiator portals"); @@ -1039,7 +1032,7 @@ login(struct ctld_connection *conn) * at all. */ if (login_csg(request) == BHSLR_STAGE_OPERATIONAL_NEGOTIATION) { - if (ag->ag_type != AG_TYPE_NO_AUTHENTICATION) { + if (ag->type() != auth_type::NO_AUTHENTICATION) { login_send_error(request, 0x02, 0x01); log_errx(1, "initiator skipped the authentication, " "but authentication is required"); @@ -1049,7 +1042,7 @@ login(struct ctld_connection *conn) log_debugx("initiator skipped the authentication, " "and we don't need it; proceeding with negotiation"); - login_negotiate(conn, request); + login_negotiate(request); return; } @@ -1058,7 +1051,7 @@ login(struct ctld_connection *conn) response_keys = keys_new(); trans = (bhslr->bhslr_flags & BHSLR_FLAGS_TRANSIT) != 0; auth_method = keys_find(request_keys, "AuthMethod"); - if (ag->ag_type == AG_TYPE_NO_AUTHENTICATION) { + if (ag->type() == auth_type::NO_AUTHENTICATION) { log_debugx("authentication not required"); if (auth_method == NULL || login_list_contains(auth_method, "None")) { @@ -1084,12 +1077,12 @@ login(struct ctld_connection *conn) fail = true; } } - if (conn->conn_session_type == CONN_SESSION_TYPE_NORMAL) { - if (conn->conn_target->t_alias != NULL) + if (conn_session_type == CONN_SESSION_TYPE_NORMAL) { + if (conn_target->has_alias()) keys_add(response_keys, - "TargetAlias", conn->conn_target->t_alias); + "TargetAlias", conn_target->alias()); keys_add_int(response_keys, - "TargetPortalGroupTag", pg->pg_tag); + "TargetPortalGroupTag", pg->tag()); } keys_save_pdu(response_keys, response); @@ -1104,12 +1097,12 @@ login(struct ctld_connection *conn) exit(1); } - if (ag->ag_type != AG_TYPE_NO_AUTHENTICATION) { - login_chap(conn, ag); - login_negotiate(conn, NULL); + if (ag->type() != auth_type::NO_AUTHENTICATION) { + login_chap(ag); + login_negotiate(nullptr); } else if (trans) { - login_negotiate(conn, NULL); + login_negotiate(nullptr); } else { - login_wait_transition(conn); + login_wait_transition(); } } diff --git a/usr.sbin/ctld/nvmf.cc b/usr.sbin/ctld/nvmf.cc new file mode 100644 index 000000000000..d1240bfa4f6c --- /dev/null +++ b/usr.sbin/ctld/nvmf.cc @@ -0,0 +1,478 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Chelsio Communications, Inc. + * Written by: John Baldwin <jhb@FreeBSD.org> + */ + +#include <sys/param.h> +#include <sys/linker.h> +#include <sys/module.h> +#include <sys/time.h> +#include <assert.h> +#include <ctype.h> +#include <errno.h> +#include <libiscsiutil.h> +#include <libnvmf.h> +#include <libutil.h> +#include <limits.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <cam/ctl/ctl.h> +#include <cam/ctl/ctl_io.h> +#include <cam/ctl/ctl_ioctl.h> + +#include <memory> + +#include "ctld.hh" +#include "nvmf.hh" + +#define DEFAULT_MAXH2CDATA (256 * 1024) + +struct nvmf_io_portal final : public nvmf_portal { + nvmf_io_portal(struct portal_group *pg, const char *listen, + portal_protocol protocol, freebsd::addrinfo_up ai, + const struct nvmf_association_params &aparams, + nvmf_association_up na) : + nvmf_portal(pg, listen, protocol, std::move(ai), aparams, + std::move(na)) {} + + void handle_connection(freebsd::fd_up fd, const char *host, + const struct sockaddr *client_sa) override; +}; + +struct nvmf_transport_group final : public portal_group { + nvmf_transport_group(struct conf *conf, std::string_view name) : + portal_group(conf, name) {} + + const char *keyword() const override + { return "transport-group"; } + + void allocate_tag() override; + bool add_portal(const char *value, portal_protocol protocol) + override; + void add_default_portals() override; + bool set_filter(const char *str) override; + + virtual port_up create_port(struct target *target, auth_group_sp ag) + override; + virtual port_up create_port(struct target *target, uint32_t ctl_port) + override; + +private: + struct nvmf_association_params init_aparams(portal_protocol protocol); + + static uint16_t last_port_id; +}; + +struct nvmf_port final : public portal_group_port { + nvmf_port(struct target *target, struct portal_group *pg, + auth_group_sp ag) : + portal_group_port(target, pg, ag) {} + nvmf_port(struct target *target, struct portal_group *pg, + uint32_t ctl_port) : + portal_group_port(target, pg, ctl_port) {} + + bool kernel_create_port() override; + bool kernel_remove_port() override; + +private: + static bool modules_loaded; + static void load_kernel_modules(); +}; + +struct nvmf_controller final : public target { + nvmf_controller(struct conf *conf, std::string_view name) : + target(conf, "controller", name) {} + + bool add_host_nqn(std::string_view name) override; + bool add_host_address(const char *addr) override; + bool add_namespace(u_int id, const char *lun_name) override; + bool add_portal_group(const char *pg_name, const char *ag_name) + override; + struct lun *start_namespace(u_int id) override; + +protected: + struct portal_group *default_portal_group() override; +}; + +uint16_t nvmf_transport_group::last_port_id = 0; +bool nvmf_port::modules_loaded = false; + +static bool need_tcp_transport = false; + +static bool +parse_bool(const nvlist_t *nvl, const char *key, bool def) +{ + const char *value; + + if (!nvlist_exists_string(nvl, key)) + return def; + + value = nvlist_get_string(nvl, key); + if (strcasecmp(value, "true") == 0 || + strcasecmp(value, "1") == 0) + return true; + if (strcasecmp(value, "false") == 0 || + strcasecmp(value, "0") == 0) + return false; + + log_warnx("Invalid value \"%s\" for boolean option %s", value, key); + return def; +} + +static uint64_t +parse_number(const nvlist_t *nvl, const char *key, uint64_t def, uint64_t minv, + uint64_t maxv) +{ + const char *value; + int64_t val; + + if (!nvlist_exists_string(nvl, key)) + return def; + + value = nvlist_get_string(nvl, key); + if (expand_number(value, &val) == 0 && val >= 0 && + (uint64_t)val >= minv && (uint64_t)val <= maxv) + return (uint64_t)val; + + log_warnx("Invalid value \"%s\" for numeric option %s", value, key); + return def; +} + +struct nvmf_association_params +nvmf_transport_group::init_aparams(portal_protocol protocol) +{ + struct nvmf_association_params params; + memset(¶ms, 0, sizeof(params)); + + /* Options shared between discovery and I/O associations. */ + const nvlist_t *nvl = pg_options.get(); + params.tcp.header_digests = parse_bool(nvl, "HDGST", false); + params.tcp.data_digests = parse_bool(nvl, "DDGST", false); + uint64_t value = parse_number(nvl, "MAXH2CDATA", DEFAULT_MAXH2CDATA, + 4096, UINT32_MAX); + if (value % 4 != 0) { + log_warnx("Invalid value \"%ju\" for option MAXH2CDATA", + (uintmax_t)value); + value = DEFAULT_MAXH2CDATA; + } + params.tcp.maxh2cdata = value; + + switch (protocol) { + case portal_protocol::NVME_TCP: + params.sq_flow_control = parse_bool(nvl, "SQFC", false); + params.dynamic_controller_model = true; + params.max_admin_qsize = parse_number(nvl, "max_admin_qsize", + NVME_MAX_ADMIN_ENTRIES, NVME_MIN_ADMIN_ENTRIES, + NVME_MAX_ADMIN_ENTRIES); + params.max_io_qsize = parse_number(nvl, "max_io_qsize", + NVME_MAX_IO_ENTRIES, NVME_MIN_IO_ENTRIES, + NVME_MAX_IO_ENTRIES); + params.tcp.pda = 0; + break; + case portal_protocol::NVME_DISCOVERY_TCP: + params.sq_flow_control = false; + params.dynamic_controller_model = true; + params.max_admin_qsize = NVME_MAX_ADMIN_ENTRIES; + params.tcp.pda = 0; + break; + default: + __assert_unreachable(); + } + + return params; +} + +portal_group_up +nvmf_make_transport_group(struct conf *conf, std::string_view name) +{ + return std::make_unique<nvmf_transport_group>(conf, name); +} + +target_up +nvmf_make_controller(struct conf *conf, std::string_view name) +{ + return std::make_unique<nvmf_controller>(conf, name); +} + +void +nvmf_transport_group::allocate_tag() +{ + set_tag(++last_port_id); +} + +bool +nvmf_transport_group::add_portal(const char *value, portal_protocol protocol) +{ + freebsd::addrinfo_up ai; + enum nvmf_trtype trtype; + + switch (protocol) { + case portal_protocol::NVME_TCP: + trtype = NVMF_TRTYPE_TCP; + ai = parse_addr_port(value, "4420"); + break; + case portal_protocol::NVME_DISCOVERY_TCP: + trtype = NVMF_TRTYPE_TCP; + ai = parse_addr_port(value, "8009"); + break; + default: + log_warnx("unsupported transport protocol for %s", value); + return false; + } + + if (!ai) { + log_warnx("invalid listen address %s", value); + return false; + } + + struct nvmf_association_params aparams = init_aparams(protocol); + nvmf_association_up association(nvmf_allocate_association(trtype, true, + &aparams)); + if (!association) { + log_warn("Failed to create NVMe controller association"); + return false; + } + + /* + * XXX: getaddrinfo(3) may return multiple addresses; we should turn + * those into multiple portals. + */ + + portal_up portal; + if (protocol == portal_protocol::NVME_DISCOVERY_TCP) { + portal = std::make_unique<nvmf_discovery_portal>(this, value, + protocol, std::move(ai), aparams, std::move(association)); + } else { + portal = std::make_unique<nvmf_io_portal>(this, value, + protocol, std::move(ai), aparams, std::move(association)); + need_tcp_transport = true; + } + + pg_portals.emplace_back(std::move(portal)); + return true; +} + +void +nvmf_transport_group::add_default_portals() +{ + add_portal("0.0.0.0", portal_protocol::NVME_DISCOVERY_TCP); + add_portal("[::]", portal_protocol::NVME_DISCOVERY_TCP); + add_portal("0.0.0.0", portal_protocol::NVME_TCP); + add_portal("[::]", portal_protocol::NVME_TCP); +} + +bool +nvmf_transport_group::set_filter(const char *str) +{ + enum discovery_filter filter; + + if (strcmp(str, "none") == 0) { + filter = discovery_filter::NONE; + } else if (strcmp(str, "address") == 0) { + filter = discovery_filter::PORTAL; + } else if (strcmp(str, "address-name") == 0) { + filter = discovery_filter::PORTAL_NAME; + } else { + log_warnx("invalid discovery-filter \"%s\" for transport-group " + "\"%s\"; valid values are \"none\", \"address\", " + "and \"address-name\"", + str, name()); + return false; + } + + if (pg_discovery_filter != discovery_filter::UNKNOWN && + pg_discovery_filter != filter) { + log_warnx("cannot set discovery-filter to \"%s\" for " + "transport-group \"%s\"; already has a different " + "value", str, name()); + return false; + } + + pg_discovery_filter = filter; + return true; +} + +port_up +nvmf_transport_group::create_port(struct target *target, auth_group_sp ag) +{ + return std::make_unique<nvmf_port>(target, this, ag); +} + +port_up +nvmf_transport_group::create_port(struct target *target, uint32_t ctl_port) +{ + return std::make_unique<nvmf_port>(target, this, ctl_port); +} + +void +nvmf_port::load_kernel_modules() +{ + int saved_errno; + + if (modules_loaded) + return; + + saved_errno = errno; + if (modfind("nvmft") == -1 && kldload("nvmft") == -1) + log_warn("couldn't load nvmft"); + + if (need_tcp_transport) { + if (modfind("nvmf/tcp") == -1 && kldload("nvmf_tcp") == -1) + log_warn("couldn't load nvmf_tcp"); + } + + errno = saved_errno; + modules_loaded = true; +} + +bool +nvmf_port::kernel_create_port() +{ + struct portal_group *pg = p_portal_group; + struct target *targ = p_target; + + load_kernel_modules(); + + freebsd::nvlist_up nvl = pg->options(); + nvlist_add_string(nvl.get(), "subnqn", targ->name()); + nvlist_add_string(nvl.get(), "ctld_transport_group_name", + pg->name()); + nvlist_add_stringf(nvl.get(), "portid", "%u", pg->tag()); + if (!nvlist_exists_string(nvl.get(), "max_io_qsize")) + nvlist_add_stringf(nvl.get(), "max_io_qsize", "%u", + NVME_MAX_IO_ENTRIES); + + return ctl_create_port("nvmf", nvl.get(), &p_ctl_port); +} + +bool +nvmf_port::kernel_remove_port() +{ + freebsd::nvlist_up nvl(nvlist_create(0)); + nvlist_add_string(nvl.get(), "subnqn", p_target->name()); + + return ctl_remove_port("nvmf", nvl.get()); +} + +bool +nvmf_controller::add_host_nqn(std::string_view name) +{ + if (!use_private_auth("host-nqn")) + return false; + return t_auth_group->add_host_nqn(name); +} + +bool +nvmf_controller::add_host_address(const char *addr) +{ + if (!use_private_auth("host-address")) + return false; + return t_auth_group->add_host_address(addr); +} + +bool +nvmf_controller::add_namespace(u_int id, const char *lun_name) +{ + if (id == 0) { + log_warnx("namespace ID cannot be 0 for %s", label()); + return false; + } + + std::string lun_label = "namespace ID " + std::to_string(id - 1); + return target::add_lun(id, lun_label.c_str(), lun_name); +} + +bool +nvmf_controller::add_portal_group(const char *pg_name, const char *ag_name) +{ + struct portal_group *pg; + auth_group_sp ag; + + pg = t_conf->find_transport_group(pg_name); + if (pg == NULL) { + log_warnx("unknown transport-group \"%s\" for %s", pg_name, + label()); + return false; + } + + if (ag_name != NULL) { + ag = t_conf->find_auth_group(ag_name); + if (ag == NULL) { + log_warnx("unknown auth-group \"%s\" for %s", ag_name, + label()); + return false; + } + } + + if (!t_conf->add_port(this, pg, std::move(ag))) { + log_warnx("can't link transport-group \"%s\" to %s", pg_name, + label()); + return false; + } + return true; +} + +struct lun * +nvmf_controller::start_namespace(u_int id) +{ + if (id == 0) { + log_warnx("namespace ID cannot be 0 for %s", label()); + return nullptr; + } + + std::string lun_label = "namespace ID " + std::to_string(id - 1); + std::string lun_name = freebsd::stringf("%s,nsid,%u", name(), id); + return target::start_lun(id, lun_label.c_str(), lun_name.c_str()); +} + +struct portal_group * +nvmf_controller::default_portal_group() +{ + return t_conf->find_transport_group("default"); +} + +void +nvmf_io_portal::handle_connection(freebsd::fd_up fd, const char *host __unused, + const struct sockaddr *client_sa __unused) +{ + struct nvmf_qpair_params qparams; + memset(&qparams, 0, sizeof(qparams)); + qparams.tcp.fd = fd; + + struct nvmf_capsule *nc = NULL; + struct nvmf_fabric_connect_data data; + nvmf_qpair_up qp(nvmf_accept(association(), &qparams, &nc, &data)); + if (!qp) { + log_warnx("Failed to create NVMe I/O qpair: %s", + nvmf_association_error(association())); + return; + } + nvmf_capsule_up nc_guard(nc); + const struct nvmf_fabric_connect_cmd *cmd = + (const struct nvmf_fabric_connect_cmd *)nvmf_capsule_sqe(nc); + + struct ctl_nvmf req; + memset(&req, 0, sizeof(req)); + req.type = CTL_NVMF_HANDOFF; + int error = nvmf_handoff_controller_qpair(qp.get(), cmd, &data, + &req.data.handoff); + if (error != 0) { + log_warnc(error, + "Failed to prepare NVMe I/O qpair for handoff"); + return; + } + + if (ioctl(ctl_fd, CTL_NVMF, &req) != 0) + log_warn("ioctl(CTL_NVMF/CTL_NVMF_HANDOFF)"); + if (req.status == CTL_NVMF_ERROR) + log_warnx("Failed to handoff NVMF connection: %s", + req.error_str); + else if (req.status != CTL_NVMF_OK) + log_warnx("Failed to handoff NVMF connection with status %d", + req.status); +} diff --git a/usr.sbin/ctld/nvmf.hh b/usr.sbin/ctld/nvmf.hh new file mode 100644 index 000000000000..0b4f8d45adfd --- /dev/null +++ b/usr.sbin/ctld/nvmf.hh @@ -0,0 +1,71 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Chelsio Communications, Inc. + * Written by: John Baldwin <jhb@FreeBSD.org> + */ + +#ifndef __NVMF_HH__ +#define __NVMF_HH__ + +struct nvmf_association_deleter { + void operator()(struct nvmf_association *na) const + { + nvmf_free_association(na); + } +}; + +using nvmf_association_up = std::unique_ptr<nvmf_association, + nvmf_association_deleter>; + +struct nvmf_capsule_deleter { + void operator()(struct nvmf_capsule *nc) const + { + nvmf_free_capsule(nc); + } +}; + +using nvmf_capsule_up = std::unique_ptr<nvmf_capsule, nvmf_capsule_deleter>; + +struct nvmf_qpair_deleter { + void operator()(struct nvmf_qpair *qp) const + { + nvmf_free_qpair(qp); + } +}; + +using nvmf_qpair_up = std::unique_ptr<nvmf_qpair, nvmf_qpair_deleter>; + +struct nvmf_portal : public portal { + nvmf_portal(struct portal_group *pg, const char *listen, + portal_protocol protocol, freebsd::addrinfo_up ai, + const struct nvmf_association_params &aparams, + nvmf_association_up na) : + portal(pg, listen, protocol, std::move(ai)), + p_aparams(aparams), p_association(std::move(na)) {} + virtual ~nvmf_portal() override = default; + + const struct nvmf_association_params *aparams() const + { return &p_aparams; } + +protected: + struct nvmf_association *association() { return p_association.get(); } + +private: + struct nvmf_association_params p_aparams; + nvmf_association_up p_association; +}; + +struct nvmf_discovery_portal final : public nvmf_portal { + nvmf_discovery_portal(struct portal_group *pg, const char *listen, + portal_protocol protocol, freebsd::addrinfo_up ai, + const struct nvmf_association_params &aparams, + nvmf_association_up na) : + nvmf_portal(pg, listen, protocol, std::move(ai), aparams, + std::move(na)) {} + + void handle_connection(freebsd::fd_up fd, const char *host, + const struct sockaddr *client_sa) override; +}; + +#endif /* !__NVMF_HH__ */ diff --git a/usr.sbin/ctld/nvmf_discovery.cc b/usr.sbin/ctld/nvmf_discovery.cc new file mode 100644 index 000000000000..a32094ddafa1 --- /dev/null +++ b/usr.sbin/ctld/nvmf_discovery.cc @@ -0,0 +1,518 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023-2025 Chelsio Communications, Inc. + * Written by: John Baldwin <jhb@FreeBSD.org> + */ + +#include <assert.h> +#include <errno.h> +#include <netdb.h> +#include <libiscsiutil.h> +#include <libnvmf.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <netinet/in.h> + +#include "ctld.hh" +#include "nvmf.hh" + +struct discovery_log { + discovery_log(const struct portal_group *pg); + + const char *data() const { return buf.data(); } + size_t length() const { return buf.size(); } + + void append(const struct nvme_discovery_log_entry *entry); + +private: + struct nvme_discovery_log *header() + { return reinterpret_cast<struct nvme_discovery_log *>(buf.data()); } + + std::vector<char> buf; +}; + +struct discovery_controller { + discovery_controller(freebsd::fd_up s, struct nvmf_qpair *qp, + const discovery_log &discovery_log); + + void handle_admin_commands(); +private: + bool update_cc(uint32_t new_cc); + void handle_property_get(const struct nvmf_capsule *nc, + const struct nvmf_fabric_prop_get_cmd *pget); + void handle_property_set(const struct nvmf_capsule *nc, + const struct nvmf_fabric_prop_set_cmd *pset); + void handle_fabrics_command(const struct nvmf_capsule *nc, + const struct nvmf_fabric_cmd *cmd); + void handle_identify_command(const struct nvmf_capsule *nc, + const struct nvme_command *cmd); + void handle_get_log_page_command(const struct nvmf_capsule *nc, + const struct nvme_command *cmd); + + struct nvmf_qpair *qp; + + uint64_t cap = 0; + uint32_t vs = 0; + uint32_t cc = 0; + uint32_t csts = 0; + + bool shutdown = false; + + struct nvme_controller_data cdata; + + const discovery_log &discovery_log; + freebsd::fd_up s; +}; + +discovery_log::discovery_log(const struct portal_group *pg) : + buf(sizeof(nvme_discovery_log)) +{ + struct nvme_discovery_log *log = header(); + + log->genctr = htole32(pg->conf()->genctr()); + log->recfmt = 0; +} + +void +discovery_log::append(const struct nvme_discovery_log_entry *entry) +{ + const char *cp = reinterpret_cast<const char *>(entry); + buf.insert(buf.end(), cp, cp + sizeof(*entry)); + + struct nvme_discovery_log *log = header(); + log->numrec = htole32(le32toh(log->numrec) + 1); +} + +static bool +discovery_controller_filtered(const struct portal_group *pg, + const struct sockaddr *client_sa, std::string_view hostnqn, + const struct port *port) +{ + const struct target *targ = port->target(); + const struct auth_group *ag = port->auth_group(); + if (ag == nullptr) + ag = targ->auth_group(); + + assert(pg->discovery_filter() != discovery_filter::UNKNOWN); + + if (pg->discovery_filter() >= discovery_filter::PORTAL && + !ag->host_permitted(client_sa)) { + log_debugx("host address does not match addresses " + "allowed for controller \"%s\"; skipping", targ->name()); + return true; + } + + if (pg->discovery_filter() >= discovery_filter::PORTAL_NAME && + !ag->host_permitted(hostnqn) != 0) { + log_debugx("HostNQN does not match NQNs " + "allowed for controller \"%s\"; skipping", targ->name()); + return true; + } + + /* XXX: auth not yet implemented for NVMe */ + + return false; +} + +static bool +portal_uses_wildcard_address(const struct portal *p) +{ + const struct addrinfo *ai = p->ai(); + + switch (ai->ai_family) { + case AF_INET: + { + const struct sockaddr_in *sin; + + sin = (const struct sockaddr_in *)ai->ai_addr; + return sin->sin_addr.s_addr == htonl(INADDR_ANY); + } + case AF_INET6: + { + const struct sockaddr_in6 *sin6; + + sin6 = (const struct sockaddr_in6 *)ai->ai_addr; + return memcmp(&sin6->sin6_addr, &in6addr_any, + sizeof(in6addr_any)) == 0; + } + default: + __assert_unreachable(); + } +} + +static bool +init_discovery_log_entry(struct nvme_discovery_log_entry *entry, + const struct target *target, const struct portal *portal, + const char *wildcard_host) +{ + /* + * The TCP port for I/O controllers might not be fixed, so + * fetch the sockaddr of the socket to determine which port + * the kernel chose. + */ + struct sockaddr_storage ss; + socklen_t len = sizeof(ss); + if (getsockname(portal->socket(), (struct sockaddr *)&ss, &len) == -1) { + log_warn("Failed getsockname building discovery log entry"); + return false; + } + + const struct nvmf_association_params *aparams = + static_cast<const nvmf_portal *>(portal)->aparams(); + + memset(entry, 0, sizeof(*entry)); + entry->trtype = NVMF_TRTYPE_TCP; + int error = getnameinfo((struct sockaddr *)&ss, len, + (char *)entry->traddr, sizeof(entry->traddr), + (char *)entry->trsvcid, sizeof(entry->trsvcid), + NI_NUMERICHOST | NI_NUMERICSERV); + if (error != 0) { + log_warnx("Failed getnameinfo building discovery log entry: %s", + gai_strerror(error)); + return false; + } + + if (portal_uses_wildcard_address(portal)) + strncpy((char *)entry->traddr, wildcard_host, + sizeof(entry->traddr)); + switch (portal->ai()->ai_family) { + case AF_INET: + entry->adrfam = NVMF_ADRFAM_IPV4; + break; + case AF_INET6: + entry->adrfam = NVMF_ADRFAM_IPV6; + break; + default: + __assert_unreachable(); + } + entry->subtype = NVMF_SUBTYPE_NVME; + if (!aparams->sq_flow_control) + entry->treq |= (1 << 2); + entry->portid = htole16(portal->portal_group()->tag()); + entry->cntlid = htole16(NVMF_CNTLID_DYNAMIC); + entry->aqsz = aparams->max_admin_qsize; + strncpy((char *)entry->subnqn, target->name(), sizeof(entry->subnqn)); + return true; +} + +static discovery_log +build_discovery_log_page(const struct portal_group *pg, int fd, + const struct sockaddr *client_sa, + const struct nvmf_fabric_connect_data &data) +{ + discovery_log discovery_log(pg); + + struct sockaddr_storage ss; + socklen_t len = sizeof(ss); + if (getsockname(fd, (struct sockaddr *)&ss, &len) == -1) { + log_warn("build_discovery_log_page: getsockname"); + return discovery_log; + } + + char wildcard_host[NI_MAXHOST]; + int error = getnameinfo((struct sockaddr *)&ss, len, wildcard_host, + sizeof(wildcard_host), NULL, 0, NI_NUMERICHOST); + if (error != 0) { + log_warnx("build_discovery_log_page: getnameinfo: %s", + gai_strerror(error)); + return discovery_log; + } + + const char *nqn = (const char *)data.hostnqn; + std::string hostnqn(nqn, strnlen(nqn, sizeof(data.hostnqn))); + for (const auto &kv : pg->ports()) { + const struct port *port = kv.second; + if (discovery_controller_filtered(pg, client_sa, hostnqn, port)) + continue; + + for (const portal_up &portal : pg->portals()) { + if (portal->protocol() != portal_protocol::NVME_TCP) + continue; + + if (portal_uses_wildcard_address(portal.get()) && + portal->ai()->ai_family != client_sa->sa_family) + continue; + + struct nvme_discovery_log_entry entry; + if (init_discovery_log_entry(&entry, port->target(), + portal.get(), wildcard_host)) + discovery_log.append(&entry); + } + } + + return discovery_log; +} + +bool +discovery_controller::update_cc(uint32_t new_cc) +{ + uint32_t changes; + + if (shutdown) + return false; + if (!nvmf_validate_cc(qp, cap, cc, new_cc)) + return false; + + changes = cc ^ new_cc; + cc = new_cc; + + /* Handle shutdown requests. */ + if (NVMEV(NVME_CC_REG_SHN, changes) != 0 && + NVMEV(NVME_CC_REG_SHN, new_cc) != 0) { + csts &= ~NVMEM(NVME_CSTS_REG_SHST); + csts |= NVMEF(NVME_CSTS_REG_SHST, NVME_SHST_COMPLETE); + shutdown = true; + } + + if (NVMEV(NVME_CC_REG_EN, changes) != 0) { + if (NVMEV(NVME_CC_REG_EN, new_cc) == 0) { + /* Controller reset. */ + csts = 0; + shutdown = true; + } else + csts |= NVMEF(NVME_CSTS_REG_RDY, 1); + } + return true; +} + +void +discovery_controller::handle_property_get(const struct nvmf_capsule *nc, + const struct nvmf_fabric_prop_get_cmd *pget) +{ + struct nvmf_fabric_prop_get_rsp rsp; + + nvmf_init_cqe(&rsp, nc, 0); + + switch (le32toh(pget->ofst)) { + case NVMF_PROP_CAP: + if (pget->attrib.size != NVMF_PROP_SIZE_8) + goto error; + rsp.value.u64 = htole64(cap); + break; + case NVMF_PROP_VS: + if (pget->attrib.size != NVMF_PROP_SIZE_4) + goto error; + rsp.value.u32.low = htole32(vs); + break; + case NVMF_PROP_CC: + if (pget->attrib.size != NVMF_PROP_SIZE_4) + goto error; + rsp.value.u32.low = htole32(cc); + break; + case NVMF_PROP_CSTS: + if (pget->attrib.size != NVMF_PROP_SIZE_4) + goto error; + rsp.value.u32.low = htole32(csts); + break; + default: + goto error; + } + + nvmf_send_response(nc, &rsp); + return; +error: + nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD); +} + +void +discovery_controller::handle_property_set(const struct nvmf_capsule *nc, + const struct nvmf_fabric_prop_set_cmd *pset) +{ + switch (le32toh(pset->ofst)) { + case NVMF_PROP_CC: + if (pset->attrib.size != NVMF_PROP_SIZE_4) + goto error; + if (!update_cc(le32toh(pset->value.u32.low))) + goto error; + break; + default: + goto error; + } + + nvmf_send_success(nc); + return; +error: + nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD); +} + +void +discovery_controller::handle_fabrics_command(const struct nvmf_capsule *nc, + const struct nvmf_fabric_cmd *fc) +{ + switch (fc->fctype) { + case NVMF_FABRIC_COMMAND_PROPERTY_GET: + handle_property_get(nc, + (const struct nvmf_fabric_prop_get_cmd *)fc); + break; + case NVMF_FABRIC_COMMAND_PROPERTY_SET: + handle_property_set(nc, + (const struct nvmf_fabric_prop_set_cmd *)fc); + break; + case NVMF_FABRIC_COMMAND_CONNECT: + log_warnx("CONNECT command on connected queue"); + nvmf_send_generic_error(nc, NVME_SC_COMMAND_SEQUENCE_ERROR); + break; + case NVMF_FABRIC_COMMAND_DISCONNECT: + log_warnx("DISCONNECT command on admin queue"); + nvmf_send_error(nc, NVME_SCT_COMMAND_SPECIFIC, + NVMF_FABRIC_SC_INVALID_QUEUE_TYPE); + break; + default: + log_warnx("Unsupported fabrics command %#x", fc->fctype); + nvmf_send_generic_error(nc, NVME_SC_INVALID_OPCODE); + break; + } +} + +void +discovery_controller::handle_identify_command(const struct nvmf_capsule *nc, + const struct nvme_command *cmd) +{ + uint8_t cns; + + cns = le32toh(cmd->cdw10) & 0xFF; + switch (cns) { + case 1: + break; + default: + log_warnx("Unsupported CNS %#x for IDENTIFY", cns); + goto error; + } + + nvmf_send_controller_data(nc, &cdata, sizeof(cdata)); + return; +error: + nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD); +} + +void +discovery_controller::handle_get_log_page_command(const struct nvmf_capsule *nc, + const struct nvme_command *cmd) +{ + uint64_t offset; + uint32_t length; + + switch (nvmf_get_log_page_id(cmd)) { + case NVME_LOG_DISCOVERY: + break; + default: + log_warnx("Unsupported log page %u for discovery controller", + nvmf_get_log_page_id(cmd)); + goto error; + } + + offset = nvmf_get_log_page_offset(cmd); + if (offset >= discovery_log.length()) + goto error; + + length = nvmf_get_log_page_length(cmd); + if (length > discovery_log.length() - offset) + length = discovery_log.length() - offset; + + nvmf_send_controller_data(nc, discovery_log.data() + offset, length); + return; +error: + nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD); +} + +void +discovery_controller::handle_admin_commands() +{ + for (;;) { + struct nvmf_capsule *nc; + int error = nvmf_controller_receive_capsule(qp, &nc); + if (error != 0) { + if (error != ECONNRESET) + log_warnc(error, + "Failed to read command capsule"); + break; + } + nvmf_capsule_up nc_guard(nc); + + const struct nvme_command *cmd = + (const struct nvme_command *)nvmf_capsule_sqe(nc); + + /* + * Only permit Fabrics commands while a controller is + * disabled. + */ + if (NVMEV(NVME_CC_REG_EN, cc) == 0 && + cmd->opc != NVME_OPC_FABRICS_COMMANDS) { + log_warnx("Unsupported admin opcode %#x while disabled\n", + cmd->opc); + nvmf_send_generic_error(nc, + NVME_SC_COMMAND_SEQUENCE_ERROR); + continue; + } + + switch (cmd->opc) { + case NVME_OPC_FABRICS_COMMANDS: + handle_fabrics_command(nc, + (const struct nvmf_fabric_cmd *)cmd); + break; + case NVME_OPC_IDENTIFY: + handle_identify_command(nc, cmd); + break; + case NVME_OPC_GET_LOG_PAGE: + handle_get_log_page_command(nc, cmd); + break; + default: + log_warnx("Unsupported admin opcode %#x", cmd->opc); + nvmf_send_generic_error(nc, NVME_SC_INVALID_OPCODE); + break; + } + } +} + +discovery_controller::discovery_controller(freebsd::fd_up fd, + struct nvmf_qpair *qp, const struct discovery_log &discovery_log) : + qp(qp), discovery_log(discovery_log), s(std::move(fd)) +{ + nvmf_init_discovery_controller_data(qp, &cdata); + cap = nvmf_controller_cap(qp); + vs = cdata.ver; +} + +void +nvmf_discovery_portal::handle_connection(freebsd::fd_up fd, + const char *host __unused, const struct sockaddr *client_sa) +{ + struct nvmf_qpair_params qparams; + memset(&qparams, 0, sizeof(qparams)); + qparams.tcp.fd = fd; + + struct nvmf_capsule *nc = NULL; + struct nvmf_fabric_connect_data data; + nvmf_qpair_up qp(nvmf_accept(association(), &qparams, &nc, &data)); + if (!qp) { + log_warnx("Failed to create NVMe discovery qpair: %s", + nvmf_association_error(association())); + return; + } + nvmf_capsule_up nc_guard(nc); + + if (strncmp((char *)data.subnqn, NVMF_DISCOVERY_NQN, + sizeof(data.subnqn)) != 0) { + log_warnx("Discovery NVMe qpair with invalid SubNQN: %.*s", + (int)sizeof(data.subnqn), data.subnqn); + nvmf_connect_invalid_parameters(nc, true, + offsetof(struct nvmf_fabric_connect_data, subnqn)); + return; + } + + /* Just use a controller ID of 1 for all discovery controllers. */ + int error = nvmf_finish_accept(nc, 1); + if (error != 0) { + log_warnc(error, "Failed to send NVMe CONNECT reponse"); + return; + } + nc_guard.reset(); + + discovery_log discovery_log = build_discovery_log_page(portal_group(), + fd, client_sa, data); + + discovery_controller controller(std::move(fd), qp.get(), discovery_log); + controller.handle_admin_commands(); +} diff --git a/usr.sbin/ctld/parse.y b/usr.sbin/ctld/parse.y index c0146262e895..5725c16b459a 100644 --- a/usr.sbin/ctld/parse.y +++ b/usr.sbin/ctld/parse.y @@ -54,12 +54,14 @@ extern void yyrestart(FILE *); %} %token ALIAS AUTH_GROUP AUTH_TYPE BACKEND BLOCKSIZE CHAP CHAP_MUTUAL -%token CLOSING_BRACKET CTL_LUN DEBUG DEVICE_ID DEVICE_TYPE -%token DISCOVERY_AUTH_GROUP DISCOVERY_FILTER DSCP FOREIGN +%token CLOSING_BRACKET CONTROLLER CTL_LUN DEBUG DEVICE_ID DEVICE_TYPE +%token DISCOVERY_AUTH_GROUP DISCOVERY_FILTER DISCOVERY_TCP DSCP FOREIGN +%token HOST_ADDRESS HOST_NQN %token INITIATOR_NAME INITIATOR_PORTAL ISNS_SERVER ISNS_PERIOD ISNS_TIMEOUT -%token LISTEN LISTEN_ISER LUN MAXPROC OFFLOAD OPENING_BRACKET OPTION +%token LISTEN LISTEN_ISER LUN MAXPROC NAMESPACE +%token OFFLOAD OPENING_BRACKET OPTION %token PATH PCP PIDFILE PORT PORTAL_GROUP REDIRECT SEMICOLON SERIAL -%token SIZE STR TAG TARGET TIMEOUT +%token SIZE STR TAG TARGET TCP TIMEOUT TRANSPORT_GROUP %token AF11 AF12 AF13 AF21 AF22 AF23 AF31 AF32 AF33 AF41 AF42 AF43 %token BE EF CS0 CS1 CS2 CS3 CS4 CS5 CS6 CS7 @@ -98,9 +100,13 @@ statement: | portal_group | + transport_group + | lun | target + | + controller ; debug: DEBUG STR @@ -232,6 +238,10 @@ auth_group_entry: | auth_group_chap_mutual | + auth_group_host_address + | + auth_group_host_nqn + | auth_group_initiator_name | auth_group_initiator_portal @@ -274,6 +284,28 @@ auth_group_chap_mutual: CHAP_MUTUAL STR STR STR STR } ; +auth_group_host_address: HOST_ADDRESS STR + { + bool ok; + + ok = auth_group_add_host_address($2); + free($2); + if (!ok) + return (1); + } + ; + +auth_group_host_nqn: HOST_NQN STR + { + bool ok; + + ok = auth_group_add_host_nqn($2); + free($2); + if (!ok) + return (1); + } + ; + auth_group_initiator_name: INITIATOR_NAME STR { bool ok; @@ -502,6 +534,71 @@ portal_group_pcp: PCP STR } ; +transport_group: TRANSPORT_GROUP transport_group_name + OPENING_BRACKET transport_group_entries CLOSING_BRACKET + { + portal_group_finish(); + } + ; + +transport_group_name: STR + { + bool ok; + + ok = transport_group_start($1); + free($1); + if (!ok) + return (1); + } + ; + +transport_group_entries: + | + transport_group_entries transport_group_entry + | + transport_group_entries transport_group_entry SEMICOLON + ; + +transport_group_entry: + portal_group_discovery_auth_group + | + portal_group_discovery_filter + | + transport_group_listen_discovery_tcp + | + transport_group_listen_tcp + | + portal_group_option + | + portal_group_tag + | + portal_group_dscp + | + portal_group_pcp + ; + +transport_group_listen_discovery_tcp: LISTEN DISCOVERY_TCP STR + { + bool ok; + + ok = transport_group_add_listen_discovery_tcp($3); + free($3); + if (!ok) + return (1); + } + ; + +transport_group_listen_tcp: LISTEN TCP STR + { + bool ok; + + ok = transport_group_add_listen_tcp($3); + free($3); + if (!ok) + return (1); + } + ; + lun: LUN lun_name OPENING_BRACKET lun_entries CLOSING_BRACKET { @@ -738,6 +835,133 @@ target_lun_ref: LUN STR STR } ; +controller: CONTROLLER controller_name + OPENING_BRACKET controller_entries CLOSING_BRACKET + { + target_finish(); + } + ; + +controller_name: STR + { + bool ok; + + ok = controller_start($1); + free($1); + if (!ok) + return (1); + } + ; + +controller_entries: + | + controller_entries controller_entry + | + controller_entries controller_entry SEMICOLON + ; + +controller_entry: + target_auth_group + | + target_auth_type + | + controller_host_address + | + controller_host_nqn + | + controller_transport_group + | + controller_namespace + | + controller_namespace_ref + ; + +controller_host_address: HOST_ADDRESS STR + { + bool ok; + + ok = controller_add_host_address($2); + free($2); + if (!ok) + return (1); + } + ; + +controller_host_nqn: HOST_NQN STR + { + bool ok; + + ok = controller_add_host_nqn($2); + free($2); + if (!ok) + return (1); + } + ; + +controller_transport_group: TRANSPORT_GROUP STR STR + { + bool ok; + + ok = target_add_portal_group($2, $3); + free($2); + free($3); + if (!ok) + return (1); + } + | TRANSPORT_GROUP STR + { + bool ok; + + ok = target_add_portal_group($2, NULL); + free($2); + if (!ok) + return (1); + } + ; + +controller_namespace: NAMESPACE ns_number + OPENING_BRACKET lun_entries CLOSING_BRACKET + { + lun_finish(); + } + ; + +ns_number: STR + { + uint64_t tmp; + + if (expand_number($1, &tmp) != 0) { + yyerror("invalid numeric value"); + free($1); + return (1); + } + free($1); + + if (!controller_start_namespace(tmp)) + return (1); + } + ; + +controller_namespace_ref: NAMESPACE STR STR + { + uint64_t tmp; + bool ok; + + if (expand_number($2, &tmp) != 0) { + yyerror("invalid numeric value"); + free($2); + free($3); + return (1); + } + free($2); + + ok = controller_add_namespace(tmp, $3); + free($3); + if (!ok) + return (1); + } + ; + lun_entries: | lun_entries lun_entry @@ -890,20 +1114,14 @@ yyerror(const char *str) } bool -parse_conf(const char *path) +yyparse_conf(FILE *fp) { int error; - yyin = fopen(path, "r"); - if (yyin == NULL) { - log_warn("unable to open configuration file %s", path); - return (false); - } - + yyin = fp; lineno = 1; yyrestart(yyin); error = yyparse(); - fclose(yyin); return (error == 0); } diff --git a/usr.sbin/ctld/token.l b/usr.sbin/ctld/token.l index c8f54103db55..5f959f648969 100644 --- a/usr.sbin/ctld/token.l +++ b/usr.sbin/ctld/token.l @@ -54,21 +54,26 @@ backend { return BACKEND; } blocksize { return BLOCKSIZE; } chap { return CHAP; } chap-mutual { return CHAP_MUTUAL; } +controller { return CONTROLLER; } ctl-lun { return CTL_LUN; } debug { return DEBUG; } device-id { return DEVICE_ID; } device-type { return DEVICE_TYPE; } discovery-auth-group { return DISCOVERY_AUTH_GROUP; } discovery-filter { return DISCOVERY_FILTER; } +discovery-tcp { return DISCOVERY_TCP; } dscp { return DSCP; } pcp { return PCP; } foreign { return FOREIGN; } +host-address { return HOST_ADDRESS; } +host-nqn { return HOST_NQN; } initiator-name { return INITIATOR_NAME; } initiator-portal { return INITIATOR_PORTAL; } listen { return LISTEN; } listen-iser { return LISTEN_ISER; } lun { return LUN; } maxproc { return MAXPROC; } +namespace { return NAMESPACE; } offload { return OFFLOAD; } option { return OPTION; } path { return PATH; } @@ -83,7 +88,9 @@ serial { return SERIAL; } size { return SIZE; } tag { return TAG; } target { return TARGET; } +tcp { return TCP; } timeout { return TIMEOUT; } +transport-group { return TRANSPORT_GROUP; } af11 { return AF11; } af12 { return AF12; } af13 { return AF13; } diff --git a/usr.sbin/ctld/uclparse.cc b/usr.sbin/ctld/uclparse.cc index 1eb9f7736e4b..cb3b0a17cd74 100644 --- a/usr.sbin/ctld/uclparse.cc +++ b/usr.sbin/ctld/uclparse.cc @@ -37,297 +37,392 @@ #include <stdint.h> #include <stdlib.h> #include <string.h> -#include <ucl.h> +#include <ucl++.h> #include <netinet/in.h> #include <netinet/ip.h> +#include <libutil++.hh> +#include <memory> + #include "conf.h" -#include "ctld.h" - -static bool uclparse_toplevel(const ucl_object_t *); -static bool uclparse_chap(const char *, const ucl_object_t *); -static bool uclparse_chap_mutual(const char *, const ucl_object_t *); -static bool uclparse_lun(const char *, const ucl_object_t *); -static bool uclparse_lun_entries(const char *, const ucl_object_t *); -static bool uclparse_auth_group(const char *, const ucl_object_t *); -static bool uclparse_portal_group(const char *, const ucl_object_t *); -static bool uclparse_target(const char *, const ucl_object_t *); -static bool uclparse_target_portal_group(const char *, const ucl_object_t *); -static bool uclparse_target_lun(const char *, const ucl_object_t *); +#include "ctld.hh" + +struct scope_exit { + using callback = void(); + scope_exit(callback *fn) : fn(fn) {} + + ~scope_exit() { fn(); } + +private: + callback *fn; +}; + +static bool uclparse_toplevel(const ucl::Ucl &); +static bool uclparse_chap(const char *, const ucl::Ucl &); +static bool uclparse_chap_mutual(const char *, const ucl::Ucl &); +static bool uclparse_lun(const char *, const ucl::Ucl &); +static bool uclparse_lun_entries(const char *, const ucl::Ucl &); +static bool uclparse_auth_group(const char *, const ucl::Ucl &); +static bool uclparse_portal_group(const char *, const ucl::Ucl &); +static bool uclparse_transport_group(const char *, const ucl::Ucl &); +static bool uclparse_controller(const char *, const ucl::Ucl &); +static bool uclparse_controller_transport_group(const char *, const ucl::Ucl &); +static bool uclparse_controller_namespace(const char *, const ucl::Ucl &); +static bool uclparse_target(const char *, const ucl::Ucl &); +static bool uclparse_target_portal_group(const char *, const ucl::Ucl &); +static bool uclparse_target_lun(const char *, const ucl::Ucl &); static bool -uclparse_chap(const char *ag_name, const ucl_object_t *obj) +uclparse_chap(const char *ag_name, const ucl::Ucl &obj) { - const ucl_object_t *user, *secret; - - user = ucl_object_find_key(obj, "user"); - if (!user || user->type != UCL_STRING) { + auto user = obj["user"]; + if (!user || user.type() != UCL_STRING) { log_warnx("chap section in auth-group \"%s\" is missing " "\"user\" string key", ag_name); return (false); } - secret = ucl_object_find_key(obj, "secret"); - if (!secret || secret->type != UCL_STRING) { + auto secret = obj["secret"]; + if (!secret || secret.type() != UCL_STRING) { log_warnx("chap section in auth-group \"%s\" is missing " "\"secret\" string key", ag_name); return (false); } return (auth_group_add_chap( - ucl_object_tostring(user), - ucl_object_tostring(secret))); + user.string_value().c_str(), + secret.string_value().c_str())); } static bool -uclparse_chap_mutual(const char *ag_name, const ucl_object_t *obj) +uclparse_chap_mutual(const char *ag_name, const ucl::Ucl &obj) { - const ucl_object_t *user, *secret, *mutual_user; - const ucl_object_t *mutual_secret; - - user = ucl_object_find_key(obj, "user"); - if (!user || user->type != UCL_STRING) { + auto user = obj["user"]; + if (!user || user.type() != UCL_STRING) { log_warnx("chap-mutual section in auth-group \"%s\" is missing " "\"user\" string key", ag_name); return (false); } - secret = ucl_object_find_key(obj, "secret"); - if (!secret || secret->type != UCL_STRING) { + auto secret = obj["secret"]; + if (!secret || secret.type() != UCL_STRING) { log_warnx("chap-mutual section in auth-group \"%s\" is missing " "\"secret\" string key", ag_name); return (false); } - mutual_user = ucl_object_find_key(obj, "mutual-user"); - if (!mutual_user || mutual_user->type != UCL_STRING) { + auto mutual_user = obj["mutual-user"]; + if (!mutual_user || mutual_user.type() != UCL_STRING) { log_warnx("chap-mutual section in auth-group \"%s\" is missing " "\"mutual-user\" string key", ag_name); return (false); } - mutual_secret = ucl_object_find_key(obj, "mutual-secret"); - if (!mutual_secret || mutual_secret->type != UCL_STRING) { + auto mutual_secret = obj["mutual-secret"]; + if (!mutual_secret || mutual_secret.type() != UCL_STRING) { log_warnx("chap-mutual section in auth-group \"%s\" is missing " "\"mutual-secret\" string key", ag_name); return (false); } return (auth_group_add_chap_mutual( - ucl_object_tostring(user), - ucl_object_tostring(secret), - ucl_object_tostring(mutual_user), - ucl_object_tostring(mutual_secret))); + user.string_value().c_str(), + secret.string_value().c_str(), + mutual_user.string_value().c_str(), + mutual_secret.string_value().c_str())); } static bool -uclparse_target_chap(const char *t_name, const ucl_object_t *obj) +uclparse_target_chap(const char *t_name, const ucl::Ucl &obj) { - const ucl_object_t *user, *secret; - - user = ucl_object_find_key(obj, "user"); - if (!user || user->type != UCL_STRING) { + auto user = obj["user"]; + if (!user || user.type() != UCL_STRING) { log_warnx("chap section in target \"%s\" is missing " "\"user\" string key", t_name); return (false); } - secret = ucl_object_find_key(obj, "secret"); - if (!secret || secret->type != UCL_STRING) { + auto secret = obj["secret"]; + if (!secret || secret.type() != UCL_STRING) { log_warnx("chap section in target \"%s\" is missing " "\"secret\" string key", t_name); return (false); } return (target_add_chap( - ucl_object_tostring(user), - ucl_object_tostring(secret))); + user.string_value().c_str(), + secret.string_value().c_str())); } static bool -uclparse_target_chap_mutual(const char *t_name, const ucl_object_t *obj) +uclparse_target_chap_mutual(const char *t_name, const ucl::Ucl &obj) { - const ucl_object_t *user, *secret, *mutual_user; - const ucl_object_t *mutual_secret; - - user = ucl_object_find_key(obj, "user"); - if (!user || user->type != UCL_STRING) { + auto user = obj["user"]; + if (!user || user.type() != UCL_STRING) { log_warnx("chap-mutual section in target \"%s\" is missing " "\"user\" string key", t_name); return (false); } - secret = ucl_object_find_key(obj, "secret"); - if (!secret || secret->type != UCL_STRING) { + auto secret = obj["secret"]; + if (!secret || secret.type() != UCL_STRING) { log_warnx("chap-mutual section in target \"%s\" is missing " "\"secret\" string key", t_name); return (false); } - mutual_user = ucl_object_find_key(obj, "mutual-user"); - if (!mutual_user || mutual_user->type != UCL_STRING) { + auto mutual_user = obj["mutual-user"]; + if (!mutual_user || mutual_user.type() != UCL_STRING) { log_warnx("chap-mutual section in target \"%s\" is missing " "\"mutual-user\" string key", t_name); return (false); } - mutual_secret = ucl_object_find_key(obj, "mutual-secret"); - if (!mutual_secret || mutual_secret->type != UCL_STRING) { + auto mutual_secret = obj["mutual-secret"]; + if (!mutual_secret || mutual_secret.type() != UCL_STRING) { log_warnx("chap-mutual section in target \"%s\" is missing " "\"mutual-secret\" string key", t_name); return (false); } return (target_add_chap_mutual( - ucl_object_tostring(user), - ucl_object_tostring(secret), - ucl_object_tostring(mutual_user), - ucl_object_tostring(mutual_secret))); + user.string_value().c_str(), + secret.string_value().c_str(), + mutual_user.string_value().c_str(), + mutual_secret.string_value().c_str())); } static bool -uclparse_target_portal_group(const char *t_name, const ucl_object_t *obj) +uclparse_target_portal_group(const char *t_name, const ucl::Ucl &obj) { - const ucl_object_t *portal_group, *auth_group; - const char *ag_name; - /* * If the value is a single string, assume it is a * portal-group name. */ - if (obj->type == UCL_STRING) - return (target_add_portal_group(ucl_object_tostring(obj), + if (obj.type() == UCL_STRING) + return (target_add_portal_group(obj.string_value().c_str(), NULL)); - if (obj->type != UCL_OBJECT) { + if (obj.type() != UCL_OBJECT) { log_warnx("portal-group section in target \"%s\" must be " "an object or string", t_name); return (false); } - portal_group = ucl_object_find_key(obj, "name"); - if (!portal_group || portal_group->type != UCL_STRING) { + auto portal_group = obj["name"]; + if (!portal_group || portal_group.type() != UCL_STRING) { log_warnx("portal-group section in target \"%s\" is missing " "\"name\" string key", t_name); return (false); } - auth_group = ucl_object_find_key(obj, "auth-group-name"); - if (auth_group != NULL) { - if (auth_group->type != UCL_STRING) { + auto auth_group = obj["auth-group-name"]; + if (auth_group) { + if (auth_group.type() != UCL_STRING) { log_warnx("\"auth-group-name\" property in " "portal-group section for target \"%s\" is not " "a string", t_name); return (false); } - ag_name = ucl_object_tostring(auth_group); - } else - ag_name = NULL; + return (target_add_portal_group( + portal_group.string_value().c_str(), + auth_group.string_value().c_str())); + } + + return (target_add_portal_group(portal_group.string_value().c_str(), + NULL)); +} + +static bool +uclparse_controller_transport_group(const char *t_name, const ucl::Ucl &obj) +{ + /* + * If the value is a single string, assume it is a + * transport-group name. + */ + if (obj.type() == UCL_STRING) + return target_add_portal_group(obj.string_value().c_str(), + nullptr); + + if (obj.type() != UCL_OBJECT) { + log_warnx("transport-group section in controller \"%s\" must " + "be an object or string", t_name); + return false; + } + + auto portal_group = obj["name"]; + if (!portal_group || portal_group.type() != UCL_STRING) { + log_warnx("transport-group section in controller \"%s\" is " + "missing \"name\" string key", t_name); + return false; + } + + auto auth_group = obj["auth-group-name"]; + if (auth_group) { + if (auth_group.type() != UCL_STRING) { + log_warnx("\"auth-group-name\" property in " + "transport-group section for controller \"%s\" is " + "not a string", t_name); + return false; + } + return target_add_portal_group( + portal_group.string_value().c_str(), + auth_group.string_value().c_str()); + } - return (target_add_portal_group(ucl_object_tostring(portal_group), - ag_name)); + return target_add_portal_group(portal_group.string_value().c_str(), + nullptr); } static bool -uclparse_target_lun(const char *t_name, const ucl_object_t *obj) +uclparse_target_lun(const char *t_name, const ucl::Ucl &obj) { - const ucl_object_t *num; - const ucl_object_t *name; - const char *key; - char *end, *lun_name; + char *end; u_int id; - bool ok; - key = ucl_object_key(obj); - if (key != NULL) { - id = strtoul(key, &end, 0); + std::string key = obj.key(); + if (!key.empty()) { + id = strtoul(key.c_str(), &end, 0); if (*end != '\0') { log_warnx("lun key \"%s\" in target \"%s\" is invalid", - key, t_name); + key.c_str(), t_name); return (false); } - if (obj->type == UCL_STRING) - return (target_add_lun(id, ucl_object_tostring(obj))); + if (obj.type() == UCL_STRING) + return (target_add_lun(id, obj.string_value().c_str())); } - if (obj->type != UCL_OBJECT) { + if (obj.type() != UCL_OBJECT) { log_warnx("lun section entries in target \"%s\" must be objects", t_name); return (false); } - if (key == NULL) { - num = ucl_object_find_key(obj, "number"); - if (num == NULL || num->type != UCL_INT) { + if (key.empty()) { + auto num = obj["number"]; + if (!num || num.type() != UCL_INT) { log_warnx("lun section in target \"%s\" is missing " "\"number\" integer property", t_name); return (false); } - id = ucl_object_toint(num); + id = num.int_value(); } - name = ucl_object_find_key(obj, "name"); - if (name == NULL) { + auto name = obj["name"]; + if (!name) { if (!target_start_lun(id)) return (false); - asprintf(&lun_name, "lun %u for target \"%s\"", id, t_name); - ok = uclparse_lun_entries(lun_name, obj); - free(lun_name); - return (ok); + scope_exit finisher(lun_finish); + std::string lun_name = + freebsd::stringf("lun %u for target \"%s\"", id, t_name); + return (uclparse_lun_entries(lun_name.c_str(), obj)); } - if (name->type != UCL_STRING) { + if (name.type() != UCL_STRING) { log_warnx("\"name\" property for lun %u for target " "\"%s\" is not a string", id, t_name); return (false); } - return (target_add_lun(id, ucl_object_tostring(name))); + return (target_add_lun(id, name.string_value().c_str())); } static bool -uclparse_toplevel(const ucl_object_t *top) +uclparse_controller_namespace(const char *t_name, const ucl::Ucl &obj) { - ucl_object_iter_t it = NULL, iter = NULL; - const ucl_object_t *obj = NULL, *child = NULL; + char *end; + u_int id; + + std::string key = obj.key(); + if (!key.empty()) { + id = strtoul(key.c_str(), &end, 0); + if (*end != '\0') { + log_warnx("namespace key \"%s\" in controller \"%s\"" + " is invalid", key.c_str(), t_name); + return false; + } + + if (obj.type() == UCL_STRING) + return controller_add_namespace(id, + obj.string_value().c_str()); + } + + if (obj.type() != UCL_OBJECT) { + log_warnx("namespace section entries in controller \"%s\"" + " must be objects", t_name); + return false; + } + + if (key.empty()) { + auto num = obj["number"]; + if (!num || num.type() != UCL_INT) { + log_warnx("namespace section in controller \"%s\" is " + "missing \"id\" integer property", t_name); + return (false); + } + id = num.int_value(); + } + + auto name = obj["name"]; + if (!name) { + if (!controller_start_namespace(id)) + return false; + + std::string lun_name = + freebsd::stringf("namespace %u for controller \"%s\"", id, + t_name); + return uclparse_lun_entries(lun_name.c_str(), obj); + } + + if (name.type() != UCL_STRING) { + log_warnx("\"name\" property for namespace %u for " + "controller \"%s\" is not a string", id, t_name); + return (false); + } + return controller_add_namespace(id, name.string_value().c_str()); +} + +static bool +uclparse_toplevel(const ucl::Ucl &top) +{ /* Pass 1 - everything except targets */ - while ((obj = ucl_iterate_object(top, &it, true))) { - const char *key = ucl_object_key(obj); + for (const auto &obj : top) { + std::string key = obj.key(); - if (strcmp(key, "debug") == 0) { - if (obj->type == UCL_INT) - conf_set_debug(ucl_object_toint(obj)); + if (key == "debug") { + if (obj.type() == UCL_INT) + conf_set_debug(obj.int_value()); else { log_warnx("\"debug\" property value is not integer"); return (false); } } - if (strcmp(key, "timeout") == 0) { - if (obj->type == UCL_INT) - conf_set_timeout(ucl_object_toint(obj)); + if (key == "timeout") { + if (obj.type() == UCL_INT) + conf_set_timeout(obj.int_value()); else { log_warnx("\"timeout\" property value is not integer"); return (false); } } - if (strcmp(key, "maxproc") == 0) { - if (obj->type == UCL_INT) - conf_set_maxproc(ucl_object_toint(obj)); + if (key == "maxproc") { + if (obj.type() == UCL_INT) + conf_set_maxproc(obj.int_value()); else { log_warnx("\"maxproc\" property value is not integer"); return (false); } } - if (strcmp(key, "pidfile") == 0) { - if (obj->type == UCL_STRING) { + if (key == "pidfile") { + if (obj.type() == UCL_STRING) { if (!conf_set_pidfile_path( - ucl_object_tostring(obj))) + obj.string_value().c_str())) return (false); } else { log_warnx("\"pidfile\" property value is not string"); @@ -335,16 +430,14 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (strcmp(key, "isns-server") == 0) { - if (obj->type == UCL_ARRAY) { - iter = NULL; - while ((child = ucl_iterate_object(obj, &iter, - true))) { - if (child->type != UCL_STRING) + if (key == "isns-server") { + if (obj.type() == UCL_ARRAY) { + for (const auto &child : obj) { + if (child.type() != UCL_STRING) return (false); if (!isns_add_server( - ucl_object_tostring(child))) + child.string_value().c_str())) return (false); } } else { @@ -354,30 +447,29 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (strcmp(key, "isns-period") == 0) { - if (obj->type == UCL_INT) - conf_set_isns_period(ucl_object_toint(obj)); + if (key == "isns-period") { + if (obj.type() == UCL_INT) + conf_set_isns_period(obj.int_value()); else { log_warnx("\"isns-period\" property value is not integer"); return (false); } } - if (strcmp(key, "isns-timeout") == 0) { - if (obj->type == UCL_INT) - conf_set_isns_timeout(ucl_object_toint(obj)); + if (key == "isns-timeout") { + if (obj.type() == UCL_INT) + conf_set_isns_timeout(obj.int_value()); else { log_warnx("\"isns-timeout\" property value is not integer"); return (false); } } - if (strcmp(key, "auth-group") == 0) { - if (obj->type == UCL_OBJECT) { - iter = NULL; - while ((child = ucl_iterate_object(obj, &iter, true))) { + if (key == "auth-group") { + if (obj.type() == UCL_OBJECT) { + for (const auto &child : obj) { if (!uclparse_auth_group( - ucl_object_key(child), child)) + child.key().c_str(), child)) return (false); } } else { @@ -386,12 +478,11 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (strcmp(key, "portal-group") == 0) { - if (obj->type == UCL_OBJECT) { - iter = NULL; - while ((child = ucl_iterate_object(obj, &iter, true))) { + if (key == "portal-group") { + if (obj.type() == UCL_OBJECT) { + for (const auto &child : obj) { if (!uclparse_portal_group( - ucl_object_key(child), child)) + child.key().c_str(), child)) return (false); } } else { @@ -400,11 +491,23 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (strcmp(key, "lun") == 0) { - if (obj->type == UCL_OBJECT) { - iter = NULL; - while ((child = ucl_iterate_object(obj, &iter, true))) { - if (!uclparse_lun(ucl_object_key(child), + if (key == "transport-group") { + if (obj.type() == UCL_OBJECT) { + for (const auto &child : obj) { + if (!uclparse_transport_group( + child.key().c_str(), child)) + return false; + } + } else { + log_warnx("\"transport-group\" section is not an object"); + return false; + } + } + + if (key == "lun") { + if (obj.type() == UCL_OBJECT) { + for (const auto &child : obj) { + if (!uclparse_lun(child.key().c_str(), child)) return (false); } @@ -416,17 +519,27 @@ uclparse_toplevel(const ucl_object_t *top) } /* Pass 2 - targets */ - it = NULL; - while ((obj = ucl_iterate_object(top, &it, true))) { - const char *key = ucl_object_key(obj); - - if (strcmp(key, "target") == 0) { - if (obj->type == UCL_OBJECT) { - iter = NULL; - while ((child = ucl_iterate_object(obj, &iter, - true))) { + for (const auto &obj : top) { + std::string key = obj.key(); + + if (key == "controller") { + if (obj.type() == UCL_OBJECT) { + for (const auto &child : obj) { + if (!uclparse_controller( + child.key().c_str(), child)) + return false; + } + } else { + log_warnx("\"controller\" section is not an object"); + return false; + } + } + + if (key == "target") { + if (obj.type() == UCL_OBJECT) { + for (const auto &child : obj) { if (!uclparse_target( - ucl_object_key(child), child)) + child.key().c_str(), child)) return (false); } } else { @@ -440,179 +553,190 @@ uclparse_toplevel(const ucl_object_t *top) } static bool -uclparse_auth_group(const char *name, const ucl_object_t *top) +uclparse_auth_group(const char *name, const ucl::Ucl &top) { - ucl_object_iter_t it = NULL, it2 = NULL; - const ucl_object_t *obj = NULL, *tmp = NULL; - const char *key; - if (!auth_group_start(name)) return (false); - while ((obj = ucl_iterate_object(top, &it, true))) { - key = ucl_object_key(obj); + scope_exit finisher(auth_group_finish); + for (const auto &obj : top) { + std::string key = obj.key(); - if (strcmp(key, "auth-type") == 0) { - const char *value = ucl_object_tostring(obj); - - if (!auth_group_set_type(value)) - goto fail; + if (key == "auth-type") { + if (!auth_group_set_type(obj.string_value().c_str())) + return false; } - if (strcmp(key, "chap") == 0) { - if (obj->type == UCL_OBJECT) { + if (key == "chap") { + if (obj.type() == UCL_OBJECT) { if (!uclparse_chap(name, obj)) - goto fail; - } else if (obj->type == UCL_ARRAY) { - it2 = NULL; - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { if (!uclparse_chap(name, tmp)) - goto fail; + return false; } } else { log_warnx("\"chap\" property of auth-group " "\"%s\" is not an array or object", name); - goto fail; + return false; } } - if (strcmp(key, "chap-mutual") == 0) { - if (obj->type == UCL_OBJECT) { + if (key == "chap-mutual") { + if (obj.type() == UCL_OBJECT) { if (!uclparse_chap_mutual(name, obj)) - goto fail; - } else if (obj->type == UCL_ARRAY) { - it2 = NULL; - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { if (!uclparse_chap_mutual(name, tmp)) - goto fail; + return false; } } else { log_warnx("\"chap-mutual\" property of " "auth-group \"%s\" is not an array or object", name); - goto fail; + return false; } } - if (strcmp(key, "initiator-name") == 0) { - if (obj->type == UCL_STRING) { - const char *value = ucl_object_tostring(obj); + if (key == "host-address") { + if (obj.type() == UCL_STRING) { + if (!auth_group_add_host_address( + obj.string_value().c_str())) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { + if (!auth_group_add_host_address( + tmp.string_value().c_str())) + return false; + } + } else { + log_warnx("\"host-address\" property of " + "auth-group \"%s\" is not an array or string", + name); + return false; + } + } - if (!auth_group_add_initiator_name(value)) - goto fail; - } else if (obj->type == UCL_ARRAY) { - it2 = NULL; - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { - const char *value = - ucl_object_tostring(tmp); + if (key == "host-nqn") { + if (obj.type() == UCL_STRING) { + if (!auth_group_add_host_nqn( + obj.string_value().c_str())) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { + if (!auth_group_add_host_nqn( + tmp.string_value().c_str())) + return false; + } + } else { + log_warnx("\"host-nqn\" property of " + "auth-group \"%s\" is not an array or string", + name); + return false; + } + } + if (key == "initiator-name") { + if (obj.type() == UCL_STRING) { + if (!auth_group_add_initiator_name( + obj.string_value().c_str())) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { if (!auth_group_add_initiator_name( - value)) - goto fail; + tmp.string_value().c_str())) + return false; } } else { log_warnx("\"initiator-name\" property of " "auth-group \"%s\" is not an array or string", name); - goto fail; + return false; } } - if (strcmp(key, "initiator-portal") == 0) { - if (obj->type == UCL_STRING) { - const char *value = ucl_object_tostring(obj); - - if (!auth_group_add_initiator_portal(value)) - goto fail; - } else if (obj->type == UCL_ARRAY) { - it2 = NULL; - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { - const char *value = - ucl_object_tostring(tmp); - + if (key == "initiator-portal") { + if (obj.type() == UCL_STRING) { + if (!auth_group_add_initiator_portal( + obj.string_value().c_str())) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { if (!auth_group_add_initiator_portal( - value)) - goto fail; + tmp.string_value().c_str())) + return false; } } else { log_warnx("\"initiator-portal\" property of " "auth-group \"%s\" is not an array or string", name); - goto fail; + return false; } } } - auth_group_finish(); return (true); -fail: - auth_group_finish(); - return (false); } static bool uclparse_dscp(const char *group_type, const char *pg_name, - const ucl_object_t *obj) + const ucl::Ucl &obj) { - const char *key; - - if ((obj->type != UCL_STRING) && (obj->type != UCL_INT)) { + if ((obj.type() != UCL_STRING) && (obj.type() != UCL_INT)) { log_warnx("\"dscp\" property of %s group \"%s\" is not a " "string or integer", group_type, pg_name); return (false); } - if (obj->type == UCL_INT) - return (portal_group_set_dscp(ucl_object_toint(obj))); + if (obj.type() == UCL_INT) + return (portal_group_set_dscp(obj.int_value())); - key = ucl_object_tostring(obj); - if (strcmp(key, "be") == 0 || strcmp(key, "cs0") == 0) + std::string key = obj.key(); + if (key == "be" || key == "cs0") portal_group_set_dscp(IPTOS_DSCP_CS0 >> 2); - else if (strcmp(key, "ef") == 0) + else if (key == "ef") portal_group_set_dscp(IPTOS_DSCP_EF >> 2); - else if (strcmp(key, "cs0") == 0) + else if (key == "cs0") portal_group_set_dscp(IPTOS_DSCP_CS0 >> 2); - else if (strcmp(key, "cs1") == 0) + else if (key == "cs1") portal_group_set_dscp(IPTOS_DSCP_CS1 >> 2); - else if (strcmp(key, "cs2") == 0) + else if (key == "cs2") portal_group_set_dscp(IPTOS_DSCP_CS2 >> 2); - else if (strcmp(key, "cs3") == 0) + else if (key == "cs3") portal_group_set_dscp(IPTOS_DSCP_CS3 >> 2); - else if (strcmp(key, "cs4") == 0) + else if (key == "cs4") portal_group_set_dscp(IPTOS_DSCP_CS4 >> 2); - else if (strcmp(key, "cs5") == 0) + else if (key == "cs5") portal_group_set_dscp(IPTOS_DSCP_CS5 >> 2); - else if (strcmp(key, "cs6") == 0) + else if (key == "cs6") portal_group_set_dscp(IPTOS_DSCP_CS6 >> 2); - else if (strcmp(key, "cs7") == 0) + else if (key == "cs7") portal_group_set_dscp(IPTOS_DSCP_CS7 >> 2); - else if (strcmp(key, "af11") == 0) + else if (key == "af11") portal_group_set_dscp(IPTOS_DSCP_AF11 >> 2); - else if (strcmp(key, "af12") == 0) + else if (key == "af12") portal_group_set_dscp(IPTOS_DSCP_AF12 >> 2); - else if (strcmp(key, "af13") == 0) + else if (key == "af13") portal_group_set_dscp(IPTOS_DSCP_AF13 >> 2); - else if (strcmp(key, "af21") == 0) + else if (key == "af21") portal_group_set_dscp(IPTOS_DSCP_AF21 >> 2); - else if (strcmp(key, "af22") == 0) + else if (key == "af22") portal_group_set_dscp(IPTOS_DSCP_AF22 >> 2); - else if (strcmp(key, "af23") == 0) + else if (key == "af23") portal_group_set_dscp(IPTOS_DSCP_AF23 >> 2); - else if (strcmp(key, "af31") == 0) + else if (key == "af31") portal_group_set_dscp(IPTOS_DSCP_AF31 >> 2); - else if (strcmp(key, "af32") == 0) + else if (key == "af32") portal_group_set_dscp(IPTOS_DSCP_AF32 >> 2); - else if (strcmp(key, "af33") == 0) + else if (key == "af33") portal_group_set_dscp(IPTOS_DSCP_AF33 >> 2); - else if (strcmp(key, "af41") == 0) + else if (key == "af41") portal_group_set_dscp(IPTOS_DSCP_AF41 >> 2); - else if (strcmp(key, "af42") == 0) + else if (key == "af42") portal_group_set_dscp(IPTOS_DSCP_AF42 >> 2); - else if (strcmp(key, "af43") == 0) + else if (key == "af43") portal_group_set_dscp(IPTOS_DSCP_AF43 >> 2); else { log_warnx("\"dscp\" property value is not a supported textual value"); @@ -623,499 +747,684 @@ uclparse_dscp(const char *group_type, const char *pg_name, static bool uclparse_pcp(const char *group_type, const char *pg_name, - const ucl_object_t *obj) + const ucl::Ucl &obj) { - if (obj->type != UCL_INT) { + if (obj.type() != UCL_INT) { log_warnx("\"pcp\" property of %s group \"%s\" is not an " "integer", group_type, pg_name); return (false); } - return (portal_group_set_pcp(ucl_object_toint(obj))); + return (portal_group_set_pcp(obj.int_value())); } static bool -uclparse_portal_group(const char *name, const ucl_object_t *top) +uclparse_portal_group(const char *name, const ucl::Ucl &top) { - ucl_object_iter_t it = NULL, it2 = NULL; - const ucl_object_t *obj = NULL, *tmp = NULL; - const char *key; - if (!portal_group_start(name)) return (false); - while ((obj = ucl_iterate_object(top, &it, true))) { - key = ucl_object_key(obj); + scope_exit finisher(portal_group_finish); + for (const auto &obj : top) { + std::string key = obj.key(); - if (strcmp(key, "discovery-auth-group") == 0) { - if (obj->type != UCL_STRING) { + if (key == "discovery-auth-group") { + if (obj.type() != UCL_STRING) { log_warnx("\"discovery-auth-group\" property " "of portal-group \"%s\" is not a string", name); - goto fail; + return false; } if (!portal_group_set_discovery_auth_group( - ucl_object_tostring(obj))) - goto fail; + obj.string_value().c_str())) + return false; } - if (strcmp(key, "discovery-filter") == 0) { - if (obj->type != UCL_STRING) { + if (key == "discovery-filter") { + if (obj.type() != UCL_STRING) { log_warnx("\"discovery-filter\" property of " "portal-group \"%s\" is not a string", name); - goto fail; + return false; } - if (!portal_group_set_filter(ucl_object_tostring(obj))) - goto fail; + if (!portal_group_set_filter( + obj.string_value().c_str())) + return false; } - if (strcmp(key, "foreign") == 0) { + if (key == "foreign") { portal_group_set_foreign(); } - if (strcmp(key, "listen") == 0) { - if (obj->type == UCL_STRING) { + if (key == "listen") { + if (obj.type() == UCL_STRING) { if (!portal_group_add_listen( - ucl_object_tostring(obj), false)) - goto fail; - } else if (obj->type == UCL_ARRAY) { - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { + obj.string_value().c_str(), false)) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { if (!portal_group_add_listen( - ucl_object_tostring(tmp), + tmp.string_value().c_str(), false)) - goto fail; + return false; } } else { log_warnx("\"listen\" property of " "portal-group \"%s\" is not a string", name); - goto fail; + return false; } } - if (strcmp(key, "listen-iser") == 0) { - if (obj->type == UCL_STRING) { + if (key == "listen-iser") { + if (obj.type() == UCL_STRING) { if (!portal_group_add_listen( - ucl_object_tostring(obj), true)) - goto fail; - } else if (obj->type == UCL_ARRAY) { - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { + obj.string_value().c_str(), true)) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { if (!portal_group_add_listen( - ucl_object_tostring(tmp), + tmp.string_value().c_str(), true)) - goto fail; + return false; } } else { log_warnx("\"listen\" property of " "portal-group \"%s\" is not a string", name); - goto fail; + return false; } } - if (strcmp(key, "offload") == 0) { - if (obj->type != UCL_STRING) { + if (key == "offload") { + if (obj.type() != UCL_STRING) { log_warnx("\"offload\" property of " "portal-group \"%s\" is not a string", name); - goto fail; + return false; } - if (!portal_group_set_offload(ucl_object_tostring(obj))) - goto fail; + if (!portal_group_set_offload( + obj.string_value().c_str())) + return false; } - if (strcmp(key, "redirect") == 0) { - if (obj->type != UCL_STRING) { + if (key == "redirect") { + if (obj.type() != UCL_STRING) { log_warnx("\"listen\" property of " "portal-group \"%s\" is not a string", name); - goto fail; + return false; } if (!portal_group_set_redirection( - ucl_object_tostring(obj))) - goto fail; + obj.string_value().c_str())) + return false; } - if (strcmp(key, "options") == 0) { - if (obj->type != UCL_OBJECT) { + if (key == "options") { + if (obj.type() != UCL_OBJECT) { log_warnx("\"options\" property of portal group " "\"%s\" is not an object", name); - goto fail; + return false; } - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { + for (const auto &tmp : obj) { if (!portal_group_add_option( - ucl_object_key(tmp), - ucl_object_tostring_forced(tmp))) - goto fail; + tmp.key().c_str(), + tmp.forced_string_value().c_str())) + return false; } } - if (strcmp(key, "tag") == 0) { - if (obj->type != UCL_INT) { + if (key == "tag") { + if (obj.type() != UCL_INT) { log_warnx("\"tag\" property of portal group " "\"%s\" is not an integer", name); - goto fail; + return false; } - portal_group_set_tag(ucl_object_toint(obj)); + portal_group_set_tag(obj.int_value()); } - if (strcmp(key, "dscp") == 0) { + if (key == "dscp") { if (!uclparse_dscp("portal", name, obj)) - goto fail; + return false; } - if (strcmp(key, "pcp") == 0) { + if (key == "pcp") { if (!uclparse_pcp("portal", name, obj)) - goto fail; + return false; } } - portal_group_finish(); return (true); -fail: - portal_group_finish(); - return (false); } static bool -uclparse_target(const char *name, const ucl_object_t *top) +uclparse_transport_listen_obj(const char *pg_name, const ucl::Ucl &top) +{ + for (const auto &obj : top) { + std::string key = obj.key(); + + if (key.empty()) { + log_warnx("missing protocol for \"listen\" " + "property of transport-group \"%s\"", pg_name); + return false; + } + + if (key == "tcp") { + if (obj.type() == UCL_STRING) { + if (!transport_group_add_listen_tcp( + obj.string_value().c_str())) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { + if (!transport_group_add_listen_tcp( + tmp.string_value().c_str())) + return false; + } + } + } else if (key == "discovery-tcp") { + if (obj.type() == UCL_STRING) { + if (!transport_group_add_listen_discovery_tcp( + obj.string_value().c_str())) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { + if (!transport_group_add_listen_discovery_tcp( + tmp.string_value().c_str())) + return false; + } + } + } else { + log_warnx("invalid listen protocol \"%s\" for " + "transport-group \"%s\"", key.c_str(), pg_name); + return false; + } + } + return true; +} + +static bool +uclparse_transport_group(const char *name, const ucl::Ucl &top) +{ + if (!transport_group_start(name)) + return false; + + scope_exit finisher(portal_group_finish); + for (const auto &obj : top) { + std::string key = obj.key(); + + if (key == "discovery-auth-group") { + if (obj.type() != UCL_STRING) { + log_warnx("\"discovery-auth-group\" property " + "of transport-group \"%s\" is not a string", + name); + return false; + } + + if (!portal_group_set_discovery_auth_group( + obj.string_value().c_str())) + return false; + } + + if (key == "discovery-filter") { + if (obj.type() != UCL_STRING) { + log_warnx("\"discovery-filter\" property of " + "transport-group \"%s\" is not a string", + name); + return false; + } + + if (!portal_group_set_filter( + obj.string_value().c_str())) + return false; + } + + if (key == "listen") { + if (obj.type() != UCL_OBJECT) { + log_warnx("\"listen\" property of " + "transport-group \"%s\" is not an object", + name); + return false; + } + if (!uclparse_transport_listen_obj(name, obj)) + return false; + } + + if (key == "options") { + if (obj.type() != UCL_OBJECT) { + log_warnx("\"options\" property of transport group " + "\"%s\" is not an object", name); + return false; + } + + for (const auto &tmp : obj) { + if (!portal_group_add_option( + tmp.key().c_str(), + tmp.forced_string_value().c_str())) + return false; + } + } + + if (key == "dscp") { + if (!uclparse_dscp("transport", name, obj)) + return false; + } + + if (key == "pcp") { + if (!uclparse_pcp("transport", name, obj)) + return false; + } + } + + return true; +} + +static bool +uclparse_controller(const char *name, const ucl::Ucl &top) { - ucl_object_iter_t it = NULL, it2 = NULL; - const ucl_object_t *obj = NULL, *tmp = NULL; - const char *key; + if (!controller_start(name)) + return false; + + scope_exit finisher(target_finish); + for (const auto &obj : top) { + std::string key = obj.key(); + + if (key == "auth-group") { + if (obj.type() != UCL_STRING) { + log_warnx("\"auth-group\" property of " + "controller \"%s\" is not a string", name); + return false; + } + + if (!target_set_auth_group(obj.string_value().c_str())) + return false; + } + + if (key == "auth-type") { + if (obj.type() != UCL_STRING) { + log_warnx("\"auth-type\" property of " + "controller \"%s\" is not a string", name); + return false; + } + + if (!target_set_auth_type(obj.string_value().c_str())) + return false; + } + + if (key == "host-address") { + if (obj.type() == UCL_STRING) { + if (!controller_add_host_address( + obj.string_value().c_str())) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { + if (!controller_add_host_address( + tmp.string_value().c_str())) + return false; + } + } else { + log_warnx("\"host-address\" property of " + "controller \"%s\" is not an array or " + "string", name); + return false; + } + } + + if (key == "host-nqn") { + if (obj.type() == UCL_STRING) { + if (!controller_add_host_nqn( + obj.string_value().c_str())) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { + if (!controller_add_host_nqn( + tmp.string_value().c_str())) + return false; + } + } else { + log_warnx("\"host-nqn\" property of " + "controller \"%s\" is not an array or " + "string", name); + return false; + } + } + + if (key == "transport-group") { + if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { + if (!uclparse_controller_transport_group(name, + tmp)) + return false; + } + } else { + if (!uclparse_controller_transport_group(name, + obj)) + return false; + } + } + + if (key == "namespace") { + for (const auto &tmp : obj) { + if (!uclparse_controller_namespace(name, tmp)) + return false; + } + } + } + + return true; +} +static bool +uclparse_target(const char *name, const ucl::Ucl &top) +{ if (!target_start(name)) return (false); - while ((obj = ucl_iterate_object(top, &it, true))) { - key = ucl_object_key(obj); + scope_exit finisher(target_finish); + for (const auto &obj : top) { + std::string key = obj.key(); - if (strcmp(key, "alias") == 0) { - if (obj->type != UCL_STRING) { + if (key == "alias") { + if (obj.type() != UCL_STRING) { log_warnx("\"alias\" property of target " "\"%s\" is not a string", name); - goto fail; + return false; } - if (!target_set_alias(ucl_object_tostring(obj))) - goto fail; + if (!target_set_alias(obj.string_value().c_str())) + return false; } - if (strcmp(key, "auth-group") == 0) { - if (obj->type != UCL_STRING) { + if (key == "auth-group") { + if (obj.type() != UCL_STRING) { log_warnx("\"auth-group\" property of target " "\"%s\" is not a string", name); - goto fail; + return false; } - if (!target_set_auth_group(ucl_object_tostring(obj))) - goto fail; + if (!target_set_auth_group(obj.string_value().c_str())) + return false; } - if (strcmp(key, "auth-type") == 0) { - if (obj->type != UCL_STRING) { + if (key == "auth-type") { + if (obj.type() != UCL_STRING) { log_warnx("\"auth-type\" property of target " "\"%s\" is not a string", name); - goto fail; + return false; } - if (!target_set_auth_type(ucl_object_tostring(obj))) - goto fail; + if (!target_set_auth_type(obj.string_value().c_str())) + return false; } - if (strcmp(key, "chap") == 0) { - if (obj->type == UCL_OBJECT) { + if (key == "chap") { + if (obj.type() == UCL_OBJECT) { if (!uclparse_target_chap(name, obj)) - goto fail; - } else if (obj->type == UCL_ARRAY) { - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { if (!uclparse_target_chap(name, tmp)) - goto fail; + return false; } } else { log_warnx("\"chap\" property of target " "\"%s\" is not an array or object", name); - goto fail; + return false; } } - if (strcmp(key, "chap-mutual") == 0) { - if (obj->type == UCL_OBJECT) { + if (key == "chap-mutual") { + if (obj.type() == UCL_OBJECT) { if (!uclparse_target_chap_mutual(name, obj)) - goto fail; - } else if (obj->type == UCL_ARRAY) { - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { if (!uclparse_target_chap_mutual(name, tmp)) - goto fail; + return false; } } else { log_warnx("\"chap-mutual\" property of target " "\"%s\" is not an array or object", name); - goto fail; + return false; } } - if (strcmp(key, "initiator-name") == 0) { - if (obj->type == UCL_STRING) { + if (key == "initiator-name") { + if (obj.type() == UCL_STRING) { if (!target_add_initiator_name( - ucl_object_tostring(obj))) - goto fail; - } else if (obj->type == UCL_ARRAY) { - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { + obj.string_value().c_str())) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { if (!target_add_initiator_name( - ucl_object_tostring(tmp))) - goto fail; + tmp.string_value().c_str())) + return false; } } else { log_warnx("\"initiator-name\" property of " "target \"%s\" is not an array or string", name); - goto fail; + return false; } } - if (strcmp(key, "initiator-portal") == 0) { - if (obj->type == UCL_STRING) { + if (key == "initiator-portal") { + if (obj.type() == UCL_STRING) { if (!target_add_initiator_portal( - ucl_object_tostring(obj))) - goto fail; - } else if (obj->type == UCL_ARRAY) { - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { + obj.string_value().c_str())) + return false; + } else if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { if (!target_add_initiator_portal( - ucl_object_tostring(tmp))) - goto fail; + tmp.string_value().c_str())) + return false; } } else { log_warnx("\"initiator-portal\" property of " "target \"%s\" is not an array or string", name); - goto fail; + return false; } } - if (strcmp(key, "portal-group") == 0) { - if (obj->type == UCL_ARRAY) { - while ((tmp = ucl_iterate_object(obj, &it2, - true))) { + if (key == "portal-group") { + if (obj.type() == UCL_ARRAY) { + for (const auto &tmp : obj) { if (!uclparse_target_portal_group(name, tmp)) - goto fail; + return false; } } else { if (!uclparse_target_portal_group(name, obj)) - goto fail; + return false; } } - if (strcmp(key, "port") == 0) { - if (obj->type != UCL_STRING) { + if (key == "port") { + if (obj.type() != UCL_STRING) { log_warnx("\"port\" property of target " "\"%s\" is not a string", name); - goto fail; + return false; } - if (!target_set_physical_port(ucl_object_tostring(obj))) - goto fail; + if (!target_set_physical_port(obj.string_value().c_str())) + return false; } - if (strcmp(key, "redirect") == 0) { - if (obj->type != UCL_STRING) { + if (key == "redirect") { + if (obj.type() != UCL_STRING) { log_warnx("\"redirect\" property of target " "\"%s\" is not a string", name); - goto fail; + return false; } - if (!target_set_redirection(ucl_object_tostring(obj))) - goto fail; + if (!target_set_redirection(obj.string_value().c_str())) + return false; } - if (strcmp(key, "lun") == 0) { - while ((tmp = ucl_iterate_object(obj, &it2, true))) { + if (key == "lun") { + for (const auto &tmp : obj) { if (!uclparse_target_lun(name, tmp)) - goto fail; + return false; } } } - target_finish(); return (true); -fail: - target_finish(); - return (false); } static bool -uclparse_lun(const char *name, const ucl_object_t *top) +uclparse_lun(const char *name, const ucl::Ucl &top) { - char *lun_name; - bool ok; - if (!lun_start(name)) return (false); - asprintf(&lun_name, "lun \"%s\"", name); - ok = uclparse_lun_entries(lun_name, top); - free(lun_name); - return (ok); + + scope_exit finisher(lun_finish); + std::string lun_name = freebsd::stringf("lun \"%s\"", name); + return (uclparse_lun_entries(lun_name.c_str(), top)); } static bool -uclparse_lun_entries(const char *name, const ucl_object_t *top) +uclparse_lun_entries(const char *name, const ucl::Ucl &top) { - ucl_object_iter_t it = NULL, child_it = NULL; - const ucl_object_t *obj = NULL, *child = NULL; - const char *key; - - while ((obj = ucl_iterate_object(top, &it, true))) { - key = ucl_object_key(obj); + for (const auto &obj : top) { + std::string key = obj.key(); - if (strcmp(key, "backend") == 0) { - if (obj->type != UCL_STRING) { + if (key == "backend") { + if (obj.type() != UCL_STRING) { log_warnx("\"backend\" property of %s " "is not a string", name); - goto fail; + return false; } - if (!lun_set_backend(ucl_object_tostring(obj))) - goto fail; + if (!lun_set_backend(obj.string_value().c_str())) + return false; } - if (strcmp(key, "blocksize") == 0) { - if (obj->type != UCL_INT) { + if (key == "blocksize") { + if (obj.type() != UCL_INT) { log_warnx("\"blocksize\" property of %s " "is not an integer", name); - goto fail; + return false; } - if (!lun_set_blocksize(ucl_object_toint(obj))) - goto fail; + if (!lun_set_blocksize(obj.int_value())) + return false; } - if (strcmp(key, "device-id") == 0) { - if (obj->type != UCL_STRING) { + if (key == "device-id") { + if (obj.type() != UCL_STRING) { log_warnx("\"device-id\" property of %s " "is not an integer", name); - goto fail; + return false; } - if (!lun_set_device_id(ucl_object_tostring(obj))) - goto fail; + if (!lun_set_device_id(obj.string_value().c_str())) + return false; } - if (strcmp(key, "device-type") == 0) { - if (obj->type != UCL_STRING) { + if (key == "device-type") { + if (obj.type() != UCL_STRING) { log_warnx("\"device-type\" property of %s " "is not an integer", name); - goto fail; + return false; } - if (!lun_set_device_type(ucl_object_tostring(obj))) - goto fail; + if (!lun_set_device_type(obj.string_value().c_str())) + return false; } - if (strcmp(key, "ctl-lun") == 0) { - if (obj->type != UCL_INT) { + if (key == "ctl-lun") { + if (obj.type() != UCL_INT) { log_warnx("\"ctl-lun\" property of %s " "is not an integer", name); - goto fail; + return false; } - if (!lun_set_ctl_lun(ucl_object_toint(obj))) - goto fail; + if (!lun_set_ctl_lun(obj.int_value())) + return false; } - if (strcmp(key, "options") == 0) { - if (obj->type != UCL_OBJECT) { + if (key == "options") { + if (obj.type() != UCL_OBJECT) { log_warnx("\"options\" property of %s " "is not an object", name); - goto fail; + return false; } - while ((child = ucl_iterate_object(obj, &child_it, - true))) { - if (!lun_add_option(ucl_object_key(child), - ucl_object_tostring_forced(child))) - goto fail; + for (const auto &child : obj) { + if (!lun_add_option(child.key().c_str(), + child.forced_string_value().c_str())) + return false; } } - if (strcmp(key, "path") == 0) { - if (obj->type != UCL_STRING) { + if (key == "path") { + if (obj.type() != UCL_STRING) { log_warnx("\"path\" property of %s " "is not a string", name); - goto fail; + return false; } - if (!lun_set_path(ucl_object_tostring(obj))) - goto fail; + if (!lun_set_path(obj.string_value().c_str())) + return false; } - if (strcmp(key, "serial") == 0) { - if (obj->type != UCL_STRING) { + if (key == "serial") { + if (obj.type() != UCL_STRING) { log_warnx("\"serial\" property of %s " "is not a string", name); - goto fail; + return false; } - if (!lun_set_serial(ucl_object_tostring(obj))) - goto fail; + if (!lun_set_serial(obj.string_value().c_str())) + return false; } - if (strcmp(key, "size") == 0) { - if (obj->type != UCL_INT) { + if (key == "size") { + if (obj.type() != UCL_INT) { log_warnx("\"size\" property of %s " "is not an integer", name); - goto fail; + return false; } - if (!lun_set_size(ucl_object_toint(obj))) - goto fail; + if (!lun_set_size(obj.int_value())) + return false; } } - lun_finish(); return (true); -fail: - lun_finish(); - return (false); } bool uclparse_conf(const char *path) { - struct ucl_parser *parser; - ucl_object_t *top; - bool parsed; - - parser = ucl_parser_new(0); - - if (!ucl_parser_add_file(parser, path)) { - log_warn("unable to parse configuration file %s: %s", path, - ucl_parser_get_error(parser)); - ucl_parser_free(parser); + std::string err; + ucl::Ucl top = ucl::Ucl::parse_from_file(path, err); + if (!top) { + log_warnx("unable to parse configuration file %s: %s", path, + err.c_str()); return (false); } - top = ucl_parser_get_object(parser); - parsed = uclparse_toplevel(top); - ucl_object_unref(top); - ucl_parser_free(parser); + bool parsed; + try { + parsed = uclparse_toplevel(top); + } catch (std::bad_alloc) { + log_warnx("failed to allocate memory parsing %s", path); + parsed = false; + } catch (...) { + log_warnx("unknown exception parsing %s", path); + parsed = false; + } return (parsed); } diff --git a/usr.sbin/service/service.8 b/usr.sbin/service/service.8 index 06f8cd989bfc..3858e608b785 100644 --- a/usr.sbin/service/service.8 +++ b/usr.sbin/service/service.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 9, 2025 +.Dd August 2, 2025 .Dt SERVICE 8 .Os .Sh NAME @@ -34,6 +34,7 @@ .Fl e .Nm .Op Fl j Ar jail +.Op Fl q .Fl R .Nm .Op Fl j Ar jail @@ -45,8 +46,7 @@ .Fl r .Nm .Op Fl j Ar jail -.Op Fl q -.Op Fl v +.Op Fl dqv .Op Fl E Ar var=value .Ar script .Op Ar command @@ -74,6 +74,8 @@ scripts, see .Pp The options are as follows: .Bl -tag -width F1 +.It Fl d +Enable debugging. .It Fl E Ar var=value Set the environment variable .Ar var @@ -106,6 +108,9 @@ this is usually .Pa /usr/local/etc/rc.d . All files will be listed whether they are an actual rc.d script or not. +.It Fl q +Be quiet, redirecting output to +.Pa /dev/null . .It Fl R Restart all enabled local services. .It Fl r @@ -116,8 +121,6 @@ as in above, but list all of the files, not just what is enabled. .It Fl v Be slightly more verbose. -.It Fl q -Be quiet, redirecting output to /dev/null. .El .Sh ENVIRONMENT When used to run rc.d scripts the diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh index 5f456418da49..9387a49051d6 100755 --- a/usr.sbin/service/service.sh +++ b/usr.sbin/service/service.sh @@ -27,17 +27,19 @@ # SUCH DAMAGE. . /etc/rc.subr -load_rc_config 'XXX' +load_rc_config usage () { echo '' echo 'Usage:' echo "${0##*/} [-j <jail name or id>] -e" - echo "${0##*/} [-j <jail name or id>] -R" - echo "${0##*/} [-j <jail name or id>] [-v] -l | -r" - echo "${0##*/} [-j <jail name or id>] [-v] [-E var=value] <rc.d script> start|stop|etc." + echo "${0##*/} [-j <jail name or id>] [-q] -R" + echo "${0##*/} [-j <jail name or id>] [-v] -l" + echo "${0##*/} [-j <jail name or id>] [-v] -r" + echo "${0##*/} [-j <jail name or id>] [-dqv] [-E var=value] <rc.d script> start|stop|etc." echo "${0##*/} -h" echo '' + echo "-d Enable debugging of rc.d scripts" echo "-j Perform actions within the named jail" echo "-E n=val Set variable n to val before executing the rc.d script" echo '-e Show services that are enabled' @@ -49,12 +51,13 @@ usage () { echo '' } -while getopts 'j:E:ehlqrRv' COMMAND_LINE_ARGUMENT ; do +while getopts 'dE:ehj:lqrRv' COMMAND_LINE_ARGUMENT ; do case "${COMMAND_LINE_ARGUMENT}" in - j) JAIL="${OPTARG}" ;; + d) DEBUG=dopt ;; E) VARS="${VARS} ${OPTARG}" ;; e) ENABLED=eopt ;; h) usage ; exit 0 ;; + j) JAIL="${OPTARG}" ;; l) LIST=lopt ;; q) QUIET=qopt ;; r) RCORDER=ropt ;; @@ -85,6 +88,10 @@ if [ -n "${JAIL}" ]; then exit $? fi +if [ -n "$DEBUG" ]; then + VARS="${VARS} rc_debug=yes" +fi + if [ -n "$RESTART" ]; then skip="-s nostart" if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then diff --git a/usr.sbin/sysrc/Makefile b/usr.sbin/sysrc/Makefile index e1f48f2af97b..bad50caf2ffc 100644 --- a/usr.sbin/sysrc/Makefile +++ b/usr.sbin/sysrc/Makefile @@ -1,5 +1,6 @@ .include <src.opts.mk> +PACKAGE= bsdconfig SCRIPTS= sysrc MAN= sysrc.8 diff --git a/usr.sbin/uathload/uathload.8 b/usr.sbin/uathload/uathload.8 index 41cb2b4c1da7..7889245058e9 100644 --- a/usr.sbin/uathload/uathload.8 +++ b/usr.sbin/uathload/uathload.8 @@ -23,12 +23,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 11, 2010 +.Dd July 15, 2025 .Dt UATHLOAD 8 .Os .Sh NAME .Nm uathload -.Nd "firmware loader for Atheros USB wireless driver" +.Nd load firmware for Atheros USB wireless devices .Sh SYNOPSIS .Nm .Op Fl v |