Re: git: 8e28d84935f2 - main - OpenSSH: Update to 10.0p2

2025-08-26 Thread A FreeBSD User
gt; +fatal("input_userauth_request: no authctxt"); > + > +if ((r = sshpkt_get_cstring(ssh, &user, NULL)) != 0 || > +(r = sshpkt_get_cstring(ssh, &service, NULL)) != 0 || > +(r = sshpkt_get_cstring(ssh, &method, NULL)) != 0) > +goto out; > +debug("userauth-request for user %s service %s method %s", user, > service, method); > +debug("attempt %d failures %d", authctxt->attempt, authctxt->failures); > + > +if ((style = strchr(user, ':')) != NULL) > +*style++ = 0; > + > +if (authctxt->attempt >= 1024) > +auth_maxtries_exceeded(ssh); > +if (authctxt->attempt++ == 0) { > +/* setup auth context */ > +authctxt->pw = mm_getpwnamallow(ssh, user); > +authctxt->user = xstrdup(user); > +if (authctxt->pw && strcmp(service, "ssh-connection")==0) { > +authctxt->valid = 1; > +debug2_f("setting up authctxt for %s", user); > +} else { > +authctxt->valid = 0; > +/* Invalid user, fake password information */ > +authctxt->pw = fakepw(); > +#ifdef SSH_AUDIT_EVENTS > +mm_audit_event(ssh, SSH_INVALID_USER); > +#endif > +} > +#ifdef USE_PAM > +if (options.use_pam) > +mm_start_pam(ssh); > +#endif > +ssh_packet_set_log_preamble(ssh, "%suser %s", > +authctxt->valid ? "authenticating " : "invalid ", user); > +setproctitle("%s [net]", authctxt->valid ? user : "unknown"); > +authctxt->service = xstrdup(service); > +authctxt->style = style ? xstrdup(style) : NULL; > +mm_inform_authserv(service, style); > +userauth_banner(ssh); > +if ((r = kex_server_update_ext_info(ssh)) != 0) > +fatal_fr(r, "kex_server_update_ext_info failed"); > +if (auth2_setup_methods_lists(authctxt) != 0) > +ssh_packet_disconnect(ssh, > +"no authentication methods enabled"); > +} else if (strcmp(user, authctxt->user) != 0 || > +strcmp(service, authctxt->service) != 0) { > +ssh_packet_disconnect(ssh, "Change of username or service " > +"not allowed: (%s,%s) -> (%s,%s)", > +authctxt->user, authctxt->service, user, service); > +} > +/* reset state */ > +auth2_challenge_stop(ssh); > + > +#ifdef GSSAPI > +/* XXX move to auth2_gssapi_stop() */ > +ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL); > +ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL); > +#endif > + > +auth2_authctxt_reset_info(authctxt); > +authctxt->postponed = 0; > +authctxt->server_caused_failure = 0; > + > +/* try to authenticate user */ > +m = authmethod_lookup(authctxt, method); > +if (m != NULL && authctxt->failures < options.max_authtries) { > +debug2("input_userauth_request: try method %s", method); > +authenticated = m->userauth(ssh, method); > +} > +if (!authctxt->authenticated && strcmp(method, "none") != 0) > +ensure_minimum_time_since(tstart, > +user_specific_delay(authctxt->user)); > +userauth_finish(ssh, authenticated, method, NULL); > *** 13039 LINES SKIPPED *** > Buildworld/buildkernel fails due to amutual error which might be : [...] make[5]: /usr/src/secure/libexec/sshd-auth/Makefile:41: Variable "MK_GSSAPI" is undefined in make[5] in directory "/usr/src/secure/libexec/sshd-auth" Regards, oh -- A FreeBSD user pgp0oEWJnJkWg.pgp Description: OpenPGP digital signature

Re: git: b44cc1b479fe - main - loader: do not try to open directories with TFTP

2025-08-20 Thread A FreeBSD User
ftp >>> referenced by open.c >>> open.o:(open) in archive >>> /usr/obj/usr/src/amd64.amd64/stand/libsa32/libsa32.a >>> referenced by mount.c >>> mount.o:(mount) in archive >>> /usr/obj/usr/src/amd64.amd64/stand/libsa32/libsa32.a --- all_subdir_usr.sbin --- -function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Qunused-arguments -c /usr/src/contrib/tcpdump/print-ntp.c -o print-ntp.pieo --- all_subdir_stand --- *** [gptzfsboot.out] Error code 1 -- A FreeBSD user

Re: git: 8d8a745c456c - main - libutil: Drop auth_getval()

2025-08-03 Thread A FreeBSD User
ar * const *_white, > const char * const *_more_white); > int expand_number(const char *_buf, int64_t *_num); > A warning should be issued about transition of libutil.so.9 -> libutil.so.10! make delete-old-libs has a great impact (as usual) on a running/working system regarding python, perl, X11, claws-mail and other software. A quick and dirty (but working) workaround was using the libmap.conf mechanism. Kind regards, oh -- A FreeBSD user pgplpjbOYfNHg.pgp Description: OpenPGP digital signature

Re: git: ae07a5805b19 - main - krb5: Add version maps

2025-07-22 Thread A FreeBSD User
zfs_status.pico libzfs_util.pico libzfs_compat.pico libzfs_zmount.pico libshare.pico nfs.pico os/freebsd/nfs.pico os/freebsd/smb.pico cityhash.pico zfeature_common.pico zfs_comutil.pico zfs_deleg.pico zfs_fletcher.pico zfs_fletcher_superscalar.pico zfs_fletcher_superscalar4.pico zfs_namecheck.p

Re: git: df114daef4c4 - main - Import the Hardware Trace (HWT) framework.

2025-07-03 Thread A FreeBSD User
int hwt_config_set(struct thread *td, struct hwt_context *ctx, > +struct hwt_set_config *sconf); > +void hwt_config_free(struct hwt_context *ctx); > + > +#endif /* !_DEV_HWT_HWT_CONFIG_H_ */ > diff --git a/sys/dev/hwt/hwt_context.c b/sys/dev/hwt/hwt_context.c > new file mode 100644 > index ..9af76cffc928 > --- /dev/null > +++ b/sys/dev/hwt/hwt_context.c > @@ -0,0 +1,201 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2023-2025 Ruslan Bukin > + * > + * This work was supported by Innovate UK project 105694, "Digital Security > + * by Design (DSbD) Technology Platform Prototype". > + * > + * 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. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#define HWT_DEBUG > +#undef HWT_DEBUG > + > +#ifdef HWT_DEBUG > +#define dprintf(fmt, ...) printf(fmt, ##__VA_ARGS__) > +#else > +#define dprintf(fmt, ...) > +#endif > + > +static MALLOC_DEFINE(M_HWT_CTX, "hwt_ctx", "Hardware Trace"); > + > +static bitstr_t *ident_set; > +static int ident_set_size; > +static struct mtx ident_set_mutex; > + > +static int > +hwt_ctx_ident_alloc(int *new_ident) > +{ > + > + mtx_lock(&ident_set_mutex); > + bit_ffc(ident_set, ident_set_size, new_ident); > + if (*new_ident == -1) { > + mtx_unlock(&ident_set_mutex); > + return (ENOMEM); > + } > + bit_set(ident_set, *new_ident); > + mtx_unlock(&ident_set_mutex); > + > + return (0); > mtx)+} > *** 3705 LINES SKIPPED *** > The commit breaks buildkernel: [...] /usr/src/sys/dev/hwt/hwt_contexthash.c:82:2: error: call to undeclared function 'spinlock_enter'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 82 | HWT_CTXHASH_LOCK(); | ^ /usr/src/sys/dev/hwt/hwt_contexthash.h:39:28: note: expanded from macro 'HWT_CTXHASH_LOCK' 39 | #define HWT_CTXHASH_LOCK() mtx_lock_spin(&hwt_contexthash_mtx) -- A FreeBSD user pgpBdgcdsaV3N.pgp Description: OpenPGP digital signature

Re: git: 1349a733cf28 - main - ufshci: Introduce the ufshci(4) driver

2025-06-15 Thread A FreeBSD User
Am Tage des Herren Sun, 15 Jun 2025 09:28:38 + (UTC) "Bjoern A. Zeeb" schrieb: > On Sun, 15 Jun 2025, A FreeBSD User wrote: > > > Am Tage des Herren Sun, 15 Jun 2025 06:09:39 GMT > > Warner Losh schrieb: > > > >> The branch main has been

Re: git: 1349a733cf28 - main - ufshci: Introduce the ufshci(4) driver

2025-06-15 Thread A FreeBSD User
> + uint32_t dNumSharedWriteBoosterBufferAllocUnits; > +} __packed; > + > +_Static_assert(sizeof(struct ufshci_device_descriptor) == 89, > +"bad size for ufshci_device_descriptor"); > + > +/* > + * UFS Spec 4.1, section 14.1.5.3 "Configuration Descriptor" > + * ConfigurationDescriptor use big-endian byte ordering. > + */ > +struct ufshci_unit_descriptor_configurable_parameters { > + uint8_t bLUEnable; > + uint8_t bBootLunID; > + uint8_t bLUWriteProtect; > + uint8_t bMemoryType; > + uint32_t dNumAllocUnits; > + uint8_t bDataReliability; > + uint8_t bLogicalBlockSize; > + uint8_t bProvisioningType; > + uint16_t wContextCapabilities; > + union { > + struct { > + uint8_t Reserved[3]; > + uint8_t ReservedHpb[6]; > + } __packed; > + uint16_t wZoneBufferAllocUnits; > + }; > + uint32_t dLUNumWriteBoosterBufferAllocUnits; > +} __packed; > + > +_Static_assert(sizeof(struct ufshci_unit_descriptor_configurable_parameters) > == > + 27, > +"bad size for ufshci_unit_descriptor_configurable_parameters"); > + > +#define UFSHCI_CONFIGURATION_DESCEIPTOR_LU_NUM 8 > + > +struct ufshci_configuration_descriptor { > + uint8_t bLength; > + uint8_t bDescriptorIDN; > + uint8_t bConfDescContinue; > + uint8_t bBootEnable; > + uint8_t bDescrAccessEn; > + uint8_t bInitPowerMode; > + uint8_t bHighPriorityLUN; > + uint8_t bSecureRemovalType; > + uint8_t bInitActiveICCLevel; > + uint16_t wPeriodicRTCUpdate; > + uint8_t Reserved; > + uint8_t bRPMBRegionEnable; > + uint8_t bRPMBRegion1Size; > + uint8_t bRPMBRegion2Size; > + uint8_t bRPMBRegion3Size; > + uint8_t bWriteBoosterBufferPreserveUserSpaceEn; > + uint8_t bWriteBoosterBufferType; > + uint32_t dNumSharedWriteBoosterBufferAllocUnits; > + /* 0x16 */ > + struct ufshci_unit_descriptor_configurable_parameters > + unit_config_params[UFSHCI_CONFIGURATION_DESCEIPTOR_LU_NUM]; > +} __packed; > + > +_Static_assert(sizeof(struct ufshci_configuration_descriptor) == (22 + 27 * > 8), > +"bad size for ufshci_configuration_descriptor"); > + > +/* > + * UFS Spec 4.1, section 14.1.5.4 "Geometry Descriptor" > + * GeometryDescriptor use big-endian byte ordering. > + */ > +struct ufshci_geometry_descriptor { > + uint8_t bLength; > + uint8_t bDescriptorIDN; > + uint8_t bMediaTechnology; > + uint8_t Reserved; > + uint64_t qTotalRawDeviceCapacity; > + uint8_t bMaxNumberLU; > + uint32_t dSegmentSize; > + /* 0x11 */ > + uint8_t bAllocationUnitSize; > + uint8_t bMinAddrBlockSize; > + uint8_t bOptimalReadBlockSize; > + uint8_t bOptimalWriteBlockSize; > + uint8_t bMaxInBufferSize; > + uint8_t bMaxOutBufferSize; > + uint8_t bRPMB_ReadWriteSize; > + uint8_t bDynamicCapacityResourcePolicy; > + uint8_t bDataOrdering; > + uint8_t bMaxContexIDNumber; > + uint8_t bSysDataTagUnitSize; > + uint8_t bSysDataTagResSize; > + uint8_t bSupportedSecRTypes; > + uint16_t wSupportedMemoryTypes; > + /* 0x20 */ > + uint32_t dSystemCodeMaxNAllocU; > + uint16_t wSystemCodeCapAdjFac; > + uint32_t dNonPersistMaxNAllocU; > + uint16_t wNonPersistCapAdjFac; > + uint32_t dEnhanced1MaxNAllocU; > + /* 0x30 */ > + uint16_t wEnhanced1CapAdjFac; > *** 4268 LINES SKIPPED *** > -- A FreeBSD user pgpGMfhtaFkrl.pgp Description: OpenPGP digital signature

