From nobody Wed Apr 6 12:52:23 2022 X-Original-To: bugs@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 411A51A9B400 for ; Wed, 6 Apr 2022 12:52:24 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KYPYM70b3z53tG for ; Wed, 6 Apr 2022 12:52:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 D1A3E1B56D for ; Wed, 6 Apr 2022 12:52:23 +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 236CqNQG033793 for ; Wed, 6 Apr 2022 12:52:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 236CqNUR033792 for bugs@FreeBSD.org; Wed, 6 Apr 2022 12:52:23 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: bugs@FreeBSD.org Subject: [Bug 263086] ldconfig(8) behaviour doesn't match documentation Date: Wed, 06 Apr 2022 12:52:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: daniel_eisele@gmx.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649249544; 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; bh=k27kxidjfgU8734a41ltEGBfgxFSAh+IzSZnylcjm/c=; b=wgN67xrI97I7AmbnWnWKc1p6TXkK+hEgu2+fRQWNX+bEKq7CtZeBGWBtIms63de/ejLjSe v4eK+BxsmhZlIqvlTb01uv/TvehOFZaM0rf87YXWtPt7U7ROAsKVNqrWYzKJZbzt20X46u /eHwyt18nkFsHH/t873dBROoK1htfBbLYajo+oukQKNUAC63g3rN8MDoXk3x7q+4jhrxVR vOMc/dpFYmyJkfxHfSfoF1pOol7AwSWFf3kgoZbAs7Vyn/O8e/tzjJhH+IlPDFfEFnBiG3 Yy7FarzHUXNyllt0uRpA4M24znSsfJRiFw66NrADRTtW8aO/4V1l+kc2EDFZ3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649249544; a=rsa-sha256; cv=none; b=KSti8KMtvPtjDmalWTb95TIj8cLoUBirT91rtIvd096wL6Cj0AXaE9mQa/G4PQterXiv7z sAs05DCQJ3LiJIL9UvdytaQ12fOLuSPrn/JPjO8YtvUIV7nnSQwt+YijvjdDwZv/Uai5QQ Guc3eJNNH8PFn0DGoBuuH/RPVu2MVDEyh2TOGb3GqIiladXHjH2A9t49UkoJ92llo3mtDO fgcPg3P/y337Dcvyah6FpStBDp1krRSC6ChGzjiUypEWfatFvGtlSMuj4z3Te8zgfCwFdT DjGphwRZAWoAfz7hrjMSVsNd8L1QxNI70W3STSRSExUFdnkcvZS77T1bv0laXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263086 Bug ID: 263086 Summary: ldconfig(8) behaviour doesn't match documentation Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: daniel_eisele@gmx.de ldconfig(8) has a few cases of inconsistent/weird behavior. One problem (ldconfig -v clears the whole linker search path) has already been fixed he= re: https://cgit.freebsd.org/src/commit/sbin/ldconfig/ldconfig.c?id=3D3ede04c78= c7c726ed79a39d22c65a58d0ecc5d00 However other problems remain: - The verbose flag (-v) mentioned in the man page doesn't do anything. - The flags -R and -m do exactly the same thing, which is not mentioned in= the man page. Instead, these flags have different descriptions leaving the u= ser wondering about the difference. - The man page states that -R is the default action when no options are gi= ven, which isn't really true. When only directories/files are given (without = -R or -m), then the search path will be overwritten instead of appended to. - Running ldconfig without parameters does a rescan with no output. Is this the desired behaviour? Maybe justread (-r) would be better in this case. - Clearing the entire search path doesn't seem to be possible anymore, bec= ause an empty directory list forces rescan mode. - The flag -32 is incompatible with -f, which is not stated in the man pag= e. I think the solution depends on how much we are willing to change the api. Apart from documenting all of the above in the man page, these might be a f= ew options: - Removing -v from the man page. - Removing -R or -m from the man page as they are the same. - Adding an explicit flag for overwriting, which would avoid confusion and allow overwriting with an empty list. To me, this seems like the cleanest solution going forward, but would change the api. - Stating in the man page that the default action is actually overwrite wh= en directories are given or - just removing the default and requiring the user to specify explicitly w= hat s/he wants. This would avoid confusion with different defaults depending= on whether the directory list is empty or not. Also as a side note, it might be a good idea to explicitly initialize the global boolean insecure to false in the main function. --=20 You are receiving this mail because: You are the assignee for the bug.=