Date: Wed, 06 Apr 2022 12:52:23 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 263086] ldconfig(8) behaviour doesn't match documentation Message-ID: <bug-263086-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-263086-227>