Add the new kadm5srv function krb5_get_principal_keys to the export list
authorRuss Allbery <rra@stanford.edu>
Mon, 16 Apr 2007 22:03:54 +0000 (22:03 +0000)
committerRuss Allbery <rra@stanford.edu>
Mon, 16 Apr 2007 22:03:54 +0000 (22:03 +0000)
Build a separate copy of kadmin/cli/keytab.c for kadmin.local that exposes
the -norandkey flag in a way that doesn't require the compiler support -c
and -o at the same time.

Ticket: 914

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19475 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/cli/Makefile.in
src/kadmin/cli/keytab_local.c [new file with mode: 0644]
src/lib/kadm5/srv/libkadm5srv.exports

index 7c9320b5caaa43ecc8c9e666ae4e78e4dd77eef8..b63024049bbc06328acb9fc136f42b34d14fdf0f 100644 (file)
@@ -8,7 +8,9 @@ KDB_DEP_LIB=$(DL_LIB) $(THREAD_LINKOPTS)
 DEFS=
 
 PROG = kadmin
-OBJS = kadmin.o kadmin_ct.o ss_wrapper.o getdate.o keytab.o
+COMMON_OBJS = kadmin.o kadmin_ct.o ss_wrapper.o getdate.o
+KADMIN_OBJS = $(COMMON_OBJS) keytab.o
+LOCAL_OBJS = $(COMMON_OBJS) keytab_local.o
 
 SRCS = kadmin.c kadmin_ct.c ss_wrapper.c getdate.c keytab.c
 
@@ -16,11 +18,11 @@ LOCALINCLUDES=-I$(srcdir)
 
 all:: $(PROG).local $(PROG)
 
-$(PROG).local: $(OBJS) $(SS_DEPLIB) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS)
-       $(CC_LINK) -o $(PROG).local $(OBJS) $(SS_LIB) $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS)
+$(PROG).local: $(LOCAL_OBJS) $(SS_DEPLIB) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS)
+       $(CC_LINK) -o $(PROG).local $(LOCAL_OBJS) $(SS_LIB) $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS)
 
-$(PROG): $(OBJS) $(SS_DEPLIB) $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS)
-       $(CC_LINK) -o $(PROG) $(OBJS) $(SS_LIB) $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS)
+$(PROG): $(KADMIN_OBJS) $(SS_DEPLIB) $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS)
+       $(CC_LINK) -o $(PROG) $(KADMIN_OBJS) $(SS_LIB) $(KADMCLNT_LIBS) $(KRB5_BASE_LIBS)
 
 kadmin_ct.o: kadmin_ct.c
 
diff --git a/src/kadmin/cli/keytab_local.c b/src/kadmin/cli/keytab_local.c
new file mode 100644 (file)
index 0000000..1f029a7
--- /dev/null
@@ -0,0 +1,9 @@
+/*
+ * A wrapper around keytab.c used by kadmin.local to expose the -norandkey
+ * flag.  This avoids building two object files from the same source file,
+ * which is otherwise tricky with compilers that don't support -c and -o
+ * at the same time.
+ */
+
+#define KADMIN_LOCAL
+#include "keytab.c"
index 96a3e40839dc3a94e021d6337cc832471733c7c3..23a4ee1e560873d392bd6c52e1b41e1fb12ac89d 100644 (file)
@@ -35,6 +35,7 @@ kadm5_get_config_params
 kadm5_get_policies
 kadm5_get_policy
 kadm5_get_principal
+kadm5_get_principal_keys
 kadm5_get_principals
 kadm5_get_privs
 kadm5_init