>>>Derek Atkins  said:
  > What does "uname -r" return?  Running the rpmbuild on an x86_64 should
  > build the userspace RPMS and a kernel module/rpm for the currently running
  > kernel.  If it's an SMP kernel, then it should be an SMP module.
  > 
  > -derek
  > 
  > Quoting Lee Damon <[EMAIL PROTECTED]>:
  > 
  > > This was all compiled in one rpmbuild -ba operation so hopefully it 
  > > was all done with the same compiler.
  > >
  > > Turns out the rpmbuild didn't build modules for SMP kernel (even when 
  > > compiled while a 2.6.9-22.ELsmp kernel was running) so I'm back to 
  > > playing with colorful blocks for a while until I learn more about 
  > > building RPMs (in my CFT).
  > >
  > > nomad
  > >
  > > [EMAIL PROTECTED] wrote:
  > >>
  > >> I had problems like this when I compiled aklog with a different 
  > >> compiler (gcc-2.95.3) from the one that I used with openafs 
  > >> (gcc-3.2.3) awhile back.  Hopefully with them integrated together 
  > >> there's no way for it to pick up different compilers, but you never 
  > >> know...
  > >>
  > >> On Mon, 31 Oct 2005, Lee Damon wrote:
  > >>
  > >>> Derek,
  > >>>
  > >>> In the now successfully rebuilt 1.4.0rc5 SRPM-based RPM for x86_64
  > >>> everything seems to work except for aklog.  It segfaults.
  > >>>
  > >>> : || [EMAIL PROTECTED] ~ [15] ; which aklog
  > >>> /usr/bin/aklog
  > >>> : || [EMAIL PROTECTED] ~ [16] ; rpm -qf /usr/bin/aklog
  > >>> openafs-krb5-1.4.0rc5-1.1
  > >>> : || [EMAIL PROTECTED] ~ [17] ; /usr/bin/aklog
  > >>> Segmentation fault
  > >>>
  > >>> the tail end of an strace says:
  > >>>
  > >>> open("/usr/vice/etc/ThisCell", O_RDONLY) = 3
  > >>> fstat(3, {st_mode=S_IFREG|0444, st_size=18, ...}) = 0
  > >>> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
  > >>> -1, 0) = 0x2a9556c000
  > >>> read(3, "ee.washington.edu\n", 4096)    = 18
  > >>> close(3)                                = 0
  > >>> munmap(0x2a9556c000, 4096)              = 0
  > >>> stat("/usr/vice/etc/CellServDB", {st_mode=S_IFREG|0444, 
  > >>> st_size=20765, ...}) = 0
  > >>> open("/usr/vice/etc/CellServDB", O_RDONLY) = 3
  > >>> fstat(3, {st_mode=S_IFREG|0444, st_size=20765, ...}) = 0
  > >>> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
  > >>> -1, 0) = 0x2a9556c000
  > >>> read(3, ">ee.washington.edu\t#Nikola\n128.2"..., 4096) = 4096
  > >>> read(3, "ysics, university Mainz, Germany"..., 4096) = 4096
  > >>> read(3, "                   #cpeven.physi"..., 4096) = 4096
  > >>> read(3, "              #ccafsdb3.in2p3.fr"..., 4096) = 4096
  > >>> read(3, "#The Slackers\' Network\n63.201.48"..., 4096) = 4096
  > >>> read(3, "Manchester HEP\n194.36.2.3       "..., 4096) = 285
  > >>> read(3, "", 4096)                       = 0
  > >>> close(3)                                = 0
  > >>> munmap(0x2a9556c000, 4096)              = 0
  > >>> open("/usr/vice/etc/CellAlias", O_RDONLY) = -1 ENOENT (No such file 
  > >>> or directory)
  > >>> open("/usr/vice/etc/KeyFile", O_RDONLY) = -1 ENOENT (No such file 
  > >>> or directory)
  > >>> stat("/usr/vice/etc/CellServDB", {st_mode=S_IFREG|0444, 
  > >>> st_size=20765, ...}) = 0
  > >>> stat("/usr/vice/etc/CellServDB", {st_mode=S_IFREG|0444, 
  > >>> st_size=20765, ...}) = 0
  > >>> stat("/etc/krb5.conf", {st_mode=S_IFREG|0444, st_size=1349, ...}) = 0
  > >>> stat("/etc/krb5.conf", {st_mode=S_IFREG|0444, st_size=1349, ...}) = 0
  > >>> stat("/etc/krb5.conf", {st_mode=S_IFREG|0444, st_size=1349, ...}) = 0
  > >>> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
  > >>> +++ killed by SIGSEGV +++
  > >>> Process 21860 detached
  > >>>
  > >>>
  > >>> nomad
  > >>> -----------                       - Lee "nomad" Damon -          \
  > >>> work: [EMAIL PROTECTED]                                      \
  > >>> play: [EMAIL PROTECTED]    or castle!nomad                           \
  > >>>                                                                    /\
  > >>> Sr. Systems Admin, UWEE SSLI Lab                                   /  \
  > >>>                "Celebrate Diversity"                             /    \
  > >>> _______________________________________________
  > >>> OpenAFS-info mailing list
  > >>> [email protected]
  > >>> https://lists.openafs.org/mailman/listinfo/openafs-info
  > >>>
  > > _______________________________________________
  > > OpenAFS-info mailing list
  > > [email protected]
  > > https://lists.openafs.org/mailman/listinfo/openafs-info
  > >
  > 
  > 
  > 
  > -- 
  >        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
  >        Member, MIT Student Information Processing Board  (SIPB)
  >        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
  >        [EMAIL PROTECTED]                        PGP key available
  > 
  > _______________________________________________
  > OpenAFS-info mailing list
  > [email protected]
  > https://lists.openafs.org/mailman/listinfo/openafs-info
  > 

