Skip to content
Commit c3479fb7 authored by Sergei Trofimovich's avatar Sergei Trofimovich Committed by DJ Delorie
Browse files

nsswitch: return result when nss database is locked [BZ #27343]



Before the change nss_database_check_reload_and_get() did not populate
the '*result' value when it returned success in a case of chroot
detection. This caused initgroups() to use garage pointer in the
following test (extracted from unbound):

```

int main() {
    // load some NSS modules
    struct passwd * pw = getpwnam("root");

    chdir("/tmp");
    chroot("/tmp");
    chdir("/");
    // access nsswitch.conf in a chroot
    initgroups("root", 0);
}
```

Reviewed-by: default avatarDJ Delorie <dj@redhat.com>
parent 921e6f41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment