[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT PATCH 1/4] Ported libkrb5support, libkrb5crypto and libcom_err



From: Cristian <cristianvijelie@xxxxxxxxx>

Signed-off-by: Cristian <cristianvijelie@xxxxxxxxx>
---
 .gitignore         |   3 +
 Config.uk          |  34 +++++
 Makefile.uk        | 354 +++++++++++++++++++++++++++++++++++++++++++++
 include/byteswap.h |  26 ++++
 4 files changed, 417 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 Config.uk
 create mode 100644 Makefile.uk
 create mode 100644 include/byteswap.h

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..890d606
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+krb5-1.18.2
+*_make
+make_log
diff --git a/Config.uk b/Config.uk
new file mode 100644
index 0000000..73176de
--- /dev/null
+++ b/Config.uk
@@ -0,0 +1,34 @@
+menuconfig LIBKRB5
+    bool "libkrb5: MIT Kerberos runtime libraries"
+    select LIBKRB5SUPPORT
+    select LIBKRB5CRYPTO
+    select LIBCOM_ERR
+    default n
+
+menuconfig LIBKRB5SUPPORT
+    bool "likrb5support: MIT Kerberos support libraries"
+    select LIBNEWLIB
+    select LIBPTHREAD_EMBEDDED
+    select LIBLWIP
+    select LWIP_UKNETDEV
+       select LWIP_TCP
+       select LWIP_TCP_KEEPALIVE
+       select LWIP_THREADS
+       select LWIP_SOCKET
+       select LWIP_IPV4
+    select LWIP_IPV6
+    default n
+
+menuconfig LIBKRB5CRYPTO
+    bool "lib5crypto: MIT Kerberos crypto libraries"
+    select LIBKRB5SUPPORT
+    default n
+
+menuconfig LIBGSSAPI_KRB5
+    bool "libgssapi_krb5: MIT Kerberos GSS-API mechanism"
+    default n
+
+menuconfig LIBCOM_ERR
+    bool "libcom_err: Common error description library"
+    select LIBKRB5SUPPORT
+    default n
diff --git a/Makefile.uk b/Makefile.uk
new file mode 100644
index 0000000..eea8972
--- /dev/null
+++ b/Makefile.uk
@@ -0,0 +1,354 @@
+##############################################################################################
+# Library registration
+##############################################################################################
+$(eval $(call addlib_s,libkrb5,$(CONFIG_LIBKRB5)))
+$(eval $(call addlib_s,libkrb5support,$(CONFIG_LIBKRB5SUPPORT)))
+$(eval $(call addlib_s,libkrb5crypto,$(CONFIG_LIBKRB5CRYPTO)))
+$(eval $(call addlib_s,libcom_err,$(CONFIG_LIBCOM_ERR)))
+
+##############################################################################################
+# SOURCES
+##############################################################################################
+LIBKRB5_MAJORVER=1.18
+LIBKRB5_MINORVER=2
+LIBKRB5_TARNAME=krb5-$(LIBKRB5_MAJORVER).$(LIBKRB5_MINORVER)
+LIBKRB5_URL=http://web.mit.edu/kerberos/dist/krb5/$(LIBKRB5_MAJORVER)/$(LIBKRB5_TARNAME).tar.gz
+LIBKRB5_PATCHDIR=$(LIBKRB5_BASE)/patches
+$(eval $(call fetch,libkrb5,$(LIBKRB5_URL)))
+$(eval $(call patch,libkrb5,$(LIBKRB5_PATCHDIR),$(LIBKRB5_TARNAME)))
+
+##############################################################################################
+# Helpers
+##############################################################################################
+LIBKRB5_MAINDIR=$(LIBKRB5_ORIGIN)/$(LIBKRB5_TARNAME)/src
+LIBKRB5_COMPILE_PATH=$(LIBKRB5_MAINDIR)/util/et
+LIBKRB5_DIR=$(LIBKRB5_MAINDIR)/lib/krb5
+
+LIBKRB5SUPPORT_DIR=$(LIBKRB5_MAINDIR)/util/support
+LIBKRB5CRYPTO_DIR=$(LIBKRB5_MAINDIR)/lib/crypto
+
+##############################################################################################
+# libkrb5 flags
+##############################################################################################
+LIBKRB5_CFLAGS += -fPIC -DSHARED -DHAVE_CONFIG_H  -I$(LIBKRB5_BASE)/include \
+-I$(LIBKRB5_MAINDIR)/include  -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -Wall 
-Wcast-align -Wshadow \
+-Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-overflow \
+-Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces 
-Wparentheses \
+-Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value 
-Wunknown-pragmas \
+-Wsign-compare -Werror=uninitialized -Wno-maybe-uninitialized 
-Werror=pointer-arith \
+-Werror=int-conversion -Werror=incompatible-pointer-types 
-Werror=discarded-qualifiers \
+-Werror=implicit-int -Werror=declaration-after-statement 
-Werror-implicit-function-declaration
+
+LIBKRB5_OBJFLAGS += -shared -fPIC -Wl,--no-undefined -Wl,--enable-new-dtags \
+-Wl,-rpath
+
+##############################################################################################
+# libkrb5 code
+##############################################################################################
+LIBKRB5_SRCS-y += 
+
+##############################################################################################
+# libkrb5support flags
+##############################################################################################
+
+LIBKRB5SUPPORT_CFLAGS = $(LIBKRB5_CFLAGS)
+LIBKRB5SUPPORT_CFLAGS += -I$(LIBNEWLIB_LIBC)/sys/linux/include
+LIBKRB5SUPPORT_CFLAGS += -I$(LIBNEWLIB_LIBC)/sys/linux
+LIBKRB5SUPPORT_CFLAGS += -I$(LIBNEWLIB_LIBC)/sys/linux/sys
+LIBKRB5SUPPORT_OBJFLAGS = $(LIBKRB5_OBJFLAGS)
+
+##############################################################################################
+# libkrb5support code
+##############################################################################################
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/threads.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/init-addrinfo.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/plugins.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/errors.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/k5buf.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/gmt_mktime.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/fake-addrinfo.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/utf8.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/utf8_conv.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/zap.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/path.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/base64.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/json.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/hex.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/hashtab.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/bcmp.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/strerror_r.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/dir_filenames.c
+LIBKRB5SUPPORT_SRCS-y += $(LIBKRB5SUPPORT_DIR)/strlcpy.c
+
+##############################################################################################
+# libkrb5crypto flags
+##############################################################################################
+LIBKRB5CRYPTO_CFLAGS = $(LIBKRB5_CFLAGS)
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBKRB5CRYPTO_DIR)/krb
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBKRB5CRYPTO_DIR)/builtin
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBKRB5CRYPTO_DIR)/builtin/aes
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBKRB5CRYPTO_DIR)/builtin/camellia
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBKRB5CRYPTO_DIR)/builtin/des
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBKRB5CRYPTO_DIR)/builtin/md4
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBKRB5CRYPTO_DIR)/builtin/md5
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBKRB5CRYPTO_DIR)/builtin/sha1
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBKRB5CRYPTO_DIR)/builtin/sha2
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBNEWLIB_LIBC)/sys/linux/include
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBNEWLIB_LIBC)/sys/linux
+LIBKRB5CRYPTO_CFLAGS += -I$(LIBNEWLIB_LIBC)/sys/linux/sys
+LIBKRB5CRYPTO_OBJFLAGS = $(LIBKRB5_OBJFLAGS)
+
+##############################################################################################
+# libkrb5crypto code
+##############################################################################################
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/aead.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/block_size.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/cf2.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/checksum_dk_cmac.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/checksum_dk_hmac.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/checksum_etm.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/checksum_hmac_md5.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/checksum_unkeyed.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/checksum_length.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/cksumtype_to_string.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/cksumtypes.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/cmac.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/coll_proof_cksum.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/crypto_length.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/crypto_libinit.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/default_state.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/decrypt.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/decrypt_iov.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/derive.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/encrypt.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/encrypt_iov.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/encrypt_length.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/enctype_util.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/enc_dk_cmac.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/enc_dk_hmac.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/enc_etm.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/enc_raw.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/enc_rc4.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/etypes.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/key.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/keyblocks.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/keyed_cksum.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/keyed_checksum_types.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/keylengths.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/make_checksum.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/make_checksum_iov.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/make_random_key.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/mandatory_sumtype.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/nfold.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/old_api_glue.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/prf.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/prf_aes2.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/prf_cmac.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/prf_des.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/prf_dk.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/prf_rc4.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/prng.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/prng_fortuna.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/random_to_key.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/s2k_pbkdf2.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/s2k_rc4.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/state.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/string_to_cksumtype.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/string_to_key.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/valid_cksumtype.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/verify_checksum.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/krb/verify_checksum_iov.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/camellia/camellia.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/des/d3_aead.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/des/d3_kysched.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/des/des_keys.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/des/f_aead.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/des/f_cksum.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/des/f_parity.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/des/f_sched.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/des/f_tables.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/des/key_sched.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/des/weak_key.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/aes/aescrypt.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/aes/aestab.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/aes/aeskey.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/md4/md4.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/md5/md5.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/sha1/shs.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/sha2/sha256.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/sha2/sha512.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/enc_provider/des3.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/enc_provider/rc4.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/enc_provider/aes.c
+LIBKRB5CRYPTO_SRCS-y += 
$(LIBKRB5CRYPTO_DIR)/builtin/enc_provider/enc_camellia.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/hash_provider/hash_md4.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/hash_provider/hash_md5.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/hash_provider/hash_sha1.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/hash_provider/hash_sha2.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/hmac.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/init.c
+LIBKRB5CRYPTO_SRCS-y += $(LIBKRB5CRYPTO_DIR)/builtin/pbkdf2.c
+
+##############################################################################################
+# libcom_err flags
+##############################################################################################
+LIBCOM_ERR_CFLAGS = $(LIBKRB5_CFLAGS)
+
+##############################################################################################
+# libcom_err code
+##############################################################################################
+LIBCOM_ERR_SRCS-y += $(LIBKRB5_COMPILE_PATH)/error_message.c
+LIBCOM_ERR_SRCS-y += $(LIBKRB5_COMPILE_PATH)/et_name.c
+LIBCOM_ERR_SRCS-y += $(LIBKRB5_COMPILE_PATH)/com_err.c
+
+##############################################################################################
+# dependencies
+##############################################################################################
+# Run ./configure
+$(LIBKRB5_MAINDIR)/.configured: $(LIBKRB5_BUILD)/.origin
+       $(call verbose_cmd,CONFIG,libkrb: $(notdir $@), cd $(LIBKRB5_MAINDIR) 
&& ./configure \
+       --disable-nls && touch $@)
+
+# Generate compile_et
+$(LIBKRB5_COMPILE_PATH)/compile_et:
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd $(LIBKRB5_COMPILE_PATH) 
&& /bin/sh \
+       ./config_script ./compile_et.sh "/usr/local/share/et" mawk sed > $@ && 
chmod 755 $@)
+
+# Generate .h and .c files
+$(LIBKRB5_MAINDIR)/include/osconf.h: $(LIBKRB5_MAINDIR)/include/osconf.hin
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cat $^ | sed -e 
"s\"@KRB5RCTMPDIR\"/var/tmp\""\
+        -e "s\"@PREFIX\"/usr/local\"" -e "s\"@EXEC_PREFIX\"/usr/local\"" \
+        -e "s\"@BINDIR\"/usr/local/bin\"" -e "s\"@LIBDIR\"/usr/local/lib\"" \
+        -e "s\"@SBINDIR\"/usr/local/sbin\"" -e 
"s\"@MODULEDIR\"/usr/local/lib/krb5/plugins\"" \
+        -e "s\"@GSSMODULEDIR\"/usr/local/lib/gss\"" -e 
"s\"@LOCALSTATEDIR\"/usr/local/var\"" \
+        -e "s\"@RUNSTATEDIR\"/run\"" -e "s\"@SYSCONFDIR\"/usr/local/etc\"" \
+        -e "s\"@DYNOBJEXT\".so\"" -e 
"s\"@SYSCONFCONF\":/usr/local/etc/krb5.conf\"" > osconf.new \
+        && $(LIBKRB5_MAINDIR)/config/move-if-changed osconf.new $@)
+
+$(LIBKRB5_MAINDIR)/include/com_err.h: $(LIBKRB5_COMPILE_PATH)/com_err.h
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cp $^ $@)
+
+$(LIBKRB5_MAINDIR)/include/profile.h: 
$(LIBKRB5_MAINDIR)/util/profile/profile.hin 
$(LIBKRB5_MAINDIR)/util/profile/prof_err.h
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cat $^ > $@)
+
+$(LIBKRB5_MAINDIR)/include/krb5/krb5.h: 
$(LIBKRB5_MAINDIR)/include/krb5/krb5.hin
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_MAINDIR)/include && echo "#ifndef KRB5_KRB5_H_INCLUDED" >> 
krb5/krb5.new && echo "#define KRB5_KRB5_H_INCLUDED" >> krb5/krb5.new && cat 
krb5/krb5.hin $(LIBKRB5_MAINDIR)/lib/krb5/error_tables/krb5_err.h 
$(LIBKRB5_MAINDIR)/lib/krb5/error_tables/k5e1_err.h 
$(LIBKRB5_MAINDIR)/lib/krb5/error_tables/kdb5_err.h 
$(LIBKRB5_MAINDIR)/lib/krb5/error_tables/kv5m_err.h 
$(LIBKRB5_MAINDIR)/lib/krb5/error_tables/krb524_err.h 
$(LIBKRB5_MAINDIR)/lib/krb5/error_tables/asn1_err.h >> krb5/krb5.new && echo 
"#endif /* KRB5_KRB5_H_INCLUDED */" >> krb5/krb5.new && 
$(LIBKRB5_MAINDIR)/config/move-if-changed krb5/krb5.new krb5/krb5.h)
+
+$(LIBKRB5_DIR)/error_tables/et-c-asn1_err.et: 
$(LIBKRB5_DIR)/error_tables/asn1_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-c-asn1_err.et et-c-asn1_err.c 
et-c-asn1_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-c-asn1_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-asn1_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/asn1_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-asn1_err.c
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-c-asn1_err.et 
et-c-asn1_err.h)
+
+$(LIBKRB5_DIR)/error_tables/et-c-kdb5_err.et: 
$(LIBKRB5_DIR)/error_tables/kdb5_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-c-kdb5_err.et et-c-kdb5_err.c 
et-c-kdb5_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-c-kdb5_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-kdb5_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/kdb5_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-kdb5_err.c
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-c-kdb5_err.et 
et-c-kdb5_err.h)
+
+$(LIBKRB5_DIR)/error_tables/et-c-krb5_err.et: 
$(LIBKRB5_DIR)/error_tables/krb5_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-c-krb5_err.et et-c-krb5_err.c 
et-c-krb5_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-c-krb5_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-krb5_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/krb5_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-krb5_err.c
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-c-krb5_err.et 
et-c-krb5_err.h)
+
+$(LIBKRB5_DIR)/error_tables/et-c-k5e1_err.et: 
$(LIBKRB5_DIR)/error_tables/k5e1_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-c-k5e1_err.et et-c-k5e1_err.c 
et-c-k5e1_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-c-k5e1_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-k5e1_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/k5e1_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-k5e1_err.c
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-c-k5e1_err.et 
et-c-k5e1_err.h)
+
+$(LIBKRB5_DIR)/error_tables/et-c-kv5m_err.et: 
$(LIBKRB5_DIR)/error_tables/kv5m_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-c-kv5m_err.et et-c-kv5m_err.c 
et-c-kv5m_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-c-kv5m_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-kv5m_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/kv5m_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-kv5m_err.c
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-c-kv5m_err.et 
et-c-kv5m_err.h)
+
+$(LIBKRB5_DIR)/error_tables/et-c-krb524_err.et: 
$(LIBKRB5_DIR)/error_tables/krb524_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-c-krb524_err.et et-c-krb524_err.c 
et-c-krb524_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-c-krb524_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-krb524_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/krb524_err.c: 
$(LIBKRB5_DIR)/error_tables/et-c-krb524_err.c
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-c-krb524_err.et 
et-c-krb524_err.h)
+
+$(LIBKRB5_DIR)/error_tables/et-h-asn1_err.et: 
$(LIBKRB5_DIR)/error_tables/asn1_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-h-asn1_err.et et-h-asn1_err.c 
et-h-asn1_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-h-asn1_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-asn1_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/asn1_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-asn1_err.h
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-h-asn1_err.et 
et-h-asn1_err.c)
+
+$(LIBKRB5_DIR)/error_tables/et-h-kdb5_err.et: 
$(LIBKRB5_DIR)/error_tables/kdb5_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-h-kdb5_err.et et-h-kdb5_err.c 
et-h-kdb5_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-h-kdb5_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-kdb5_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/kdb5_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-kdb5_err.h
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-h-kdb5_err.et 
et-h-kdb5_err.c)
+
+$(LIBKRB5_DIR)/error_tables/et-h-krb5_err.et: 
$(LIBKRB5_DIR)/error_tables/krb5_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-h-krb5_err.et et-h-krb5_err.c 
et-h-krb5_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-h-krb5_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-krb5_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/krb5_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-krb5_err.h
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-h-krb5_err.et 
et-h-krb5_err.c)
+
+$(LIBKRB5_DIR)/error_tables/et-h-k5e1_err.et: 
$(LIBKRB5_DIR)/error_tables/k5e1_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-h-k5e1_err.et et-h-k5e1_err.c 
et-h-k5e1_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-h-k5e1_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-k5e1_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/k5e1_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-k5e1_err.h
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-h-k5e1_err.et 
et-h-k5e1_err.c)
+
+$(LIBKRB5_DIR)/error_tables/et-h-kv5m_err.et: 
$(LIBKRB5_DIR)/error_tables/kv5m_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-h-kv5m_err.et et-h-kv5m_err.c 
et-h-kv5m_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-h-kv5m_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-kv5m_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/kv5m_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-kv5m_err.h
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-h-kv5m_err.et 
et-h-kv5m_err.c)
+
+$(LIBKRB5_DIR)/error_tables/et-h-krb524_err.et: 
$(LIBKRB5_DIR)/error_tables/krb524_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && rm -f et-h-krb524_err.et et-h-krb524_err.c 
et-h-krb524_err.h && cp $^ $@)
+$(LIBKRB5_DIR)/error_tables/et-h-krb524_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-krb524_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_DIR)/error_tables/krb524_err.h: 
$(LIBKRB5_DIR)/error_tables/et-h-krb524_err.h
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_DIR)/error_tables && mv -f $^ $@ && rm -f et-h-krb524_err.et 
et-h-krb524_err.c)
+
+$(LIBKRB5_MAINDIR)/util/profile/et-h-prof_err.et: 
$(LIBKRB5_MAINDIR)/util/profile/prof_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_MAINDIR)/util/profile && rm -f et-h-prof_err.et et-h-prof_err.c 
et-h-prof_err.h && cp $^ $@)
+$(LIBKRB5_MAINDIR)/util/profile/et-h-prof_err.h: 
$(LIBKRB5_MAINDIR)/util/profile/et-h-prof_err.et
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_MAINDIR)/util/profile && $(LIBKRB5_COMPILE_PATH)/compile_et -d 
$(LIBKRB5_COMPILE_PATH) --textdomain mit-krb5 $^)
+$(LIBKRB5_MAINDIR)/util/profile/prof_err.h: 
$(LIBKRB5_MAINDIR)/util/profile/et-h-prof_err.h
+       $(call verbose_cmd,GEN,libkrb: $(notdir $@), cd 
$(LIBKRB5_MAINDIR)/util/profile && mv -f $^ $@ && rm -f et-h-prof_err.et 
et-h-prof_err.c)
+
+# There are 2 camellia.c in the library, so we must differentiate them
+$(LIBKRB5CRYPTO_DIR)/builtin/enc_provider/enc_camellia.c: 
$(LIBKRB5CRYPTO_DIR)/builtin/enc_provider/camellia.c
+       $(call verbose_cmd,GEN,libkrb5crypto: $(notdir $@), cp $^ $@)
+
+LIBKRB5_DEPS = \
+       $(LIBKRB5_MAINDIR)/.configured \
+       $(LIBKRB5_MAINDIR)/include/osconf.h \
+       $(LIBKRB5_MAINDIR)/include/com_err.h \
+       $(LIBKRB5_COMPILE_PATH)/compile_et \
+       $(LIBKRB5_MAINDIR)/util/profile/prof_err.h \
+       $(LIBKRB5_MAINDIR)/include/profile.h \
+       $(LIBKRB5_DIR)/error_tables/krb524_err.c \
+       $(LIBKRB5_DIR)/error_tables/kv5m_err.c \
+       $(LIBKRB5_DIR)/error_tables/k5e1_err.c \
+       $(LIBKRB5_DIR)/error_tables/krb5_err.c \
+       $(LIBKRB5_DIR)/error_tables/kdb5_err.c \
+       $(LIBKRB5_DIR)/error_tables/asn1_err.c \
+       $(LIBKRB5_DIR)/error_tables/krb524_err.h \
+       $(LIBKRB5_DIR)/error_tables/kv5m_err.h \
+       $(LIBKRB5_DIR)/error_tables/k5e1_err.h \
+       $(LIBKRB5_DIR)/error_tables/krb5_err.h \
+       $(LIBKRB5_DIR)/error_tables/kdb5_err.h \
+       $(LIBKRB5_DIR)/error_tables/asn1_err.h \
+       $(LIBKRB5_MAINDIR)/include/krb5/krb5.h \
+       $(LIBKRB5CRYPTO_DIR)/builtin/enc_provider/enc_camellia.c \
+
+UK_PREPARE += $(LIBKRB5_DEPS)
diff --git a/include/byteswap.h b/include/byteswap.h
new file mode 100644
index 0000000..00b9df3
--- /dev/null
+++ b/include/byteswap.h
@@ -0,0 +1,26 @@
+#ifndef _BYTESWAP_H
+#define _BYTESWAP_H
+
+#include <features.h>
+#include <stdint.h>
+
+static __inline uint16_t __bswap_16(uint16_t __x)
+{
+       return __x<<8 | __x>>8;
+}
+
+static __inline uint32_t __bswap_32(uint32_t __x)
+{
+       return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
+}
+
+static __inline uint64_t __bswap_64(uint64_t __x)
+{
+       return __bswap_32(__x)+0ULL<<32 | __bswap_32(__x>>32);
+}
+
+#define bswap_16(x) __bswap_16(x)
+#define bswap_32(x) __bswap_32(x)
+#define bswap_64(x) __bswap_64(x)
+
+#endif
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.