Create rlm_mschap.h (split out from rlm_mschap.c)
authorMatthew Newton <mcn4@leicester.ac.uk>
Mon, 15 Dec 2014 13:59:54 +0000 (13:59 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 21 Mar 2015 22:16:57 +0000 (18:16 -0400)
src/modules/rlm_mschap/configure [changed mode: 0755->0644]
src/modules/rlm_mschap/rlm_mschap.c
src/modules/rlm_mschap/rlm_mschap.h [new file with mode: 0644]

old mode 100755 (executable)
new mode 100644 (file)
index 05e1f2c..cb57604 100644 (file)
@@ -33,6 +33,7 @@ RCSID("$Id$")
 
 #include       <ctype.h>
 
+#include       "rlm_mschap.h"
 #include       "mschap.h"
 #include       "smbdes.h"
 
@@ -45,12 +46,6 @@ USES_APPLE_DEPRECATED_API    /* OpenSSL API has been deprecated by Apple */
 int od_mschap_auth(REQUEST *request, VALUE_PAIR *challenge, VALUE_PAIR * usernamepair);
 #endif
 
-/* Method of authentication we are going to use */
-typedef enum {
-        AUTH_INTERNAL = 0,
-        AUTH_NTLMAUTH_EXEC = 1
-} MSCHAP_AUTH_METHOD;
-
 /* Allowable account control bits */
 #define ACB_DISABLED   0x00010000      //!< User account disabled.
 #define ACB_HOMDIRREQ  0x00020000      //!< Home directory required.
@@ -144,28 +139,6 @@ static int pdb_decode_acct_ctrl(char const *p)
 }
 
 
-typedef struct rlm_mschap_t {
-       bool                    use_mppe;
-       bool                    require_encryption;
-       bool                    require_strong;
-       bool                    with_ntdomain_hack;     /* this should be in another module */
-       char const              *xlat_name;
-       char const              *ntlm_auth;
-       uint32_t                ntlm_auth_timeout;
-       char const              *ntlm_cpw;
-       char const              *ntlm_cpw_username;
-       char const              *ntlm_cpw_domain;
-       char const              *local_cpw;
-       char const              *auth_type;
-       bool                    allow_retry;
-       char const              *retry_msg;
-       MSCHAP_AUTH_METHOD      method;
-#ifdef WITH_OPEN_DIRECTORY
-       bool            open_directory;
-#endif
-} rlm_mschap_t;
-
-
 /*
  *     Does dynamic translation of strings.
  *
diff --git a/src/modules/rlm_mschap/rlm_mschap.h b/src/modules/rlm_mschap/rlm_mschap.h
new file mode 100644 (file)
index 0000000..87eb6dd
--- /dev/null
@@ -0,0 +1,36 @@
+/* Copyright 2006-2015 The FreeRADIUS server project */
+
+#ifndef _RLM_MSCHAP_H
+#define _RLM_MSCHAP_H
+
+RCSIDH(rlm_mschap_h, "$Id$")
+
+/* Method of authentication we are going to use */
+typedef enum {
+       AUTH_INTERNAL           = 0,
+       AUTH_NTLMAUTH_EXEC      = 1
+} MSCHAP_AUTH_METHOD;
+
+typedef struct rlm_mschap_t {
+       bool                    use_mppe;
+       bool                    require_encryption;
+       bool                    require_strong;
+       bool                    with_ntdomain_hack;     /* this should be in another module */
+       char const              *xlat_name;
+       char const              *ntlm_auth;
+       uint32_t                ntlm_auth_timeout;
+       char const              *ntlm_cpw;
+       char const              *ntlm_cpw_username;
+       char const              *ntlm_cpw_domain;
+       char const              *local_cpw;
+       char const              *auth_type;
+       bool                    allow_retry;
+       char const              *retry_msg;
+       MSCHAP_AUTH_METHOD      method;
+#ifdef WITH_OPEN_DIRECTORY
+       bool                    open_directory;
+#endif
+} rlm_mschap_t;
+
+#endif
+