summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-09-23 19:41:20 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-09-24 09:25:43 +1000
commitf9698cfc970215a77e8ad60afb67f68058093b33 (patch)
tree2d0aa1bef1848d21ca09549b634c28b8ca9b9089 /source4/auth
parent964f9927798b884ddde1c78902d6d81a1d93c8d0 (diff)
downloadsamba-f9698cfc970215a77e8ad60afb67f68058093b33.tar.gz
samba-f9698cfc970215a77e8ad60afb67f68058093b33.tar.bz2
samba-f9698cfc970215a77e8ad60afb67f68058093b33.zip
s4-kerberos Fix kerberos_enctype_bitmap_to_enctypes()
The previous code never worked Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/kerberos/kerberos_util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/auth/kerberos/kerberos_util.c b/source4/auth/kerberos/kerberos_util.c
index 8b533f6c21..d77a51916f 100644
--- a/source4/auth/kerberos/kerberos_util.c
+++ b/source4/auth/kerberos/kerberos_util.c
@@ -817,8 +817,9 @@ krb5_error_code kerberos_enctype_bitmap_to_enctypes(TALLOC_CTX *mem_ctx, uint32_
return ENOMEM;
}
for (i=0; i<(8*sizeof(enctype_bitmap)); i++) {
- if ((1 << i) & enctype_bitmap) {
- (*enctypes)[j] = kerberos_enctype_bitmap_to_enctype(enctype_bitmap);
+ uint32_t bit_value = (1 << i) & enctype_bitmap;
+ if (bit_value & enctype_bitmap) {
+ (*enctypes)[j] = kerberos_enctype_bitmap_to_enctype(bit_value);
if (!(*enctypes)[j]) {
return KRB5_PROG_ETYPE_NOSUPP;
}