Move keytab_copy to krb5samba lib
authorSimo Sorce <idra@samba.org>
Thu, 26 Apr 2012 19:05:11 +0000 (15:05 -0400)
committerSimo Sorce <idra@samba.org>
Fri, 4 May 2012 14:51:28 +0000 (16:51 +0200)
This is a helper fucntion that uses purely krb5 code, so it belongs to
krb5samba which is the krb5 wrapper for samba.

lib/krb5_wrap/keytab_util.c [moved from source4/auth/kerberos/keytab_copy.c with 99% similarity]
lib/krb5_wrap/krb5_samba.h
lib/krb5_wrap/wscript_build
source4/auth/kerberos/wscript_build

similarity index 99%
rename from source4/auth/kerberos/keytab_copy.c
rename to lib/krb5_wrap/keytab_util.c
index 3dd687dec2fab9395bf6a8b93c85c948d26ec6fe..12aca7f5a092e8feec193dd22866d7a6f9cecc63 100644 (file)
@@ -34,8 +34,7 @@
  */
 
 #include "includes.h"
-#include "system/kerberos.h"
-#include "auth/kerberos/kerberos.h"
+#include "krb5_samba.h"
 
 static krb5_boolean
 compare_keyblock(const krb5_keyblock *a, const krb5_keyblock *b)
index 864cda67bb90c391d10d65d7165546380118cb8e..e2bd634d7afaf812d31fa42709cd45271749cc30 100644 (file)
@@ -241,6 +241,17 @@ bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx,
                           DATA_BLOB *edata,
                           DATA_BLOB *edata_out);
 
+
+krb5_error_code kt_copy(krb5_context context,
+                       const char *from,
+                       const char *to);
+krb5_error_code kt_copy_one_principal(krb5_context context,
+                                     const char *from,
+                                     const char *to,
+                                     const char *principal,
+                                     krb5_kvno kvno,
+                                     krb5_enctype *enctypes);
+
 #endif /* HAVE_KRB5 */
 
 int cli_krb5_get_ticket(TALLOC_CTX *mem_ctx,
index c5858198344a487576ad706d5032439174dfef32..2a61f5633fbdd0779ef5d61d7ca095d6dc0e683e 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 bld.SAMBA_LIBRARY('krb5samba',
-                  source='krb5_samba.c',
+                  source='krb5_samba.c keytab_util.c',
                   deps='samba-util asn1util talloc krb5 com_err',
                  private_library=True
                  )
index aef7fc660599a43ea04fcf81766bfad4ac48e3a3..0588bfb2e3f0279aecdbc87d2099e9403dceefb9 100755 (executable)
@@ -6,7 +6,7 @@ bld.SAMBA_SUBSYSTEM('KRB_INIT_CTX',
                   )
 
 bld.SAMBA_LIBRARY('authkrb5',
-                  source='kerberos_pac.c keytab_copy.c',
+                  source='kerberos_pac.c',
                   autoproto='proto.h',
                   public_deps='ndr-krb5pac krb5samba samba_socket LIBCLI_RESOLVE asn1',
                   deps='auth_sam_reply tevent LIBPACKET ndr ldb krb5samba KRB_INIT_CTX KRB5_PAC errors',