diff options
author | Ezra Peisach <epeisach@mit.edu> | 2009-11-20 03:42:40 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2009-11-20 03:42:40 +0000 |
commit | 0df297ff0cb581f764e3acf1dab661f322d2b42e (patch) | |
tree | 3c9c3511df64253cc51a975eda80be9a82c9022c /src/lib/kadm5 | |
parent | 3a8d64c72b91f5070ce843d9386754a102e5c894 (diff) | |
download | krb5-0df297ff0cb581f764e3acf1dab661f322d2b42e.zip krb5-0df297ff0cb581f764e3acf1dab661f322d2b42e.tar.gz krb5-0df297ff0cb581f764e3acf1dab661f322d2b42e.tar.bz2 |
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.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23294 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/kadm5')
-rw-r--r-- | src/lib/kadm5/unit-test/Makefile.in | 9 | ||||
-rw-r--r-- | src/lib/kadm5/unit-test/handle-test.c | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/kadm5/unit-test/Makefile.in b/src/lib/kadm5/unit-test/Makefile.in index 8afe66a..caa4e2d 100644 --- a/src/lib/kadm5/unit-test/Makefile.in +++ b/src/lib/kadm5/unit-test/Makefile.in @@ -23,10 +23,13 @@ destroy-test: destroy-test.o $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(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 @@ unit-test-server-body: site.exp test-handle-server lock-test 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 diff --git a/src/lib/kadm5/unit-test/handle-test.c b/src/lib/kadm5/unit-test/handle-test.c index 56eac84..9f0e3fe 100644 --- a/src/lib/kadm5/unit-test/handle-test.c +++ b/src/lib/kadm5/unit-test/handle-test.c @@ -7,8 +7,12 @@ #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[]) { |