File /etc/ld.so.preload can be used to preload shard objects but there is no /etc/ld.so.preload.d drop-in configuration folder supported yet. Modifying /etc/ld.so.preload directly is appropriate for system administrators but not for linux distributions. A configuration file can only be owned by one package at the same time. A package that shipped a /etc/ld.so.preload file might overwrite the local system administator's changes. Therefore as you may know many applications support configuration drop-in folders. Examples are /etc/default/grub.d /etc/grub.d /etc/profile.d /etc/X11/Xsession.d and many more. Could you please add a new feature to parse /etc/ld.so.preload.d for configuration snippets?
(In reply to adrelanos from comment #0) > File /etc/ld.so.preload can be used to preload shard objects but there is no > /etc/ld.so.preload.d drop-in configuration folder supported yet. Yes there is. You just use "include ld.so.conf.d/*.conf" in the top-level configuration. > Modifying /etc/ld.so.preload directly is appropriate for system > administrators but not for linux distributions. A configuration file can > only be owned by one package at the same time. A package that shipped a > /etc/ld.so.preload file might overwrite the local system administator's > changes. This is not correct. Distributions can and should modify /etc/ld.so.preload to provide the semantics they expect, including adding "include ld.so.conf.d/*.conf" at the top of the configuration file. System administrators should read their distribution instructions, and on distributions that use "/etc/ld.so.preload.d" the changes should be made as files in the configuration directory. > Therefore as you may know many applications support configuration drop-in > folders. Examples are /etc/default/grub.d /etc/grub.d /etc/profile.d > /etc/X11/Xsession.d and many more. Yes, but we also support that. We give distributions the flexibility to put this directory anywhere by using the "include" directive. > Could you please add a new feature to parse /etc/ld.so.preload.d for > configuration snippets? What is missing from the existing support?
(In reply to Carlos O'Donell from comment #1) > (In reply to adrelanos from comment #0) > > File /etc/ld.so.preload can be used to preload shard objects but there is no > > /etc/ld.so.preload.d drop-in configuration folder supported yet. > > Yes there is. > > You just use "include ld.so.conf.d/*.conf" in the top-level configuration. Sorry, /etc/ld.so.conf and /etc/ld.so.preload are two different files with different parsers and capabilities. The dynamic loader does not read /etc/ld.so.conf at all.
(In reply to Florian Weimer from comment #2) > (In reply to Carlos O'Donell from comment #1) > > (In reply to adrelanos from comment #0) > > > File /etc/ld.so.preload can be used to preload shard objects but there is no > > > /etc/ld.so.preload.d drop-in configuration folder supported yet. > > > > Yes there is. > > > > You just use "include ld.so.conf.d/*.conf" in the top-level configuration. > > Sorry, /etc/ld.so.conf and /etc/ld.so.preload are two different files with > different parsers and capabilities. The dynamic loader does not read > /etc/ld.so.conf at all. Oh! I thought we used exactly the same parser internally for both. I see what you mean though in elf/rtld.c we have a completely different parser.
(In reply to Carlos O'Donell from comment #3) > (In reply to Florian Weimer from comment #2) > > (In reply to Carlos O'Donell from comment #1) > > > (In reply to adrelanos from comment #0) > > > > File /etc/ld.so.preload can be used to preload shard objects but there is no > > > > /etc/ld.so.preload.d drop-in configuration folder supported yet. > > > > > > Yes there is. > > > > > > You just use "include ld.so.conf.d/*.conf" in the top-level configuration. > > > > Sorry, /etc/ld.so.conf and /etc/ld.so.preload are two different files with > > different parsers and capabilities. The dynamic loader does not read > > /etc/ld.so.conf at all. > > Oh! I thought we used exactly the same parser internally for both. I see > what you mean though in elf/rtld.c we have a completely different parser. We can probably refactor some of parse_conf_include. I'd hate to have this code duplicated.