summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-04-03 15:46:00 +0200
committerJeremy Allison <jra@samba.org>2013-04-03 23:57:32 +0200
commita7f067c244401d37057a7ed7c00ba4ffc76f2b5a (patch)
tree4f4044efbaa27ca55aab81cfab1ff683f4f347b3 /source3
parent5dad084ab176820af8d661f681e0659596d067cb (diff)
downloadsamba-a7f067c244401d37057a7ed7c00ba4ffc76f2b5a.tar.gz
samba-a7f067c244401d37057a7ed7c00ba4ffc76f2b5a.tar.bz2
samba-a7f067c244401d37057a7ed7c00ba4ffc76f2b5a.zip
BUG 9699: Fix adding case sensitive spn.
We should be able to define the case of the spn cause it is important for some services like nfs. 'net ads keytab add "nfs"' should not result in an uppercase spn. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Apr 3 23:57:32 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/ldap.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index ca5962cf32..2a4a83b34a 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1949,12 +1949,7 @@ ADS_STATUS ads_add_service_principal_name(ADS_STRUCT *ads, const char *machine_n
ads_msgfree(ads, res);
return ADS_ERROR(LDAP_NO_MEMORY);
}
- if (!strupper_m(psp1)) {
- ret = ADS_ERROR(LDAP_NO_MEMORY);
- goto out;
- }
-
- if (!strlower_m(&psp1[strlen(spn)])) {
+ if (!strlower_m(&psp1[strlen(spn) + 1])) {
ret = ADS_ERROR(LDAP_NO_MEMORY);
goto out;
}
@@ -1970,12 +1965,7 @@ ADS_STATUS ads_add_service_principal_name(ADS_STRUCT *ads, const char *machine_n
ret = ADS_ERROR(LDAP_NO_MEMORY);
goto out;
}
- if (!strupper_m(psp2)) {
- ret = ADS_ERROR(LDAP_NO_MEMORY);
- goto out;
- }
-
- if (!strlower_m(&psp2[strlen(spn)])) {
+ if (!strlower_m(&psp2[strlen(spn) + 1])) {
ret = ADS_ERROR(LDAP_NO_MEMORY);
goto out;
}