cf659d
From 341da4f38809d0efaa282d5281ee69c62a826f9a Mon Sep 17 00:00:00 2001
cf659d
From: Andreas Schneider <asn@samba.org>
cf659d
Date: Wed, 27 Jun 2018 14:06:39 +0200
cf659d
Subject: [PATCH 1/4] krb5_plugin: Install plugins to krb5 modules dir
cf659d
cf659d
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13489
cf659d
cf659d
Signed-off-by: Andreas Schneider <asn@samba.org>
cf659d
Reviewed-by: Alexander Bokovoy <ab@samba.org>
cf659d
---
cf659d
 nsswitch/wscript_build | 12 +++++++-----
cf659d
 1 file changed, 7 insertions(+), 5 deletions(-)
cf659d
cf659d
diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build
cf659d
index 15e93db2f05..576855bb56c 100644
cf659d
--- a/nsswitch/wscript_build
cf659d
+++ b/nsswitch/wscript_build
cf659d
@@ -105,16 +105,18 @@ if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
cf659d
 		)
cf659d
 
cf659d
 if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
cf659d
-	bld.SAMBA_LIBRARY('winbind_krb5_locator',
cf659d
-		source='winbind_krb5_locator.c',
cf659d
-		deps='wbclient krb5 com_err',
cf659d
-		realname='winbind_krb5_locator.so')
cf659d
+    bld.SAMBA_LIBRARY('winbind_krb5_locator',
cf659d
+                      source='winbind_krb5_locator.c',
cf659d
+                      deps='wbclient krb5 com_err',
cf659d
+                      realname='winbind_krb5_locator.so',
cf659d
+                      install_path='${MODULESDIR}/krb5')
cf659d
 
cf659d
 if bld.CONFIG_SET('HAVE_KRB5_LOCALAUTH_PLUGIN_H'):
cf659d
     bld.SAMBA_LIBRARY('winbind_krb5_localauth',
cf659d
                       source='krb5_plugin/winbind_krb5_localauth.c',
cf659d
                       deps='wbclient krb5 com_err',
cf659d
-                      realname='winbind-krb5-localauth.so')
cf659d
+                      realname='winbind_krb5_localauth.so',
cf659d
+                      install_path='${MODULESDIR}/krb5')
cf659d
 
cf659d
 bld.SAMBA_SUBSYSTEM('WB_REQTRANS',
cf659d
 	source='wb_reqtrans.c',
cf659d
-- 
cf659d
2.17.1
cf659d
cf659d
cf659d
From a1e9527b207b4bb045012cf78649362b42351313 Mon Sep 17 00:00:00 2001
cf659d
From: Andreas Schneider <asn@samba.org>
cf659d
Date: Wed, 27 Jun 2018 14:08:56 +0200
cf659d
Subject: [PATCH 2/4] krb5_plugin: Move krb5 locator plugin to krb5_plugin
cf659d
 subdir
cf659d
cf659d
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13489
cf659d
cf659d
Signed-off-by: Andreas Schneider <asn@samba.org>
cf659d
Reviewed-by: Alexander Bokovoy <ab@samba.org>
cf659d
---
cf659d
 nsswitch/{ => krb5_plugin}/winbind_krb5_locator.c | 0
cf659d
 nsswitch/wscript_build                            | 2 +-
cf659d
 2 files changed, 1 insertion(+), 1 deletion(-)
cf659d
 rename nsswitch/{ => krb5_plugin}/winbind_krb5_locator.c (100%)
cf659d
cf659d
diff --git a/nsswitch/winbind_krb5_locator.c b/nsswitch/krb5_plugin/winbind_krb5_locator.c
cf659d
similarity index 100%
cf659d
rename from nsswitch/winbind_krb5_locator.c
cf659d
rename to nsswitch/krb5_plugin/winbind_krb5_locator.c
cf659d
diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build
cf659d
index 576855bb56c..dd1952b799b 100644
cf659d
--- a/nsswitch/wscript_build
cf659d
+++ b/nsswitch/wscript_build
cf659d
@@ -106,7 +106,7 @@ if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
cf659d
 
cf659d
 if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
cf659d
     bld.SAMBA_LIBRARY('winbind_krb5_locator',
cf659d
-                      source='winbind_krb5_locator.c',
cf659d
+                      source='krb5_plugin/winbind_krb5_locator.c',
cf659d
                       deps='wbclient krb5 com_err',
cf659d
                       realname='winbind_krb5_locator.so',
cf659d
                       install_path='${MODULESDIR}/krb5')
cf659d
-- 
cf659d
2.17.1
cf659d
cf659d
cf659d
From b0fa360161aba9aa092bf4ecf0533a49d621a068 Mon Sep 17 00:00:00 2001
cf659d
From: Andreas Schneider <asn@samba.org>
cf659d
Date: Wed, 27 Jun 2018 15:14:15 +0200
cf659d
Subject: [PATCH 3/4] docs: Move winbind_krb5_locator manpage to volume 8
cf659d
cf659d
The vfs and idmap manpages are in volume 8 too.
cf659d
cf659d
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13489
cf659d
cf659d
Signed-off-by: Andreas Schneider <asn@samba.org>
cf659d
Reviewed-by: Alexander Bokovoy <ab@samba.org>
cf659d
---
cf659d
 ...inbind_krb5_locator.7.xml => winbind_krb5_locator.8.xml} | 6 +++---
