[OpenAFS-devel] AFS-NSS-Module?
Tobias Kranz
TOBx@gmx.de
Wed, 17 Nov 2004 11:54:04 +0100 (MET)
Hi *,
some weeks ago I asked for a nss-module for afs. Todd L. helped me a lot by
putting a link to his nss_pts-module on
this list. Thanks Todd! ;-)
I downloaded it and compiled it on one of our AFS-systems and notified a
strange behavier of the module.
When I enter `getent passwd ANY_UID´ the modules behaves as it should and I
get the expected output. No crash. It
just works. *great* ;-)
But as I tried to list a directory with `ls´, it ends up in a `segmentation
violation´. ;-(
Finally I was able to track the problem down to this file:
`src/lwp/process.c´ .
In the function `savecontext´ there is a call to `longjmp(...)´ which causes
the crash.
My AFS-Version is 1.3.74 (also reproduceable with 1.2.13) as you can see in
the infos below.
I hope, that I have attached all infos you need, to reproduce this problem,
too.
(Again the URL to the used module from Todd:
http://tarna.oit.unc.edu/~utoddl/ (File: nss_pts_0.2.tgz))
After compiling the module copy the file `libnss_ptsXXX´ to `/lib´ and call
`ls´ in a directory where are files whose owners are afs-users.
Thanks a lot
Tobias
source:
-- start --
afs_int32
savecontext(ep, savearea, sp)
char (*ep) ();
struct lwp_context *savearea;
char *sp;
{
int code;
PRE_Block = 1;
EP = ep;
code = setjmp(savearea->setjmp_buffer);
jmpBuffer = (jmp_buf_type *) savearea->setjmp_buffer;
savearea->topstack = (char *)jmpBuffer[LWP_SP];
#if defined(DEBUG)
{
int i, *ptr = (int *)savearea->setjmp_buffer;
printf("savecontext\n");
for (i = 0; i < 5; i++)
printf("(%d) 0x%x ", i, ptr[i]);
printf("\n");
for (i = 5; i < 10; i++)
printf("(%d) 0x%x ", i, ptr[i]);
printf("\n");
}
#endif
switch (code) {
case 0:
if (!sp)
(*EP) ();
else {
rc = setjmp(jmp_tmp);
switch (rc) {
case 0:
jmpBuffer = (jmp_buf_type *) jmp_tmp;
jmpBuffer[LWP_SP] = (jmp_buf_type) sp;
#if defined(AFS_S390_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV) ||
(defined(AFS_SPARC64_LINUX20_ENV) &&
defined(AFS_32BIT_USR_ENV))
jmpBuffer[LWP_FP] = (jmp_buf_type) sp;
#endif
/*
* POINT OF CRASH
*/
printf("%s:%s(%d): Alive\n", __FILE__, __FUNCTION__, __LINE__); /* This msg.
is printed */
longjmp(jmp_tmp, 1); /* CALL THAT CAUSES THE SIGFAULT */
printf("%s:%s(%d): Dead\n", __FILE__, __FUNCTION__, __LINE__); /* This msg.
is NOT printed */
break;
case 1:
(*EP) ();
assert(0); /* never returns */
break;
default:
perror("Error in setjmp1\n");
exit(2);
}
}
break;
case 2: /* restoring frame */
break;
default:
perror("Error in setjmp2 : restoring\n");
exit(3);
}
return 0;
}
-- end --
Openafs-configre-skript:
-- start --
./configure \
--enable-largefile-fileserver \
--enable-namei-fileserver \
--enable-supergroups \
--enable-fast-restart \
--enable-bitmap-later \
--enable-transarc-paths
-- end --
Sys-info (gcc, glibc, uname, openafs):
-- start --
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.2/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local
--infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib
--enable-languages=c,c++,f77,objc,java,ada
--enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib
--with-system-zlib --enable-shared
--enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.2
--
Linux MACHINENAME 2.4.27 #2 Wed Oct 13 14:37:37 CEST 2004 i686 unknown
--
glibc-i18ndata-2.2.5-163
glibc-info-2.2.5-163
glibc-2.2.5-164
glib-1.2.10-326
glib2-2.0.6-47
glibc-locale-2.2.5-163
glib-devel-1.2.10-326
glib2-devel-2.0.6-47
glibc-devel-2.2.5-163
--
@(#) OpenAFS 1.3.74 built 2004-11-17
-- end --
--
Geschenkt: 3 Monate GMX ProMail + 3 Top-Spielfilme auf DVD
++ Jetzt kostenlos testen http://www.gmx.net/de/go/mail ++