aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix/bigcrypt_main.c
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 17:05:01 -0800
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 17:27:13 -0800
commit419bd504587ec2bfc9085fe56e7a53433fd1eae6 (patch)
treed516c2ccae28dbd020cb69f50162f5d32acd7648 /modules/pam_unix/bigcrypt_main.c
parentc68dce23face9f26b651917b418c7f80931fa7b7 (diff)
parent9c52e721044e7501c3d4567b36d222dc7326224a (diff)
downloadpam-419bd504587ec2bfc9085fe56e7a53433fd1eae6.tar.gz
pam-419bd504587ec2bfc9085fe56e7a53433fd1eae6.tar.bz2
pam-419bd504587ec2bfc9085fe56e7a53433fd1eae6.zip
merge upstream version 1.0.1
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;
+}