packages: smbldap-tools/smbldap-tools.spec, smbldap-tools/smbldap-tools-krb...

baggins baggins at pld-linux.org
Mon Jun 22 16:51:21 CEST 2009


Author: baggins                      Date: Mon Jun 22 14:51:21 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 2
- add kerberos objectclasses and required fields if kerberos configured

---- Files affected:
packages/smbldap-tools:
   smbldap-tools.spec (1.24 -> 1.25) , smbldap-tools-krb5.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/smbldap-tools/smbldap-tools.spec
diff -u packages/smbldap-tools/smbldap-tools.spec:1.24 packages/smbldap-tools/smbldap-tools.spec:1.25
--- packages/smbldap-tools/smbldap-tools.spec:1.24	Thu Jun 18 16:05:32 2009
+++ packages/smbldap-tools/smbldap-tools.spec	Mon Jun 22 16:51:16 2009
@@ -10,7 +10,7 @@
 Name:		smbldap-tools
 Version:	0.9.6
 # Despite name-ver file this is REALLY a pre1 release
-Release:	0.pre1.1
+Release:	0.pre1.2
 License:	GPL
 Group:		Applications/Networking
 URL:		https://gna.org/projects/smbldap-tools/
@@ -20,6 +20,7 @@
 Patch0:		%{name}-Makefile.patch
 Patch1:		%{name}-configure.patch
 Patch2:		%{name}-nscd.patch
+Patch3:		%{name}-krb5.patch
 BuildRequires:	rpm-perlprov >= 4.1-13
 %if %{with autodeps}
 BuildRequires:	perl-Crypt-SmbHash
@@ -49,6 +50,7 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -82,6 +84,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.25  2009/06/22 14:51:16  baggins
+- rel 2
+- add kerberos objectclasses and required fields if kerberos configured
+
 Revision 1.24  2009/06/18 14:05:32  baggins
 - 0.9.6-pre1 (YES, it IS pre1, despite confusing file name)
 

================================================================
Index: packages/smbldap-tools/smbldap-tools-krb5.patch
diff -u /dev/null packages/smbldap-tools/smbldap-tools-krb5.patch:1.1
--- /dev/null	Mon Jun 22 16:51:21 2009
+++ packages/smbldap-tools/smbldap-tools-krb5.patch	Mon Jun 22 16:51:16 2009
@@ -0,0 +1,81 @@
+diff -ur smbldap-tools-0.9.6/smbldap.conf smbldap-tools-0.9.6-krb5/smbldap.conf
+--- smbldap-tools-0.9.6/smbldap.conf	2008-08-04 23:38:43.000000000 +0200
++++ smbldap-tools-0.9.6-krb5/smbldap.conf	2009-06-22 16:51:28.927035176 +0200
+@@ -214,6 +214,14 @@
+ 
+ ##############################################################################
+ #
++# Kerberos Configuration
++#
++##############################################################################
++
++# KERBEROS_REALM="EXAMPLE.COM"
++
++##############################################################################
++#
+ # SMBLDAP-TOOLS Configuration (default are ok for a RedHat)
+ #
+ ##############################################################################
+Only in smbldap-tools-0.9.6-krb5: smbldap.conf~
+diff -ur smbldap-tools-0.9.6/smbldap-useradd smbldap-tools-0.9.6-krb5/smbldap-useradd
+--- smbldap-tools-0.9.6/smbldap-useradd	2009-06-22 16:19:38.853899020 +0200
++++ smbldap-tools-0.9.6-krb5/smbldap-useradd	2009-06-22 16:37:34.637118213 +0200
+@@ -547,21 +547,43 @@
+             $valacctflags = "$tmp";
+         }
+ 
+-        my $modify = $ldap_master->modify(
+-            "uid=$userName,$config{usersdn}",
+-            changes => [
+-                add => [ objectClass        => 'sambaSAMAccount' ],
+-                add => [ sambaPwdLastSet    => "$valpwdlastset" ],
+-                add => [ sambaLogonTime     => '0' ],
+-                add => [ sambaLogoffTime    => '2147483647' ],
+-                add => [ sambaKickoffTime   => '2147483647' ],
+-                add => [ sambaPwdCanChange  => "$valpwdcanchange" ],
+-                add => [ sambaPwdMustChange => "$valpwdmustchange" ],
+-                add => [ displayName        => "$displayName" ],
+-                add => [ sambaAcctFlags     => "$valacctflags" ],
+-                add => [ sambaSID           => "$config{SID}-$userRid" ]
+-            ]
+-        );
++	if ( defined( $KERBEROS_REALM ) ) {
++		my $modify = $ldap_master->modify(
++		    "uid=$userName,$config{usersdn}",
++		    changes => [
++			add => [ objectClass        => 'sambaSAMAccount' ],
++			add => [ sambaPwdLastSet    => "$valpwdlastset" ],
++			add => [ sambaLogonTime     => '0' ],
++			add => [ sambaLogoffTime    => '2147483647' ],
++			add => [ sambaKickoffTime   => '2147483647' ],
++			add => [ sambaPwdCanChange  => "$valpwdcanchange" ],
++			add => [ sambaPwdMustChange => "$valpwdmustchange" ],
++			add => [ displayName        => "$displayName" ],
++			add => [ sambaAcctFlags     => "$valacctflags" ],
++			add => [ sambaSID           => "$config{SID}-$userRid" ],
++			add => [ objectClass        => 'krb5Principal' ],
++			add => [ objectClass        => 'krb5KDCEntry' ],
++			add => [ krb5PrincipalName  => "$userName\@$KERBEROS_REALM" ],
++			add => [ krb5KeyVersionNumber => '0' ]
++		    ]
++		);
++	} else {
++		my $modify = $ldap_master->modify(
++		    "uid=$userName,$config{usersdn}",
++		    changes => [
++			add => [ objectClass        => 'sambaSAMAccount' ],
++			add => [ sambaPwdLastSet    => "$valpwdlastset" ],
++			add => [ sambaLogonTime     => '0' ],
++			add => [ sambaLogoffTime    => '2147483647' ],
++			add => [ sambaKickoffTime   => '2147483647' ],
++			add => [ sambaPwdCanChange  => "$valpwdcanchange" ],
++			add => [ sambaPwdMustChange => "$valpwdmustchange" ],
++			add => [ displayName        => "$displayName" ],
++			add => [ sambaAcctFlags     => "$valacctflags" ],
++			add => [ sambaSID           => "$config{SID}-$userRid" ]
++		    ]
++		);
++	}
+ 
+         $modify->code && die "failed to add entry: ", $modify->error;
+ 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/smbldap-tools/smbldap-tools.spec?r1=1.24&r2=1.25&f=u



More information about the pld-cvs-commit mailing list