[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with ipropd-master in heimdal-20040426



Hi,

I have encountered a strange problem with ipropd-master/slave in late
heimdal snapshot versions:

The ipropd-slave process dies with this message in syslog:
	strange opcode 813826459

After a little bit of debugging, I have traced it down to the function
prop_one() in lib/kadm5/ipropd_master.c Reverting its code back to the
one in heimdal-0.6 (see diff below), everything works fine.

My exact configuration: heimdal-20040426 on Solaris 9 with Berkeley
db-4.2.52 and compiled with gcc-3.2.2.

Has anyone else seen this behavior?

Thanks,
              Alf.


@@ -243,6 +264,7 @@
 prop_one (krb5_context context, HDB *db, hdb_entry *entry, void *v)
 {
     krb5_error_code ret;
+    krb5_storage *sp;
     krb5_data data;
     struct slave *slave = (struct slave *)v;

@@ -255,7 +277,14 @@
        return ret;
     }
     memmove ((char *)data.data + 4, data.data, data.length - 4);
-    _krb5_put_int (data.data, ONE_PRINC, 4);
+    sp = krb5_storage_from_data(&data);
+    if (sp == NULL) {
+       krb5_data_free (&data);
+       return ENOMEM;
+    }
+    krb5_storage_seek(sp, data.length - 4, SEEK_SET);
+    krb5_store_int32(sp, ONE_PRINC);
+    krb5_storage_free(sp);

     ret = krb5_write_priv_message (context, slave->ac, &slave->fd, &data);
     krb5_data_free (&data);



-----------------------------------------------------------------------
  Alf Wachsmann                       | e-mail: alfw@slac.stanford.edu
  SLAC Computing Service              | Phone:  +1-650-926-4802
  2575 Sand Hill Road, M/S 97         | FAX:    +1-650-926-3329
  Menlo Park, CA 94025, USA           | Office: Bldg. 50/323
-----------------------------------------------------------------------
                http://www.slac.stanford.edu/~alfw (PGP)
-----------------------------------------------------------------------