diff options
author | Jan Rękorajski | 2009-06-22 14:51:16 (GMT) |
---|---|---|
committer | cvs2git | 2012-06-24 12:13:13 (GMT) |
commit | 722bba9f7afb6d4b86ed623c01aee113ea9bb1ed (patch) | |
tree | 19445a37e3d28097e4d665702633b262026a7a38 /smbldap-tools-krb5.patch | |
parent | dd7a45f7fc39f459cea070aad28071b28c41d045 (diff) | |
download | smbldap-tools-722bba9f7afb6d4b86ed623c01aee113ea9bb1ed.zip smbldap-tools-722bba9f7afb6d4b86ed623c01aee113ea9bb1ed.tar.gz |
- add kerberos objectclasses and required fields if kerberos configured
Changed files:
smbldap-tools-krb5.patch -> 1.1
smbldap-tools.spec -> 1.25
Diffstat (limited to 'smbldap-tools-krb5.patch')
-rw-r--r-- | smbldap-tools-krb5.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/smbldap-tools-krb5.patch b/smbldap-tools-krb5.patch new file mode 100644 index 0000000..14e71a7 --- /dev/null +++ b/smbldap-tools-krb5.patch @@ -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; + |