|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
diff --git a/liboath/global.c b/liboath/global.c
|
|
|
|
|
index d442cf3..cfe1cee 100644
|
|
|
|
|
index 8c60c20..acaa3eb 100644
|
|
|
|
|
--- a/liboath/global.c
|
|
|
|
|
+++ b/liboath/global.c
|
|
|
|
|
@@ -25,9 +25,12 @@
|
|
|
|
@ -61,7 +61,7 @@ index d442cf3..cfe1cee 100644
|
|
|
|
|
+ return OATH_OK;
|
|
|
|
|
+}
|
|
|
|
|
diff --git a/liboath/liboath.map b/liboath/liboath.map
|
|
|
|
|
index 2f247ff..e8f8cdf 100644
|
|
|
|
|
index 5493358..a1be2fb 100644
|
|
|
|
|
--- a/liboath/liboath.map
|
|
|
|
|
+++ b/liboath/liboath.map
|
|
|
|
|
@@ -75,6 +75,7 @@ LIBOATH_2.2.0
|
|
|
|
@ -73,50 +73,50 @@ index 2f247ff..e8f8cdf 100644
|
|
|
|
|
|
|
|
|
|
LIBOATH_2.6.0
|
|
|
|
|
diff --git a/liboath/oath.h b/liboath/oath.h
|
|
|
|
|
index fe93b9e..6660fb3 100644
|
|
|
|
|
index 3a4077f..bd592c8 100644
|
|
|
|
|
--- a/liboath/oath.h
|
|
|
|
|
+++ b/liboath/oath.h
|
|
|
|
|
@@ -159,11 +159,15 @@ typedef enum
|
|
|
|
|
@@ -159,11 +159,15 @@ extern "C"
|
|
|
|
|
|
|
|
|
|
/* Global */
|
|
|
|
|
|
|
|
|
|
+extern char *oath_lockfile_path;
|
|
|
|
|
+ extern char *oath_lockfile_path;
|
|
|
|
|
+
|
|
|
|
|
extern OATHAPI int oath_init (void);
|
|
|
|
|
extern OATHAPI int oath_done (void);
|
|
|
|
|
extern OATHAPI int oath_init (void);
|
|
|
|
|
extern OATHAPI int oath_done (void);
|
|
|
|
|
|
|
|
|
|
extern OATHAPI const char *oath_check_version (const char *req_version);
|
|
|
|
|
extern OATHAPI const char *oath_check_version (const char *req_version);
|
|
|
|
|
|
|
|
|
|
+extern OATHAPI int oath_set_lockfile_path(const char *lockfile);
|
|
|
|
|
+ extern OATHAPI int oath_set_lockfile_path(const char *lockfile);
|
|
|
|
|
+
|
|
|
|
|
/* Error handling */
|
|
|
|
|
|
|
|
|
|
extern OATHAPI const char *oath_strerror (int err);
|
|
|
|
|
extern OATHAPI const char *oath_strerror (int err);
|
|
|
|
|
diff --git a/liboath/oath.h.in b/liboath/oath.h.in
|
|
|
|
|
index eee284c..536cd30 100644
|
|
|
|
|
index b14df98..2bc89de 100644
|
|
|
|
|
--- a/liboath/oath.h.in
|
|
|
|
|
+++ b/liboath/oath.h.in
|
|
|
|
|
@@ -159,11 +159,15 @@ typedef enum
|
|
|
|
|
@@ -159,11 +159,15 @@ extern "C"
|
|
|
|
|
|
|
|
|
|
/* Global */
|
|
|
|
|
|
|
|
|
|
+extern char *oath_lockfile_path;
|
|
|
|
|
+ extern char *oath_lockfile_path;
|
|
|
|
|
+
|
|
|
|
|
extern OATHAPI int oath_init (void);
|
|
|
|
|
extern OATHAPI int oath_done (void);
|
|
|
|
|
extern OATHAPI int oath_init (void);
|
|
|
|
|
extern OATHAPI int oath_done (void);
|
|
|
|
|
|
|
|
|
|
extern OATHAPI const char *oath_check_version (const char *req_version);
|
|
|
|
|
extern OATHAPI const char *oath_check_version (const char *req_version);
|
|
|
|
|
|
|
|
|
|
+extern OATHAPI int oath_set_lockfile_path(const char *lockfile);
|
|
|
|
|
+ extern OATHAPI int oath_set_lockfile_path(const char *lockfile);
|
|
|
|
|
+
|
|
|
|
|
/* Error handling */
|
|
|
|
|
|
|
|
|
|
extern OATHAPI const char *oath_strerror (int err);
|
|
|
|
|
extern OATHAPI const char *oath_strerror (int err);
|
|
|
|
|
diff --git a/liboath/usersfile.c b/liboath/usersfile.c
|
|
|
|
|
index ef03f39..7cc4347 100644
|
|
|
|
|
index 582c657..f8f6446 100644
|
|
|
|
|
--- a/liboath/usersfile.c
|
|
|
|
|
+++ b/liboath/usersfile.c
|
|
|
|
|
@@ -323,9 +323,18 @@ update_usersfile (const char *usersfile,
|
|
|
|
|
@@ -325,9 +325,18 @@ update_usersfile (const char *usersfile,
|
|
|
|
|
{
|
|
|
|
|
int l;
|
|
|
|
|
|
|
|
|
@ -139,10 +139,10 @@ index ef03f39..7cc4347 100644
|
|
|
|
|
lockfh = fopen (lockfile, "w");
|
|
|
|
|
if (!lockfh)
|
|
|
|
|
diff --git a/pam_oath/pam_oath.c b/pam_oath/pam_oath.c
|
|
|
|
|
index b2afed7..307ffc2 100644
|
|
|
|
|
index 0a88a1c..28afd9b 100644
|
|
|
|
|
--- a/pam_oath/pam_oath.c
|
|
|
|
|
+++ b/pam_oath/pam_oath.c
|
|
|
|
|
@@ -75,6 +75,7 @@ struct cfg
|
|
|
|
|
@@ -73,6 +73,7 @@ struct cfg
|
|
|
|
|
int try_first_pass;
|
|
|
|
|
int use_first_pass;
|
|
|
|
|
char *usersfile;
|
|
|
|
@ -150,7 +150,7 @@ index b2afed7..307ffc2 100644
|
|
|
|
|
unsigned digits;
|
|
|
|
|
unsigned window;
|
|
|
|
|
};
|
|
|
|
|
@@ -89,6 +90,7 @@ parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg)
|
|
|
|
|
@@ -87,6 +88,7 @@ parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg)
|
|
|
|
|
cfg->try_first_pass = 0;
|
|
|
|
|
cfg->use_first_pass = 0;
|
|
|
|
|
cfg->usersfile = NULL;
|
|
|
|
@ -158,7 +158,7 @@ index b2afed7..307ffc2 100644
|
|
|
|
|
cfg->digits = -1;
|
|
|
|
|
cfg->window = 5;
|
|
|
|
|
|
|
|
|
|
@@ -104,6 +106,8 @@ parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg)
|
|
|
|
|
@@ -102,6 +104,8 @@ parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg)
|
|
|
|
|
cfg->use_first_pass = 1;
|
|
|
|
|
if (strncmp (argv[i], "usersfile=", 10) == 0)
|
|
|
|
|
cfg->usersfile = (char *) argv[i] + 10;
|
|
|
|
@ -167,7 +167,7 @@ index b2afed7..307ffc2 100644
|
|
|
|
|
if (strncmp (argv[i], "digits=", 7) == 0)
|
|
|
|
|
cfg->digits = atoi (argv[i] + 7);
|
|
|
|
|
if (strncmp (argv[i], "window=", 7) == 0)
|
|
|
|
|
@@ -129,6 +133,7 @@ parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg)
|
|
|
|
|
@@ -127,6 +131,7 @@ parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg)
|
|
|
|
|
D (("try_first_pass=%d", cfg->try_first_pass));
|
|
|
|
|
D (("use_first_pass=%d", cfg->use_first_pass));
|
|
|
|
|
D (("usersfile=%s", cfg->usersfile ? cfg->usersfile : "(null)"));
|
|
|
|
@ -175,7 +175,7 @@ index b2afed7..307ffc2 100644
|
|
|
|
|
D (("digits=%d", cfg->digits));
|
|
|
|
|
D (("window=%d", cfg->window));
|
|
|
|
|
}
|
|
|
|
|
@@ -327,6 +332,17 @@ pam_sm_authenticate (pam_handle_t * pamh,
|
|
|
|
|
@@ -337,6 +342,17 @@ pam_sm_authenticate (pam_handle_t * pamh,
|
|
|
|
|
goto done;
|
|
|
|
|
}
|
|
|
|
|
|