summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--contrib/gssntlmssp.spec.in13
-rw-r--r--src/gss_ntlmssp.c9
-rw-r--r--src/gssapi_ntlmssp.h41
4 files changed, 60 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am
index 04919d8..24970c6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -85,6 +85,10 @@ dist_noinst_HEADERS = \
src/ntlm.h \
src/gss_ntlmssp.h
+gssapidir = $(includedir)/gssapi
+dist_gssapi_HEADERS = \
+ src/gssapi_ntlmssp.h
+
####################
# Program Binaries #
####################
diff --git a/contrib/gssntlmssp.spec.in b/contrib/gssntlmssp.spec.in
index 1d46360..e36afb5 100644
--- a/contrib/gssntlmssp.spec.in
+++ b/contrib/gssntlmssp.spec.in
@@ -24,10 +24,18 @@ BuildRequires: krb5-devel >= 1.11.2
BuildRequires: libunistring-devel
BuildRequires: openssl-devel
-
%description
A GSSAPI Mechanism that implements NTLMSSP
+%package devel
+Summary: Development header for GSSAPI NTLMSSP
+Group: Development/Libraries
+License: LGPLv3+
+
+%description devel
+Adds a header file with definition for custom GSSAPI extensions for NTLMSSP
+
+
%prep
%setup -q
@@ -54,6 +62,9 @@ make test_gssntlmssp
%{_mandir}/man8/gssntlmssp.8*
%doc COPYING
+%files devel
+%{_includedir}/gssapi/gssapi_ntlmssp.h
+
%changelog
* Sat Jun 22 2013 Simo Sorce <simo@samba.org> - @PACKAGE_VERSION@-0@PRERELEASE_VERSION@
- Start
diff --git a/src/gss_ntlmssp.c b/src/gss_ntlmssp.c
index 6dba56b..7246359 100644
--- a/src/gss_ntlmssp.c
+++ b/src/gss_ntlmssp.c
@@ -20,15 +20,12 @@
#include <string.h>
#include <time.h>
-#include <gssapi/gssapi.h>
-#include <gssapi/gssapi_ext.h>
-
+#include "gssapi_ntlmssp.h"
#include "gss_ntlmssp.h"
-/* 1.3.6.1.4.1.311.2.2.10 */
const gss_OID_desc gssntlm_oid = {
- .length = 10,
- .elements = "\x2b\x06\x01\x04\x01\x82\x37\x02\x02\x0a"
+ .length = GSS_NTLMSSP_OID_LENGTH,
+ .elements = GSS_NTLMSSP_OID_STRING
};
uint8_t gssntlm_required_security(int security_level,
diff --git a/src/gssapi_ntlmssp.h b/src/gssapi_ntlmssp.h
new file mode 100644
index 0000000..17cbed8
--- /dev/null
+++ b/src/gssapi_ntlmssp.h
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 2013 Simo Sorce <simo@samba.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _GSSAPI_NTLMSSP_H_
+#define _GSSAPI_NTLMSSP_H_
+
+#include <gssapi/gssapi.h>
+#include <gssapi/gssapi_ext.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* NTLMSSP OID: 1.3.6.1.4.1.311.2.2.10 */
+#define GSS_NTLMSSP_OID_STRING "\x2b\x06\x01\x04\x01\x82\x37\x02\x02\x0a"
+#define GSS_NTLMSSP_OID_LENGTH 10
+
+/* add a new GSSPAPI req flag, it is technically a sort of SSPI
+ * extension as Microsoft's SSPI may change behavior on datagram
+ * oriented connections and has a ISC_REQ_DATAGRAM flag for that */
+#define GSS_C_DATAGRAM_FLAG 0x10000
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* _GSSAPI_NTLMSSP_H_ */