svn rev #23294: trunk/src/lib/kadm5/unit-test/

epeisach@MIT.EDU epeisach at MIT.EDU
Thu Nov 19 22:42:40 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=23294
Commit By: epeisach
Log Message:
The size of kadm5_server_handle_rec differs between the client and
server code. Valgrind picked up on access past end of allocated
structure.  Include proper internal header in client/server test.




Changed Files:
U   trunk/src/lib/kadm5/unit-test/Makefile.in
U   trunk/src/lib/kadm5/unit-test/handle-test.c
Modified: trunk/src/lib/kadm5/unit-test/Makefile.in
===================================================================
--- trunk/src/lib/kadm5/unit-test/Makefile.in	2009-11-19 21:59:23 UTC (rev 23293)
+++ trunk/src/lib/kadm5/unit-test/Makefile.in	2009-11-20 03:42:40 UTC (rev 23294)
@@ -23,10 +23,13 @@
 	$(CC_LINK) -o destroy-test destroy-test.o \
 		$(KADMCLNT_LIBS) $(KRB5_BASE_LIBS)
 
-client-handle-test: handle-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o client-handle-test handle-test.o \
+client-handle-test: client-handle-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS)
+	$(CC_LINK) -o client-handle-test client-handle-test.o \
 		$(KADMCLNT_LIBS) $(KRB5_BASE_LIBS)
 
+client-handle-test.o: handle-test.c
+	$(CC) $(ALL_CFLAGS) -DCLIENT_TEST -o client-handle-test.o -c $(srcdir)/handle-test.c
+
 client-iter-test: iter-test.o $(KADMLCNT_DEPLIBS) $(KRB5_BASE_DEPLIBS)
 	$(CC_LINK) -o client-iter-test iter-test.o \
 		$(KADMCLNT_LIBS) $(KRB5_BASE_LIBS)
@@ -128,7 +131,7 @@
 clean::
 	$(RM) init-test client_init.o init-test.o
 	$(RM) destroy-test destroy-test.o
-	$(RM) client-handle-test handle-test.o
+	$(RM) client-handle-test handle-test.o client-handle-test.o
 	$(RM) client-iter-test iter-test.o
 	$(RM) randkey-test randkey-test.o
 	$(RM) server-handle-test handle-test.o

Modified: trunk/src/lib/kadm5/unit-test/handle-test.c
===================================================================
--- trunk/src/lib/kadm5/unit-test/handle-test.c	2009-11-19 21:59:23 UTC (rev 23293)
+++ trunk/src/lib/kadm5/unit-test/handle-test.c	2009-11-20 03:42:40 UTC (rev 23294)
@@ -7,9 +7,13 @@
 #include <sys/file.h>
 #include <unistd.h>
 #include <netinet/in.h>
+#ifdef CLIENT_TEST
 #include <kadm5/client_internal.h>
+#else
+#include <kadm5/server_internal.h>
+#include <kadm5/admin.h>
+#endif
 
-
 int main(int argc, char *argv[])
 {
     kadm5_ret_t ret;




More information about the cvs-krb5 mailing list