← Back to team overview

desktop-packages team mailing list archive

[Bug 1493335] Re: Support for 'list members of group(s) only'


Robert, yes, it works and is what i want, exactly.
There is small issue, however. - Primary groups didn''t supported in current code. So, for example, if user1 has 'group1' as its primary group (set in /etc/passwd) he will be filtered out. Can you please improve in_group () method with smth like:

    private bool in_group (string group_name, string user_name)
        unowned Posix.Group? group = Posix.getgrnam (group_name);
        if (group == null)
            return false;

        /* Check if user has group_name as it's primary group  */
        unowned Posix.Passwd? pw = Posix.getpwnam( user_name );
        if( pw.pw_gid == group.gr_gid )
            return true;

        /* Check if group_name is user's auxilary group */
        foreach (var name in group.gr_mem)
            if (name == user_name)
                return true;

        return false;

You received this bug notification because you are a member of Desktop
Packages, which is subscribed to unity-greeter in Ubuntu.

  Support for 'list members of group(s) only'

Status in unity-greeter package in Ubuntu:

Bug description:
  It would be great to have "/com/canonical/unity-greeter/hidden-users"
  counterpart with revert logic.

  In our project we need the greeter shows members of some group(s)

  We can't delegate this work to lightdm or accountsservice because this
  can break login/policy/accounting system. - Our goal only is to get
  occasional/admin users of workplace out of greeter's 'users board'.

  To achieve this we had to change current unity-greeter code.
  We publish branch here: lp:~dmzavr/unity-greeter/unity-greeter

  Can we expect the requested feature will be supported in some future

To manage notifications about this bug go to: