--- lib/libpam/modules/pam_xdg/pam_xdg.c.orig +++ lib/libpam/modules/pam_xdg/pam_xdg.c @@ -108,6 +108,7 @@ goto out; } } else { + close(rt_dir); /* Check that the already create dir is correctly owned */ rv = fstatat(rt_dir_prefix, user, &sb, 0); if (rv == -1) {