I had the segfault in aklog when I built 1.4.0-rc8 with the openafs spec
file from 1.4.0-rc5, it seemed identical to a problem I had back when I 
was building openafs 1.3.83 for x86_64, and I had a patch for it.  I happens
when krb5_build_principal_xxx() is called using a "0" for an argument, which
is supposed to be a pointer, this ends up passing an invalid pointer
to krb5_build_principal(), and causes the segmentation fault.

This is fixed in the aklog in the openafs source, but it isn't built
on the x86_64 platform, and the spec file builds the afs-krb5 package instead,
which has this problem.

I'm attaching a patch that fixes this problem and similar problems in other
programs in the afs-krb5 package.

Karl Kelley

--


--- afs-krb5/src/keyfile_dump.c.64bit.build_principal.null	2003-03-16 19:13:34.000000000 -0600
+++ afs-krb5/src/keyfile_dump.c	2005-10-31 11:41:23.000000000 -0600
@@ -230,7 +230,7 @@
 
 	if ((retval = krb5_build_principal(convert_context, &princ,
 					   strlen(realm), realm, user,
-					   instance, 0))) {
+					   instance, (void*)NULL))) {
 		com_err("db_entry_output", retval, "while bulding principal");
 		exit(1);
 	}
--- afs-krb5/src/fakeka.c.64bit.build_principal.null	1999-03-11 15:46:09.000000000 -0600
+++ afs-krb5/src/fakeka.c	2005-10-31 11:40:50.000000000 -0600
@@ -423,7 +423,7 @@
 
     if ((code = krb5_build_principal_ext(context, &princ, strlen(localrealm),
 					 localrealm, strlen(name), name,
-					 strlen(inst), inst, 0))) {
+					 strlen(inst), inst, (void*)NULL))) {
 	syslog(LOG_ERR, "could not build principal: %s", error_message(code));
 	return KAINTERNALERROR;
     }
--- afs-krb5/src/aklog_param.c.64bit.build_principal.null	1999-05-25 13:24:38.000000000 -0500
+++ afs-krb5/src/aklog_param.c	2005-10-31 11:40:23.000000000 -0600
@@ -96,8 +96,8 @@
     if ((r = krb5_build_principal(context, &increds.server,
                      strlen(realm), realm,
                      name,
-           (inst && strlen(inst)) ? inst : 0,
-                     0))) {
+           (inst && strlen(inst)) ? inst : (void*)NULL,
+                     (void*)NULL))) {
         return((int)r);
     }
 
Karl E. Kelley                     <[EMAIL PROTECTED]>
Systems Programmer                 
Iowa State University Information Technology Services   Phone (515) 294-0005
Ames, Iowa 50011

Reply via email to