Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 169909 - libnfsidmap needs getgrouplist which is not provided by uClibc
Summary: libnfsidmap needs getgrouplist which is not provided by uClibc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-08 08:52 UTC by Natanael Copa
Modified: 2007-03-25 07:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2007-03-08 08:52:56 UTC
checking for crypt in -lcrypt... yes
checking for event_dispatch in -levent... yes
checking for nfs4_init_name_mapping in -lnfsidmap... no
configure: error: libnfsidmap needed for nfsv4 support

The libnfsidmap is previously sucessfully emerged. From config.log:

configure:21958: $? = 0
configure:21965: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:21968: $? = 0
configure:21975: test -s conftest
configure:21978: $? = 0
configure:21992: result: yes
configure:22002: checking for nfs4_init_name_mapping in -lnfsidmap
configure:22037: i386-gentoo-linux-uclibc-gcc -o conftest -march=i386 -Os -pipe 
-fomit-frame-pointer  -D_GNU_SOURCE  conftest.c -lnfsidmap   >&5
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../libnfsidmap.so: undefined r
eference to `getgrouplist'
collect2: ld returned 1 exit status
configure:22043: $? = 1
configure: failed program was:
| /* confdefs.h.  */

getgrouplist is not defined in uclibc but its rather simle. The getgrouplist from freebsd libc looks like this:

int
getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt)
{
        const struct group *grp;
        int i, maxgroups, ngroups, ret;

        ret = 0;
        ngroups = 0;
        maxgroups = *grpcnt;
        /*
         * When installing primary group, duplicate it;
         * the first element of groups is the effective gid
         * and will be overwritten when a setgid file is executed.
         */
        groups[ngroups++] = agroup;
        if (maxgroups > 1)
                groups[ngroups++] = agroup;
        /*
         * Scan the group file to find additional groups.
         */
        setgrent();
        while ((grp = getgrent()) != NULL) {
                for (i = 0; i < ngroups; i++) {
                        if (grp->gr_gid == groups[i])
                                goto skip;
                }
                for (i = 0; grp->gr_mem[i]; i++) {
                        if (!strcmp(grp->gr_mem[i], uname)) {
                                if (ngroups >= maxgroups) {
                                        ret = -1;
                                        break;
                                }
                                groups[ngroups++] = grp->gr_gid;
                                break;
                        }
                }
skip:
                ;
        }
        endgrent();
        *grpcnt = ngroups;
        return (ret);
}
Comment 1 SpanKY gentoo-dev 2007-03-25 07:28:53 UTC
fixed in 0.19 and mailed upstream