summaryrefslogtreecommitdiffstats
path: root/src/auth/mycrypt.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
commitf7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch)
treea3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/auth/mycrypt.c
parentInitial commit. (diff)
downloaddovecot-upstream.tar.xz
dovecot-upstream.zip
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/auth/mycrypt.c')
-rw-r--r--src/auth/mycrypt.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/auth/mycrypt.c b/src/auth/mycrypt.c
new file mode 100644
index 0000000..0bd00bc
--- /dev/null
+++ b/src/auth/mycrypt.c
@@ -0,0 +1,26 @@
+/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#define _XOPEN_SOURCE 4
+#define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */
+#ifndef _AIX
+# define _XOPEN_VERSION 4 /* breaks AIX */
+#endif
+#define _XPG4_2
+#ifdef CRYPT_USE_XPG6
+# define _XPG6 /* Some Solaris versions require this, some break with this */
+#endif
+#include <unistd.h>
+#ifdef HAVE_CRYPT_H
+# include <crypt.h>
+#endif
+
+#include "mycrypt.h"
+
+char *mycrypt(const char *key, const char *salt)
+{
+ return crypt(key, salt);
+}