Rev 5015 | Rev 5099 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5015 | Rev 5072 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | or $ldap_branch=$empty or $ldap_auth=$empty |
41 | or $ldap_branch=$empty or $ldap_auth=$empty |
42 | auth_test=ERROR no_ldap_config |
42 | auth_test=ERROR no_ldap_config |
43 | !exit |
43 | !exit |
44 | !endif |
44 | !endif |
45 | 45 | ||
46 | ldap_search=!sh ldapsearch -x -H $ldap_auth:$ldap_port -b "$ldap_base" '$ldap_id' -D "$ldap_id , $ldap_base" -w '$(wims_read_parm[2])' |
46 | ldap_search=!sh ldapsearch -x -H ldap://$ldap_auth:$ldap_port -b "$ldap_base" '$ldap_id' -D "$ldap_id , $ldap_base" -w '$(wims_read_parm[2])' |
47 | 47 | ||
48 | atest=result: 0 Success |
48 | atest=result: 0 Success |
49 | btest=# numEntries: 1 |
49 | btest=# numEntries: 1 |
50 | firstcond=0 |
50 | firstcond=0 |
51 | 51 | ||
Line 73... | Line 73... | ||
73 | !else |
73 | !else |
74 | !if $auth_real_login!= and $auth_real_login!=ERROR |
74 | !if $auth_real_login!= and $auth_real_login!=ERROR |
75 | auth_test=$auth_real_login |
75 | auth_test=$auth_real_login |
76 | !else |
76 | !else |
77 | !! one looks for the ldap_login in an anonymous way (no password) |
77 | !! one looks for the ldap_login in an anonymous way (no password) |
78 | ldap_search2=!sh ldapsearch -x - |
78 | ldap_search2=!sh ldapsearch -x -H ldap://$ldap_auth:$ldap_port -b "$ldap_base" '$ldap_id' $ldap_login | grep -v "^[d]n:" |
79 | ldap_search2=!replace internal :$ $ by , in $ldap_search2 |
79 | ldap_search2=!replace internal :$ $ by , in $ldap_search2 |
80 | ldap_cnt2=!linecnt $ldap_search2 |
80 | ldap_cnt2=!linecnt $ldap_search2 |
81 | 81 | ||
82 | !for i=1 to $ldap_cnt2 |
82 | !for i=1 to $ldap_cnt2 |
83 | l=!line $i of $ldap_search2 |
83 | l=!line $i of $ldap_search2 |
Line 87... | Line 87... | ||
87 | !endif |
87 | !endif |
88 | !next |
88 | !next |
89 | !if $auth_real_login!= |
89 | !if $auth_real_login!= |
90 | auth_user=$auth_real_login |
90 | auth_user=$auth_real_login |
91 | !endif |
91 | !endif |
- | 92 | auth_test=$auth_real_login |
|
92 | !endif |
93 | !endif |
93 | !endif |
94 | !endif |
94 | !endif |
95 | !endif |
95 | 96 | ||
96 | cnt_=!charcnt $auth_user |
97 | cnt_=!charcnt $auth_user |
Line 104... | Line 105... | ||
104 | !if $auth_test!=ERROR |
105 | !if $auth_test!=ERROR |
105 | auth_test=OK |
106 | auth_test=OK |
106 | !endif |
107 | !endif |
107 | auth_error=$wims_exec_error |
108 | auth_error=$wims_exec_error |
108 | !reset wims_exec_error |
109 | !reset wims_exec_error |
- | 110 | auth_user_orig=$(wims_read_parm[1]) |