All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ld.so(8): make lack of separator escaping explicit
@ 2018-02-05 16:13 Mike Frysinger
       [not found] ` <20180205161357.8131-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2018-02-05 16:13 UTC (permalink / raw)
  To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Make it clear that the delimiters in LD_LIBRARY_PATH cannot be escaped
so people don't try various methods (like \:) to workaround it.

Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
---
 man8/ld.so.8 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/man8/ld.so.8 b/man8/ld.so.8
index 64e1fb2afdc3..fb568ef8721a 100644
--- a/man8/ld.so.8
+++ b/man8/ld.so.8
@@ -271,7 +271,8 @@ This is useful when using a debugger.
 .B LD_LIBRARY_PATH
 A list of directories in which to search for
 ELF libraries at execution time.
-The items in the list are separated by either colons or semicolons.
+The items in the list are separated by either colons or semicolons,
+and there is no support for escaping either separator.
 Similar to the
 .B PATH
 environment variable.
-- 
2.16.1

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ld.so(8): make lack of separator escaping explicit
       [not found] ` <20180205161357.8131-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
@ 2018-02-05 16:19   ` walter harms
       [not found]     ` <5A78842E.2060402-fPG8STNUNVg@public.gmane.org>
  2018-02-05 21:48   ` [PATCH v2] ld.so.8: " Mike Frysinger
  1 sibling, 1 reply; 6+ messages in thread
From: walter harms @ 2018-02-05 16:19 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA



Am 05.02.2018 17:13, schrieb Mike Frysinger:
> Make it clear that the delimiters in LD_LIBRARY_PATH cannot be escaped
> so people don't try various methods (like \:) to workaround it.
> 
> Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
> ---
>  man8/ld.so.8 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/man8/ld.so.8 b/man8/ld.so.8
> index 64e1fb2afdc3..fb568ef8721a 100644
> --- a/man8/ld.so.8
> +++ b/man8/ld.so.8
> @@ -271,7 +271,8 @@ This is useful when using a debugger.
>  .B LD_LIBRARY_PATH
>  A list of directories in which to search for
>  ELF libraries at execution time.
> -The items in the list are separated by either colons or semicolons.
> +The items in the list are separated by either colons or semicolons,
> +and there is no support for escaping either separator.
>  Similar to the
>  .B PATH
>  environment variable.

I am not sure that i understand that. You say that a libname like
libfoo.1.2:3 is unparseable ?

re,
 wh
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ld.so(8): make lack of separator escaping explicit
       [not found]     ` <5A78842E.2060402-fPG8STNUNVg@public.gmane.org>
