From nobody Thu Jul 4 08:43:57 2024 X-Original-To: doc@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WF9DF3f5Jz597FH for ; Thu, 04 Jul 2024 08:43:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WF9DF2cQFz3xvN for ; Thu, 4 Jul 2024 08:43:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720082637; a=rsa-sha256; cv=none; b=o3xYhKKEw8UsMaKmailpgt3EHVPzv7PSNdQrnduFHTf/31LJRcIuPUQ1le7yldqCOspQKV 5k0SIGsBita97nKdxdrdWtgaRP8CNw6mcj/zw6fnVepJaVOtiixIkIpR9H1NqfLcdSleu/ bmpuL0TGe6uwdlGXiVbJzS6W9Mzq9g6gDwh1VicCqRyn2+dsJxleCMiLlCxUcy1icCmVhO ChtzSEKGwZvf0LGH5MOceyD1JNAFWQ4ce77h1dTK/rKOfboy9IkrFWHRFYxzu+vHhYm0ae iyUJGfOiMJAMZ7y0R2SBzAcx2yy0WTT8jxITd76XNONpKwKmqTfMTOnDS8Akgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720082637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IbPK3SByLEjsONM9LbGtWuKTOKvHVwS0M5hw0Xq11Lc=; b=KH/AtJkjl1/dWmSgOAy9iqIMKBZY+o//OGI2kHuRPCgK0IUGB39cW4vjgT0DFwiNPJA63b nHXCtW0rF2yCePCNbBjhtLgY98ro9T3/ReeBi8WOfSltGA0IL79e228VUgKPbV16oM1JR+ Co8JRj8e6jHsPSd5HZutuI2N0c3XXsP58PRszhU2LuJCo/j85hzBcbtAcYgRSozggCH2d4 nwb2TsSFZRMtRuagGTTkl31ONAdseuIvRkKYSG2qxQ3D3ELtoSVUTX//MqMBiqvAqPO0xY S3YnpgrmyQMoYmC62w+qLNZqyKbhSMIvyPe9068Dt4m85y2Yea3m+LWckKl6Wg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WF9DF2CYBz16C8 for ; Thu, 4 Jul 2024 08:43:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4648hvQO098907 for ; Thu, 4 Jul 2024 08:43:57 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4648hvwh098906 for doc@FreeBSD.org; Thu, 4 Jul 2024 08:43:57 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: doc@FreeBSD.org Subject: [Bug 96207] Comments of a sockaddr_un structure could confuse one Date: Thu, 04 Jul 2024 08:43:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Documentation X-Bugzilla-Component: Books & Articles X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: puzzlingcoalore@gmail.com X-Bugzilla-Status: Closed X-Bugzilla-Resolution: Overcome By Events X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: carlavilla@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Documentation project List-Archive: https://lists.freebsd.org/archives/freebsd-doc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-doc@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D96207 Amanda Steele changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |puzzlingcoalore@gmail.com --- Comment #3 from Amanda Steele --- (In reply to Rostislav Krasny from comment #0)https://scratchgeometrydash.c= om Change the comment /* sockaddr len including null */ to /* sockaddr_un len without NUL */. Change the comment /* path name (gag) */ to /* NUL-terminated path name */. These changes align with the correct interpretation of the sockaddr_un structure and the SUN_LEN(su) macro, as they clarify the intent and the behavior of the code. Here is the updated sockaddr_un structure with the revised comments: /* * Definitions for UNIX IPC domain. */ struct sockaddr_un { unsigned char sun_len; /* sockaddr_un len without NUL */ sa_family_t sun_family; /* AF_UNIX */ char sun_path[104]; /* NUL-terminated path name */ }; /* actual length of an initialized sockaddr_un */ #define SUN_LEN(su) \ (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path)) This should clarify the intended usage and prevent misunderstandings for fu= ture developers working with this code. To make these changes effective in the FreeBSD project, you would typically: Propose the changes through the appropriate FreeBSD mailing list or bug tracker. Provide a patch with the updated comments. Reference the discussion and the rationale behind the change to explain the reasoning to other developers and maintainers. The links to the NetBSD discussion and commit logs can serve as additional context to support your proposal. --=20 You are receiving this mail because: You are on the CC list for the bug.=