aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix/bigcrypt_main.c
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2020-12-27 22:05:13 -0800
committerSteve Langasek <vorlon@debian.org>2020-12-27 22:05:13 -0800
commitea04efa24985743014da9dd22c0581cbaef82ede (patch)
treedcbd0efb229b17f696f7195671f05b354b4f70fc /modules/pam_unix/bigcrypt_main.c
downloadpam-ea04efa24985743014da9dd22c0581cbaef82ede.tar.gz
pam-ea04efa24985743014da9dd22c0581cbaef82ede.tar.bz2
pam-ea04efa24985743014da9dd22c0581cbaef82ede.zip
Import pam_1.4.0.orig.tar.xz
[dgit import orig pam_1.4.0.orig.tar.xz]
Diffstat (limited to 'modules/pam_unix/bigcrypt_main.c')
-rw-r--r--modules/pam_unix/bigcrypt_main.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/pam_unix/bigcrypt_main.c b/modules/pam_unix/bigcrypt_main.c
new file mode 100644
index 00000000..fab212d9
--- /dev/null
+++ b/modules/pam_unix/bigcrypt_main.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <string.h>
+
+#include "bigcrypt.h"
+
+int
+main(int argc, char **argv)
+{
+ if (argc < 3) {
+ fprintf(stderr, "Usage: %s password salt\n",
+ strchr(argv[0], '/') ?
+ (strchr(argv[0], '/') + 1) :
+ argv[0]);
+ return 0;
+ }
+ fprintf(stdout, "%s\n", bigcrypt(argv[1], argv[2]));
+ return 0;
+}