@ 2018-02-05 21:44       ` Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2018-02-05 21:44 UTC (permalink / raw)
  To: walter harms; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

On 05 Feb 2018 17:19, walter harms wrote:
> Am 05.02.2018 17:13, schrieb Mike Frysinger:
> > Make it clear that the delimiters in LD_LIBRARY_PATH cannot be escaped
> > so people don't try various methods (like \:) to workaround it.
> > 
> > --- a/man8/ld.so.8
> > +++ b/man8/ld.so.8
> > @@ -271,7 +271,8 @@ This is useful when using a debugger.
> >  .B LD_LIBRARY_PATH
> >  A list of directories in which to search for
> >  ELF libraries at execution time.
> > -The items in the list are separated by either colons or semicolons.
> > +The items in the list are separated by either colons or semicolons,
> > +and there is no support for escaping either separator.
> >  Similar to the
> >  .B PATH
> >  environment variable.
> 
> I am not sure that i understand that. You say that a libname like
> libfoo.1.2:3 is unparseable ?

i think you're confusing LD_LIBRARY_PATH with other variables like
LD_PRELOAD.  my patch here is for the former, and that only loads
search paths (i.e. directories), not files.

however, you're correct in that LD_PRELOAD="libfoo.1.2:3" would not
work if the file was literally named "libfoo.1.2:3".  it would search
for "libfoo.1.2" and "3", and there is no way to change that behavior.

i'll send another patch.
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] ld.so.8: make lack of separator escaping explicit
       [not found] ` <20180205161357.8131-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
  2018-02-05 16:19   ` walter harms
@ 2018-02-05 21:48   ` Mike Frysinger
       [not found]     ` <20180205214802.18397-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2018-02-05 21:48 UTC (permalink / raw)
  To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Make it clear that the delimiters in LD_PRELOAD, LD_LIBRARY_PATH, and
LD_AUDIT cannot be escaped so people don't try various methods (such
as \:) to workaround it.

Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
---
 man8/ld.so.8 | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/man8/ld.so.8 b/man8/ld.so.8
index 64e1fb2afdc3..bd1457e1e7f5 100644
--- a/man8/ld.so.8
+++ b/man8/ld.so.8
@@ -271,7 +271,8 @@ This is useful when using a debugger.
 .B LD_LIBRARY_PATH
 A list of directories in which to search for
 ELF libraries at execution time.
-The items in the list are separated by either colons or semicolons.
+The items in the list are separated by either colons or semicolons,
+and there is no support for escaping either separator.
 Similar to the
 .B PATH
 environment variable.
@@ -310,7 +311,8 @@ as shell variables!)
 .B LD_PRELOAD
 A list of additional, user-specified, ELF shared
 objects to be loaded before all others.
-The items of the list can be separated by spaces or colons.
+The items of the list can be separated by spaces or colons,
+and there is no support for escaping either separator.
 This can be used to selectively override functions in other shared objects.
 The objects are searched for using the rules given under DESCRIPTION.
 .IP
@@ -352,7 +354,8 @@ many obsolete or only for internal use.
 A colon-separated list of user-specified, ELF shared objects
 to be loaded before all others in a separate linker namespace
 (i.e., one that does not intrude upon the normal symbol bindings that
-would occur in the process).
+would occur in the process)
+and there is no support for escaping the separator.
 These objects can be used to audit the operation of the dynamic linker.
 .IP
 .B LD_AUDIT
-- 
2.16.1

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ld.so.8: make lack of separator escaping explicit
       [not found]     ` <20180205214802.18397-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
@ 2018-02-06  8:46       ` walter harms
       [not found]         ` <5A796B65.7070705-fPG8STNUNVg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: walter harms @ 2018-02-06  8:46 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: Michael Kerrisk, linux-man-u79uwXL29TY76Z2rM5mHXA



Am 05.02.2018 22:48, schrieb Mike Frysinger:
> Make it clear that the delimiters in LD_PRELOAD, LD_LIBRARY_PATH, and
> LD_AUDIT cannot be escaped so people don't try various methods (such
> as \:) to workaround it.
> 
> Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
> ---
>  man8/ld.so.8 | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/man8/ld.so.8 b/man8/ld.so.8
> index 64e1fb2afdc3..bd1457e1e7f5 100644
> --- a/man8/ld.so.8
> +++ b/man8/ld.so.8
> @@ -271,7 +271,8 @@ This is useful when using a debugger.
>  .B LD_LIBRARY_PATH
>  A list of directories in which to search for
>  ELF libraries at execution time.
> -The items in the list are separated by either colons or semicolons.
> +The items in the list are separated by either colons or semicolons,
> +and there is no support for escaping either separator.
>  Similar to the
>  .B PATH
>  environment variable.
> @@ -310,7 +311,8 @@ as shell variables!)
>  .B LD_PRELOAD
>  A list of additional, user-specified, ELF shared
>  objects to be loaded before all others.
> -The items of the list can be separated by spaces or colons.
> +The items of the list can be separated by spaces or colons,
> +and there is no support for escaping either separator.
>  This can be used to selectively override functions in other shared objects.
>  The objects are searched for using the rules given under DESCRIPTION.
>  .IP
> @@ -352,7 +354,8 @@ many obsolete or only for internal use.
>  A colon-separated list of user-specified, ELF shared objects
>  to be loaded before all others in a separate linker namespace
>  (i.e., one that does not intrude upon the normal symbol bindings that
> -would occur in the process).
> +would occur in the process)
> +and there is no support for escaping the separator.
>  These objects can be used to audit the operation of the dynamic linker.
>  .IP
>  .B LD_AUDIT

