DragonFly BSD
DragonFly commits List (threaded) for 2012-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: rtld: Add two special directives to libmap.conf


From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 5 May 2012 00:34:16 -0700 (PDT)

commit 51b1ba8e5aac0e71bb9bfd9b3779a4e683ffc3c7
Author: John Marino <draco@marino.st>
Date:   Fri May 4 18:54:27 2012 +0200

    rtld: Add two special directives to libmap.conf
    
    include <file>:
        Parse the contents of file before continuing with the current file.
    
    includedir <dir>:
        Parse the contents of every file in dir that ends in .conf before
        continuing with the current file.
    
    Any file or directory encountered while processing include or includedir
    directives will be parsed exactly once, even if it is encountered multiple
    times.
    
    Taken from FreeBSD SVN 234851 (30 APR 2012) with modification:
    
    1) DragonFly realpath works differently than FreeBSD's and doesn't
       accept a null value for the resolved_path argument.
    2) FreeBSD's debug lines reflect the wrong function, lm_init, instead
       of lmc_parse_file.  lmc_parse_dir also calls lmc_parse_file, so
       the debug message is definitely wrong and was corrected.
    3) FreeBSD keeps using path even after determining realpath and putting
       the result in the rpath variable.  It uses path for debug messages
       and opening a file descriptor.  DragonFly doesn't use path again and
       only uses rpath after it is determined.
    4) FreeBSD's lmc_parse_file code had a bug in the linked list used to
       track which conf files had already been parsed.  Memory for the
       filename was allocated so it wouldn't get overwritten after multiple
       passes, which is standard for the includedir functionality.

Summary of changes:
 libexec/rtld-elf/libmap.c    |  161 ++++++++++++++++++++++++++++++++++-------
 share/man/man5/libmap.conf.5 |   25 ++++++-
 2 files changed, 156 insertions(+), 30 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/51b1ba8e5aac0e71bb9bfd9b3779a4e683ffc3c7


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]