cf659d
 docs-xml/wscript_build                                      | 2 +-
cf659d
 2 files changed, 4 insertions(+), 4 deletions(-)
cf659d
 rename docs-xml/manpages/{winbind_krb5_locator.7.xml => winbind_krb5_locator.8.xml} (96%)
cf659d
cf659d
diff --git a/docs-xml/manpages/winbind_krb5_locator.7.xml b/docs-xml/manpages/winbind_krb5_locator.8.xml
cf659d
similarity index 96%
cf659d
rename from docs-xml/manpages/winbind_krb5_locator.7.xml
cf659d
rename to docs-xml/manpages/winbind_krb5_locator.8.xml
cf659d
index 17e401a9da0..0af0c2cc95f 100644
cf659d
--- a/docs-xml/manpages/winbind_krb5_locator.7.xml
cf659d
+++ b/docs-xml/manpages/winbind_krb5_locator.8.xml
cf659d
@@ -1,12 +1,12 @@
cf659d
 
cf659d
 
cf659d
-<refentry id="winbind_krb5_locator.7">
cf659d
+<refentry id="winbind_krb5_locator.8">
cf659d
 
cf659d
 <refmeta>
cf659d
 	<refentrytitle>winbind_krb5_locator</refentrytitle>
cf659d
-	<manvolnum>7</manvolnum>
cf659d
+	<manvolnum>8</manvolnum>
cf659d
 	<refmiscinfo class="source">Samba</refmiscinfo>
cf659d
-	<refmiscinfo class="manual">7</refmiscinfo>
cf659d
+	<refmiscinfo class="manual">8</refmiscinfo>
cf659d
 	<refmiscinfo class="version">&doc.version;</refmiscinfo>
cf659d
 </refmeta>
cf659d
 
cf659d
diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build
cf659d
index 954c62a29bc..2d686eb38b0 100644
cf659d
--- a/docs-xml/wscript_build
cf659d
+++ b/docs-xml/wscript_build
cf659d
@@ -103,7 +103,7 @@ pam_winbind_manpages = '''
cf659d
                        manpages/pam_winbind.conf.5
cf659d
                        '''
cf659d
 
cf659d
-krb5_locator_manpages = 'manpages/winbind_krb5_locator.7'
cf659d
+krb5_locator_manpages = 'manpages/winbind_krb5_locator.8'
cf659d
 
cf659d
 def smbdotconf_generate_parameter_list(task):
cf659d
     parameter_all = task.outputs[0].bldpath(task.env)
cf659d
-- 
cf659d
2.17.1
cf659d
cf659d
cf659d
From d16a8b65af5de19c1ccbb95e3542d01f77696be3 Mon Sep 17 00:00:00 2001
cf659d
From: Andreas Schneider <asn@samba.org>
cf659d
Date: Wed, 27 Jun 2018 15:06:07 +0200
cf659d
Subject: [PATCH 4/4] docs: Add manpage for winbind_krb5_localauth.8
cf659d
cf659d
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13489
cf659d
cf659d
Signed-off-by: Andreas Schneider <asn@samba.org>
cf659d
Reviewed-by: Alexander Bokovoy <ab@samba.org>
cf659d
---
cf659d
 .../manpages/winbind_krb5_localauth.8.xml     | 86 +++++++++++++++++++
cf659d
 docs-xml/wscript_build                        |  4 +
cf659d
 2 files changed, 90 insertions(+)
cf659d
 create mode 100644 docs-xml/manpages/winbind_krb5_localauth.8.xml
