Bug 206662 - PAM passthru: ENTRY map method not working and schema incorrect
Summary: PAM passthru: ENTRY map method not working and schema incorrect
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Server - Plugins
Version: 1.0.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: fds103trackingbug
TreeView+ depends on / blocked
 
Reported: 2006-09-15 15:54 UTC by Rich Megginson
Modified: 2015-12-07 17:05 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-07 17:05:09 UTC
Embargoed:


Attachments (Terms of Use)
diffs for fix (9.59 KB, text/plain)
2006-09-15 15:54 UTC, Rich Megginson
no flags Details
new diffs (3.05 KB, text/plain)
2006-09-15 17:00 UTC, Rich Megginson
no flags Details
real new diffs (10.99 KB, text/plain)
2006-09-15 17:35 UTC, Rich Megginson
no flags Details

Description Rich Megginson 2006-09-15 15:54:47 UTC
1) The ENTRY method is not working
2) The schema is not correct - pamMapMethod should be pamIDMapMethod to
correspond to the pamIDAttr attribute type.

Comment 1 Rich Megginson 2006-09-15 15:54:47 UTC
Created attachment 136369 [details]
diffs for fix

Comment 2 Rich Megginson 2006-09-15 16:12:43 UTC
Fix:
1) Rename all occurrences of pamMapMethod to pamIDMapMethod
2) The parsing code for the map method was just plain wrong - it wasn't
incrementing the pointer correctly.
3) This code: if (one == two == three == PAMPT_MAP_METHOD_NONE) - is not correct.

Comment 3 Noriko Hosoi 2006-09-15 16:41:29 UTC
Your fix looks good.

Looking into the file pam_ptconfig.c, there are two places calling
parse_map_method.  First one in pam_passthru_validate_config assign the return
value to *returncode, but it's not checking the value.  The next one in
pam_passthru_apply_config does not check the return value from parse_map_method
nor the returned theConfig.pamptconfig_map_method#...  Could they be okay?

Comment 4 Rich Megginson 2006-09-15 17:00:34 UTC
Created attachment 136376 [details]
new diffs

Thanks Noriko.	I was missing some error checking there.

For the second call to parse_map_method in pam_passthru_apply_config() - it
doesn't need checking.	This function is the DSE post op callback, and
pam_passthru_validate_config() is the DSE pre op callback.  If validate passes,
it is ok to apply the changes.	If validate fails, apply will never be called.

Comment 5 Noriko Hosoi 2006-09-15 17:30:15 UTC
internal_comp_deps.mk? ;)

Comment 6 Rich Megginson 2006-09-15 17:35:49 UTC
Created attachment 136380 [details]
real new diffs

These are the real diffs

Comment 7 Noriko Hosoi 2006-09-15 21:15:10 UTC
Looks good.

Comment 8 Rich Megginson 2006-09-15 21:22:05 UTC
Branch: HEAD
Fix Description:
1) Rename all occurrences of pamMapMethod to pamIDMapMethod
2) The parsing code for the map method was just plain wrong - it wasn't
incrementing the pointer correctly.
3) This code: if (one == two == three == PAMPT_MAP_METHOD_NONE) - is not correct.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no 

Checking in ldapserver/ldap/schema/60pam-plugin.ldif;
/cvs/dirsec/ldapserver/ldap/schema/60pam-plugin.ldif,v  <--  60pam-plugin.ldif
new revision: 1.5; previous revision: 1.4
done
Checking in ldapserver/ldap/servers/plugins/pam_passthru/README;
/cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru/README,v  <--  README
new revision: 1.5; previous revision: 1.4
done
Checking in ldapserver/ldap/servers/plugins/pam_passthru/config.ldif;
/cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru/config.ldif,v  <-- 
config.ldif
new revision: 1.5; previous revision: 1.4
done
Checking in ldapserver/ldap/servers/plugins/pam_passthru/pam_ptconfig.c;
/cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru/pam_ptconfig.c,v  <--
pam_ptconfig.c
new revision: 1.7; previous revision: 1.6
done


Comment 11 Amita Sharma 2011-06-20 06:57:51 UTC
PAM passthrough startup Tests  PASS   : 100% (13/13)
PAM passthrough run Tests  PASS       : 100% (9/9)
PAM passthrough cleanup Tests  PASS   : 100% (5/5)

hence marking Verified -sanity only.


Note You need to log in before you can comment on or make changes to this bug.