Hi,
Shadow fails to compile because uClibc doesnot have NIS support. Good 'ol
Marty suggests a patch from
http://www.geocities.com/robm351/uclibc/shadow-uclibc.diff.txt, but this
only works with shadow-4.0.3. After a long hustle, I got shadow-4.0.3(thanks
to the debian archives) --- the above patch rewrites the function
netgroup_match in the files 'libmisc/login.c' and 'libmisc/login_access.c'
For Shadow-4.0.18.1 to build successfully, the netgroup_match function in
the file 'src/login_nopam.c' has to be changed to (I patched shadow-4.0.3
and copied the netgroup_match function);
static int
netgroup_match(const char *group, const char *machine, const char *user)
{
#if 0 /* original code */
#ifdef NIS
static char *mydomain = 0;
if (mydomain == 0)
yp_get_default_domain(&mydomain);
return (innetgr(group, machine, user, mydomain));
#else
syslog(LOG_ERR, "NIS netgroup support not configured");
return (NO);
#endif
#else /* works better with glibc? */
#ifdef NIS
static char *mydomain = 0;
if (mydomain == 0) {
static char domain[MAXHOSTNAMELEN+1];
getdomainname(domain, MAXHOSTNAMELEN);
mydomain = domain;
}
return innetgr(group, machine, user, mydomain);
#else
syslog(LOG_ERR, "NIS netgroup support not configured");
return (NO);
#endif
#endif
}
After this, shadow-4.0.18.1 builds successfully. My only problem now is that
the asm ver. of nologin segfaults. (Help will be appreciated)
--
http://linuxfromscratch.org/mailman/listinfo/hlfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page