1. 04 Jan, 2019 2 commits
    • Emanuele Aina's avatar
      Make the homedir overridable with the NSS_UNKNOWN_HOME env var · 2017608f
      Emanuele Aina authored
      By default `libnss-unknown` violates the assumption that the result of
      calling `getpwent()`/`getpwuid()` does not change when the environment
      changes as the value for the `pw_dir` field depends on the `$HOME` var.
      
      For instance the `posix/wordexp-test` test in the glibc testsuite
      breaks with `libnss-unknown`:
      
      * the call to `getpwuid()` with `HOME=/dummy/home` returns
        `/dummy/home` due to `libnss-unknown`
      * `unsetenv ("HOME")` is called
      * any call to `getpwuid()` will now return `/` due to
        `libnss-unknown` as no `$HOME` is set
      * test fails because results don't match
      
      Setting `NSS_UNKNOWN_HOME` before running the test will get rid of the
      dependency between `getpwuid()` and `$HOME`.
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      2017608f
    • Emanuele Aina's avatar
      Test resolution of current unknown user · 58bd6d6a
      Emanuele Aina authored
      Test behaviour when resolving the current user with HOME set or unset,
      pretending that the user is not in the passwd db by using nss_wrapper.
      
      Use `meson test` to run the test.
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      58bd6d6a
  2. 18 Sep, 2018 2 commits