Everything is alright. NTL i would suggest to make consequences more clear, e.g.:

"There is \fBno way\rR to have libraryname like libfoo-1:2. In this case ld.so will
 always search for \fBibfoo-1\fR and \fB2\fR."

your mileage may vary.

re,
 wh

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ld.so.8: make lack of separator escaping explicit
       [not found]         ` <5A796B65.7070705-fPG8STNUNVg@public.gmane.org>
@ 2018-02-06 18:28           ` Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2018-02-06 18:28 UTC (permalink / raw)
  To: walter harms; +Cc: Michael Kerrisk, linux-man-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 2092 bytes --]

On 06 Feb 2018 09:46, walter harms wrote:
> Am 05.02.2018 22:48, schrieb Mike Frysinger:
> > Make it clear that the delimiters in LD_PRELOAD, LD_LIBRARY_PATH, and
> > LD_AUDIT cannot be escaped so people don't try various methods (such
> > as \:) to workaround it.
> > 
> > --- a/man8/ld.so.8
> > +++ b/man8/ld.so.8
> > @@ -271,7 +271,8 @@ This is useful when using a debugger.
> >  .B LD_LIBRARY_PATH
> >  A list of directories in which to search for
> >  ELF libraries at execution time.
> > -The items in the list are separated by either colons or semicolons.
> > +The items in the list are separated by either colons or semicolons,
> > +and there is no support for escaping either separator.
> >  Similar to the
> >  .B PATH
> >  environment variable.
> > @@ -310,7 +311,8 @@ as shell variables!)
> >  .B LD_PRELOAD
> >  A list of additional, user-specified, ELF shared
> >  objects to be loaded before all others.
> > -The items of the list can be separated by spaces or colons.
> > +The items of the list can be separated by spaces or colons,
> > +and there is no support for escaping either separator.
> >  This can be used to selectively override functions in other shared objects.
> >  The objects are searched for using the rules given under DESCRIPTION.
> >  .IP
> > @@ -352,7 +354,8 @@ many obsolete or only for internal use.
> >  A colon-separated list of user-specified, ELF shared objects
> >  to be loaded before all others in a separate linker namespace
> >  (i.e., one that does not intrude upon the normal symbol bindings that
> > -would occur in the process).
> > +would occur in the process)
> > +and there is no support for escaping the separator.
> >  These objects can be used to audit the operation of the dynamic linker.
> >  .IP
> >  .B LD_AUDIT
> 
> Everything is alright. NTL i would suggest to make consequences more clear, e.g.:
> 
> "There is \fBno way\rR to have libraryname like libfoo-1:2. In this case ld.so will
>  always search for \fBibfoo-1\fR and \fB2\fR."

could do.  lets see what Michael thinks.
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-06 18:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-05 16:13 [PATCH] ld.so(8): make lack of separator escaping explicit Mike Frysinger
     [not found] ` <20180205161357.8131-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2018-02-05 16:19   ` walter harms
     [not found]     ` <5A78842E.2060402-fPG8STNUNVg@public.gmane.org>
2018-02-05 21:44       ` Mike Frysinger
2018-02-05 21:48   ` [PATCH v2] ld.so.8: " Mike Frysinger
     [not found]     ` <20180205214802.18397-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2018-02-06  8:46       ` walter harms
     [not found]         ` <5A796B65.7070705-fPG8STNUNVg@public.gmane.org>
2018-02-06 18:28           ` Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.