Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[has fix] PR #888 is incomplete #918

Closed
@tobwen

Description

@tobwen

issue

PR #888 introduced an approach to find the _libnss_library: https://github.com/infosiftr/postgres/blob/ab940cbb923af99e2c7cf0e0ba5305bc6815aecc/docker-entrypoint.sh#L73-L84

This approach was invalid because it used the pattern {/usr,}/lib{/*,}/libnss_wrapper.so. Depending on environment, it might find binaries in

/usr/lib/x86_64-linux-gnu/libnss_wrapper.so
/usr/lib/libnss_wrapper.so
/lib/*/libnss_wrapper.so
/lib/libnss_wrapper.so

Later in the code, "nss_wrapper" bits get unset/cleanup, but LD_PRELOAD is tested against /usr/lib/libnss_wrapper.so only. So in worst-cast, the variables won't get unset: https://github.com/infosiftr/postgres/blob/ab940cbb923af99e2c7cf0e0ba5305bc6815aecc/docker-entrypoint.sh#L94

fix

#919

hint

There might be better approaches, f.e. testing if LD_PRELOAD has been set at all or making it POSIX-compatible, but I wanted to keep most of the original code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions