This may be the same problem I reported in Bug #914674

I notice this behaviour as well:

[+16.19s] DEBUG: Dropping privileges to uid 6057
[+16.19s] DEBUG: Adding session authority to /npdisks/home/jb/.Xauthority
[+16.20s] DEBUG: Restoring privileges
[+16.20s] DEBUG: Launching process 7148: /usr/sbin/lightdm-session 
'gnome-session --session=ubuntu'
[+16.20s] WARNING: Failed to change to home directory /npdisks/home/jb: 
Permission denied

It looks like it restores privileges to root before trying to change to
home directory and this naturally fails since root has no privileges
there.

It looks like session.c tries to change working directory _before_ it
tries to change user:

session.c:
Line 409:
    /* Change working directory */
    if (chdir (user_get_home_directory (user)) != 0)
    {
        g_warning ("Failed to change to home directory %s: %s", 
user_get_home_directory (user), strerror (errno));
        _exit (EXIT_FAILURE);
    }

    /* Change to this user */
    if (getuid () == 0)
    {
        if (initgroups (user_get_name (user), user_get_gid (user)) < 0)
        {
            g_warning ("Failed to initialize supplementary groups for %s: %s", 
user_get_name (user), strerror (errno));
            _exit (EXIT_FAILURE);
        }

        if (setgid (user_get_gid (user)) != 0)
        {
            g_warning ("Failed to set group ID to %d: %s", user_get_gid (user), 
strerror (errno));
            _exit (EXIT_FAILURE);
        }

        if (setuid (user_get_uid (user)) != 0)
        {
            g_warning ("Failed to set user ID to %d: %s", user_get_uid (user), 
strerror (errno));
            _exit (EXIT_FAILURE);
        }
    }

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/877766

Title:
  lightdm login fails with NFS home and strict (mode 0700) permissions

To manage notifications about this bug go to:
https://bugs.launchpad.net/lightdm/+bug/877766/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to