cf659d
cf659d
diff --git a/docs-xml/manpages/winbind_krb5_localauth.8.xml b/docs-xml/manpages/winbind_krb5_localauth.8.xml
cf659d
new file mode 100644
cf659d
index 00000000000..a382e71ead3
cf659d
--- /dev/null
cf659d
+++ b/docs-xml/manpages/winbind_krb5_localauth.8.xml
cf659d
@@ -0,0 +1,86 @@
cf659d
+
cf659d
+
cf659d
+<refentry id="winbind_krb5_localauth.8">
cf659d
+
cf659d
+<refmeta>
cf659d
+	<refentrytitle>winbind_krb5_localauth</refentrytitle>
cf659d
+	<manvolnum>8</manvolnum>
cf659d
+	<refmiscinfo class="source">Samba</refmiscinfo>
cf659d
+	<refmiscinfo class="manual">8</refmiscinfo>
cf659d
+	<refmiscinfo class="version">&doc.version;</refmiscinfo>
cf659d
+</refmeta>
cf659d
+
cf659d
+
cf659d
+<refnamediv>
cf659d
+	<refname>winbind_krb5_localauth</refname>
cf659d
+	<refpurpose>A plugin for MIT Kerberos for mapping user accounts.</refpurpose>
cf659d
+</refnamediv>
cf659d
+
cf659d
+
cf659d
+<refsect1>
cf659d
+	<title>DESCRIPTION</title>
cf659d
+
cf659d
+	<para>
cf659d
+		This plugin is part of the
cf659d
+		<citerefentry><refentrytitle>samba</refentrytitle>
cf659d
+		<manvolnum>7</manvolnum></citerefentry> suite.
cf659d
+	</para>
cf659d
+
cf659d
+	<para>
cf659d
+		<command>winbind_krb5_localauth</command> is a plugin that
cf659d
+		permits the MIT Kerberos libraries that Kerberos principals can
cf659d
+		be validated against local user accounts.
cf659d
+	</para>
cf659d
+</refsect1>
cf659d
+<refsect1>
cf659d
+	<title>PREREQUISITES</title>
cf659d
+	<para>
cf659d
+		MIT Kerberos (at least version 1.12) is required.
cf659d
+	</para>
cf659d
+
cf659d
+	<para>
cf659d
+		The plugin queries the <citerefentry><refentrytitle>winbindd</refentrytitle>
cf659d
+		<manvolnum>8</manvolnum></citerefentry> daemon which needs to be configured
cf659d
+		and started separately.
cf659d
+	</para>
cf659d
+
cf659d
+	<para>
cf659d
+		The following sections needs to be added to the
cf659d
+		<filename>krb5.conf</filename> file.
cf659d
+
cf659d
+		<programlisting>
cf659d
+[plugins]
cf659d
+	localauth = {
cf659d
+		module = winbind:/usr/lib64/samba/krb5/winbind_krb5_localauth.so
cf659d
+		enable_only = winbind
cf659d
+	}
cf659d
+		</programlisting>
cf659d
+	</para>
cf659d
+</refsect1>
cf659d
+
cf659d
+<refsect1>
cf659d
+	<title>VERSION</title>
cf659d
+
cf659d
+	<para>
cf659d
+		This man page is part of version &doc.version; of the Samba
cf659d
+		suite.
cf659d
+	</para>
cf659d
+</refsect1>
cf659d
+
cf659d
+<refsect1>
cf659d
+	<title>AUTHOR</title>
cf659d
+
cf659d
+	<para>
cf659d
+		The original Samba software and related utilities were created
cf659d
+		by Andrew Tridgell. Samba is now developed by the Samba Team as
cf659d
+		an Open Source project similar to the way the Linux kernel is
cf659d
+		developed.
cf659d
+	</para>
cf659d
+
cf659d
+	<para>
cf659d
+		The winbind_krb5_localauth manpage was written by Andreas
cf659d
+		Schneider.
cf659d
+	</para>
cf659d
+</refsect1>
cf659d
+
cf659d
+</refentry>
cf659d
diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build
cf659d
index 2d686eb38b0..ec5d28fc62a 100644
cf659d
--- a/docs-xml/wscript_build
cf659d
+++ b/docs-xml/wscript_build
cf659d
@@ -104,6 +104,7 @@ pam_winbind_manpages = '''
cf659d
                        '''
cf659d
 
cf659d
 krb5_locator_manpages = 'manpages/winbind_krb5_locator.8'
cf659d
+krb5_localauth_manpages = 'manpages/winbind_krb5_localauth.8'
cf659d
 
cf659d
 def smbdotconf_generate_parameter_list(task):
cf659d
     parameter_all = task.outputs[0].bldpath(task.env)
cf659d
@@ -162,5 +163,8 @@ if ('XSLTPROC_MANPAGES' in bld.env and bld.env['XSLTPROC_MANPAGES']):
cf659d
     if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
cf659d
         bld.SAMBAMANPAGES(krb5_locator_manpages)
cf659d
 
cf659d
+    if bld.CONFIG_SET('HAVE_KRB5_LOCALAUTH_PLUGIN_H'):
cf659d
+        bld.SAMBAMANPAGES(krb5_localauth_manpages)
cf659d
+
cf659d
     if bld.SAMBA3_IS_ENABLED_MODULE('vfs_zfsacl'):
cf659d
         bld.SAMBAMANPAGES('manpages/vfs_zfsacl.8')
cf659d
-- 
cf659d
2.17.1
cf659d