Re: git: e453e498cbb8 - main - machine/stdarg.h -> sys/stdarg.h

2025-06-11 Thread A FreeBSD User
; diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c > index 21cb6beaf1fb..2bb59cb2d92b 100644 > --- a/sys/cam/scsi/scsi_xpt.c > +++ b/sys/cam/scsi/scsi_xpt.c > @@ -40,6 +40,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -59,7 +60,6 @@ > #include > #include > #include > -#include /* for xpt_print below */ > > struct scsi_quirk_entry { > struct scsi_inquiry_pattern inq_pat; > diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_string.c > b/sys/cddl/compat/opensolaris/kern/opensolaris_string.c index > ec088f216cb3..4c8eb533e930 > 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_string.c > +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_string.c > @@ -26,7 +26,7 @@ > #include > #include > #include > -#include > +#include > > #define IS_DIGIT(c) ((c) >= '0' && (c) <= '9') > > diff --git a/sys/cddl/compat/opensolaris/sys/cmn_err.h > b/sys/cddl/compat/opensolaris/sys/cmn_err.h index 2623693ec8b7..b3ebf6414e8b > 100644 > --- a/sys/cddl/compat/opensolaris/sys/cmn_err.h > +++ b/sys/cddl/compat/opensolaris/sys/cmn_err.h > @@ -28,7 +28,7 @@ > #define _OPENSOLARIS_SYS_CMN_ERR_H_ > > #include > -#include > +#include > > #ifdef __cplusplus > extern "C" { > diff --git a/sys/cddl/compat/opensolaris/sys/varargs.h > b/sys/cddl/compat/opensolaris/sys/varargs.h index 9684502756cb..bede89fafa18 > 100644 > --- a/sys/cddl/compat/opensolaris/sys/varargs.h > +++ b/sys/cddl/compat/opensolaris/sys/varargs.h > @@ -28,7 +28,7 @@ > #define _OPENSOLARIS_SYS_VARARGS_H_ > > #ifdef _KERNEL > -#include > +#include > #else > #include > #endif > diff --git a/sys/cddl/dev/fbt/fbt.c b/sys/cddl/dev/fbt/fbt.c > index 99a77ba65eb8..da9c4ee2ab76 100644 > --- a/sys/cddl/dev/fbt/fbt.c > +++ b/sys/cddl/dev/fbt/fbt.c > @@ -49,12 +49,12 @@ > #include > #include > #include > +#include > #include > #include > #include > #include > #include > -#include > > #include > #include > diff --git a/sys/cddl/dev/profile/profile.c b/sys/cddl/dev/profile/profile.c > index 3e106aab1c85..23a8c9256708 100644 > --- a/sys/cddl/dev/profile/profile.c > +++ b/sys/cddl/dev/profile/profile.c > @@ -48,11 +48,11 @@ > #include > #include > #include > +#include > #include > #include > #include > #include > -#include > > #include > #include > diff --git a/sys/cddl/dev/systrace/systrace.c > b/sys/cddl/dev/systrace/systrace.c > index c14a663d1995..d8fe1a6430c6 100644 > --- a/sys/cddl/dev/systrace/systrace.c > +++ b/sys/cddl/dev/systrace/systrace.c > @@ -47,6 +47,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -54,8 +55,6 @@ > *** 3126 LINES SKIPPED *** > -- A FreeBSD user pgp1xY5atc4ES.pgp Description: OpenPGP digital signature