diff options
author | nectar <nectar@FreeBSD.org> | 2002-11-24 20:59:25 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-11-24 20:59:25 +0000 |
commit | 1abd325d288bd51f6ca702d7fbf296a6f47f7e74 (patch) | |
tree | 1e090f07ab7ae3acaf4198828984ee6fe1b1d084 /crypto/heimdal/lib/kadm5 | |
parent | 3d945415d6fa7a88b4754fd38a897dafd21685f7 (diff) | |
download | FreeBSD-src-1abd325d288bd51f6ca702d7fbf296a6f47f7e74.zip FreeBSD-src-1abd325d288bd51f6ca702d7fbf296a6f47f7e74.tar.gz |
Import of Heimdal 0.5.1.
Approved by: re
Diffstat (limited to 'crypto/heimdal/lib/kadm5')
-rw-r--r-- | crypto/heimdal/lib/kadm5/ChangeLog | 4 | ||||
-rw-r--r-- | crypto/heimdal/lib/kadm5/Makefile.in | 45 | ||||
-rw-r--r-- | crypto/heimdal/lib/kadm5/ipropd_slave.c | 37 |
3 files changed, 50 insertions, 36 deletions
diff --git a/crypto/heimdal/lib/kadm5/ChangeLog b/crypto/heimdal/lib/kadm5/ChangeLog index 9c7f81c..d6fbe0d 100644 --- a/crypto/heimdal/lib/kadm5/ChangeLog +++ b/crypto/heimdal/lib/kadm5/ChangeLog @@ -1,3 +1,7 @@ +2002-10-21 Johan Danielsson <joda@pdc.kth.se> + + * ipropd_slave.c: pull up 1.27; use a temporary database + 2002-08-26 Assar Westerlund <assar@kth.se> * ipropd_slave.c (receive_everything): type-correctness calling diff --git a/crypto/heimdal/lib/kadm5/Makefile.in b/crypto/heimdal/lib/kadm5/Makefile.in index 7ce2138..7fc233f 100644 --- a/crypto/heimdal/lib/kadm5/Makefile.in +++ b/crypto/heimdal/lib/kadm5/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.6.3 from Makefile.am. +# Makefile.in generated by automake 1.6.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 @@ -55,7 +55,6 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ @@ -311,21 +310,21 @@ LTLIBRARIES = $(lib_LTLIBRARIES) libkadm5clnt_la_DEPENDENCIES = ../krb5/libkrb5.la ../hdb/libhdb.la \ ../roken/libroken.la -am__objects_1 = chpass_c.lo common_glue.lo create_c.lo delete_c.lo \ +am__objects_9 = chpass_c.lo common_glue.lo create_c.lo delete_c.lo \ destroy_c.lo flush_c.lo free.lo get_c.lo get_princs_c.lo \ init_c.lo kadm5_err.lo marshall.lo modify_c.lo privs_c.lo \ randkey_c.lo rename_c.lo send_recv.lo -am_libkadm5clnt_la_OBJECTS = $(am__objects_1) client_glue.lo +am_libkadm5clnt_la_OBJECTS = $(am__objects_9) client_glue.lo libkadm5clnt_la_OBJECTS = $(am_libkadm5clnt_la_OBJECTS) libkadm5srv_la_DEPENDENCIES = ../krb5/libkrb5.la ../hdb/libhdb.la \ ../roken/libroken.la -am__objects_2 = acl.lo bump_pw_expire.lo chpass_s.lo common_glue.lo \ +am__objects_10 = acl.lo bump_pw_expire.lo chpass_s.lo common_glue.lo \ context_s.lo create_s.lo delete_s.lo destroy_s.lo ent_setup.lo \ error.lo flush_s.lo free.lo get_princs_s.lo get_s.lo init_s.lo \ kadm5_err.lo keys.lo log.lo marshall.lo modify_s.lo privs_s.lo \ randkey_s.lo rename_s.lo set_keys.lo set_modifier.lo \ password_quality.lo -am_libkadm5srv_la_OBJECTS = $(am__objects_2) server_glue.lo +am_libkadm5srv_la_OBJECTS = $(am__objects_10) server_glue.lo libkadm5srv_la_OBJECTS = $(am_libkadm5srv_la_OBJECTS) libexec_PROGRAMS = ipropd-master$(EXEEXT) ipropd-slave$(EXEEXT) sbin_PROGRAMS = dump_log$(EXEEXT) replay_log$(EXEEXT) \ @@ -427,12 +426,6 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test -z "$dir" && dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done libkadm5clnt.la: $(libkadm5clnt_la_OBJECTS) $(libkadm5clnt_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libkadm5clnt_la_LDFLAGS) $(libkadm5clnt_la_OBJECTS) $(libkadm5clnt_la_LIBADD) $(LIBS) libkadm5srv.la: $(libkadm5srv_la_OBJECTS) $(libkadm5srv_la_DEPENDENCIES) @@ -446,7 +439,8 @@ install-libexecPROGRAMS: $(libexec_PROGRAMS) if test -f $$p \ || test -f $$p1 \ ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + p1=`echo "$$p1" | sed -e 's,^.*/,,'`; \ + f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) $$p $(DESTDIR)$(libexecdir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) $$p $(DESTDIR)$(libexecdir)/$$f; \ else :; fi; \ @@ -455,17 +449,14 @@ install-libexecPROGRAMS: $(libexec_PROGRAMS) uninstall-libexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(libexec_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + f=`echo "$$f" | sed -e 's,^.*/,,'`; \ echo " rm -f $(DESTDIR)$(libexecdir)/$$f"; \ rm -f $(DESTDIR)$(libexecdir)/$$f; \ done clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done + -test -z "$(libexec_PROGRAMS)" || rm -f $(libexec_PROGRAMS) sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @@ -475,7 +466,8 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS) if test -f $$p \ || test -f $$p1 \ ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + p1=`echo "$$p1" | sed -e 's,^.*/,,'`; \ + f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) $$p $(DESTDIR)$(sbindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) $$p $(DESTDIR)$(sbindir)/$$f; \ else :; fi; \ @@ -484,17 +476,14 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS) uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + f=`echo "$$f" | sed -e 's,^.*/,,'`; \ echo " rm -f $(DESTDIR)$(sbindir)/$$f"; \ rm -f $(DESTDIR)$(sbindir)/$$f; \ done clean-sbinPROGRAMS: - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done + -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) dump_log$(EXEEXT): $(dump_log_OBJECTS) $(dump_log_DEPENDENCIES) @rm -f dump_log$(EXEEXT) $(LINK) $(dump_log_LDFLAGS) $(dump_log_OBJECTS) $(dump_log_LDADD) $(LIBS) @@ -595,7 +584,7 @@ top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) - @list='$(DISTFILES)'; for file in $$list; do \ + @for file in $(DISTFILES); do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ @@ -646,7 +635,7 @@ clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" diff --git a/crypto/heimdal/lib/kadm5/ipropd_slave.c b/crypto/heimdal/lib/kadm5/ipropd_slave.c index 98efa24..31ab429 100644 --- a/crypto/heimdal/lib/kadm5/ipropd_slave.c +++ b/crypto/heimdal/lib/kadm5/ipropd_slave.c @@ -33,7 +33,7 @@ #include "iprop.h" -RCSID("$Id: ipropd_slave.c,v 1.26 2002/08/26 13:29:37 assar Exp $"); +RCSID("$Id: ipropd_slave.c,v 1.26.2.1 2002/10/21 16:06:25 joda Exp $"); static krb5_log_facility *log_facility; @@ -229,9 +229,24 @@ receive_everything (krb5_context context, int fd, int32_t opcode; unsigned long tmp; - ret = server_context->db->open(context, - server_context->db, - O_RDWR | O_CREAT | O_TRUNC, 0600); + char *dbname; + HDB *mydb; + + asprintf(&dbname, "%s-NEW", server_context->db->name); + ret = hdb_create(context, &mydb, dbname); + if(ret) + krb5_err(context,1, ret, "hdb_create"); + free(dbname); + + ret = hdb_set_master_keyfile (context, + mydb, server_context->config.stash_file); + if(ret) + krb5_err(context,1, ret, "hdb_set_master_keyfile"); + + /* I really want to use O_EXCL here, but given that I can't easily clean + up on error, I won't */ + ret = mydb->open(context, mydb, O_RDWR | O_CREAT | O_TRUNC, 0600); + if (ret) krb5_err (context, 1, ret, "db->open"); @@ -255,9 +270,9 @@ receive_everything (krb5_context context, int fd, ret = hdb_value2entry (context, &fake_data, &entry); if (ret) krb5_err (context, 1, ret, "hdb_value2entry"); - ret = server_context->db->store(server_context->context, - server_context->db, - 0, &entry); + ret = mydb->store(server_context->context, + mydb, + 0, &entry); if (ret) krb5_err (context, 1, ret, "hdb_store"); @@ -286,9 +301,15 @@ receive_everything (krb5_context context, int fd, krb5_data_free (&data); - ret = server_context->db->close (context, server_context->db); + ret = mydb->close (context, mydb); if (ret) krb5_err (context, 1, ret, "db->close"); + ret = mydb->rename (context, mydb, server_context->db->name); + if (ret) + krb5_err (context, 1, ret, "db->rename"); + ret = mydb->destroy (context, mydb); + if (ret) + krb5_err (context, 1, ret, "db->destroy"); } static char *realm; |