From eb4772fc6d67f40a09ce2a11d32a903f66778866 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Wed, 24 Jul 1996 18:23:02 +0000 Subject: [PATCH] * Makefile.in (all): Use $(LD) instead of $(CC) for link stage * dump.c (dump_db): Zero out kadm5_principal_ent_rec structure before passing to rpc code. * kadmin.c (kadmin_addprinc, kadmin_getprinc, kadmin_modprinc): Zero out structures before passing to rpc code. This is because uninitialized longs in the structures cause xdr_long to fail if the higher 32/64 bits are set on the Alpha. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8796 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/cli/ChangeLog | 10 ++++++++++ src/kadmin/cli/Makefile.in | 4 ++-- src/kadmin/cli/dump.c | 2 ++ src/kadmin/cli/kadmin.c | 11 +++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/kadmin/cli/ChangeLog b/src/kadmin/cli/ChangeLog index eeb5d031d..f7df2c822 100644 --- a/src/kadmin/cli/ChangeLog +++ b/src/kadmin/cli/ChangeLog @@ -1,3 +1,13 @@ +Wed Jul 24 14:18:13 1996 Ezra Peisach + + * Makefile.in (all): Use $(LD) instead of $(CC) for link stage. + + * dump.c (dump_db): Zero out kadm5_principal_ent_rec structure + before passing to rpc code. + + * kadmin.c (kadmin_addprinc, kadmin_getprinc, kadmin_modprinc): + Zero out structures before passing to rpc code. + Tue Jul 23 17:02:04 1996 Tom Yu * Makefile.in: add dependency for kadmin_ct.o diff --git a/src/kadmin/cli/Makefile.in b/src/kadmin/cli/Makefile.in index 42fca3bcb..82e09a049 100644 --- a/src/kadmin/cli/Makefile.in +++ b/src/kadmin/cli/Makefile.in @@ -6,10 +6,10 @@ OBJS = kadmin.o kadmin_ct.o ss_wrapper.o getdate.o keytab.o all:: $(PROG).local $(PROG) $(PROG).local: $(OBJS) $(SRVDEPLIBS) - $(CC) $(LDFLAGS) $(LDARGS) -o $(PROG).local $(OBJS) $(SRVLIBS) + $(LD) $(LDFLAGS) $(LDARGS) -o $(PROG).local $(OBJS) $(SRVLIBS) $(PROG): $(OBJS) $(CLNTDEPLIBS) - $(CC) $(LDFLAGS) $(LDARGS) -o $(PROG) $(OBJS) $(CLNTLIBS) + $(LD) $(LDFLAGS) $(LDARGS) -o $(PROG) $(OBJS) $(CLNTLIBS) kadmin_ct.o: kadmin_ct.c diff --git a/src/kadmin/cli/dump.c b/src/kadmin/cli/dump.c index 2c5e4e753..c2a61e18a 100644 --- a/src/kadmin/cli/dump.c +++ b/src/kadmin/cli/dump.c @@ -453,6 +453,8 @@ void dump_db(argc, argv) dump_name = k5beta6_fmt_name; arglist.verbose = 0; + memset(&princ_ent, 0, sizeof(princ)); + /* * Parse the qualifiers. */ diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index e19383dd9..7a86e957e 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -806,6 +806,9 @@ void kadmin_addprinc(argc, argv) static char newpw[1024]; static char prompt1[1024], prompt2[1024]; + /* Zero all fields in request structure */ + memset(&princ, 0, sizeof(princ)); + princ.attributes = 0; if (kadmin_parse_princ_args(argc, argv, &princ, &mask, &pass, &randkey, @@ -894,6 +897,9 @@ void kadmin_modprinc(argc, argv) return; } + memset(&oldprinc, 0, sizeof(oldprinc)); + memset(&princ, 0, sizeof(princ)); + retval = kadmin_parse_name(argv[argc - 1], &kprinc); if (retval) { com_err("modify_principal", retval, "while parsing principal"); @@ -959,6 +965,11 @@ void kadmin_getprinc(argc, argv) fprintf(stderr, "usage: get_principal [-terse] principal\n"); return; } + + + memset(&dprinc, 0, sizeof(dprinc)); + memset(&princ, 0, sizeof(princ)); + retval = kadmin_parse_name(argv[argc - 1], &princ); if (retval) { com_err("get_principal", retval, "while parsing principal"); -- 2.26.2