Rev 13323 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 13323 | Rev 17842 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | !exit |
13 | !exit |
14 | !endif |
14 | !endif |
15 | 15 | ||
16 | ldap_auth=!defof class_ldap_auth in $authdef |
16 | ldap_auth=!defof class_ldap_auth in $authdef |
17 | !default ldap_auth=!defof ldap_auth in wimshome/log/wims.conf |
17 | !default ldap_auth=!defof ldap_auth in wimshome/log/wims.conf |
- | 18 | !if xxxldap: notin xxx$ldap_auth and xxxldaps: notin xxx$ldap_auth |
|
- | 19 | ldap_auth=ldap://$ldap_auth |
|
18 | 20 | !endif |
|
19 | ldap_port=!defof class_ldap_port in $authdef |
21 | ldap_port=!defof class_ldap_port in $authdef |
20 | !default ldap_port=!defof ldap_port in wimshome/log/wims.conf |
22 | !default ldap_port=!defof ldap_port in wimshome/log/wims.conf |
21 | 23 | ||
22 | ldap_version=!defof class_ldap_version in $authdef |
24 | ldap_version=!defof class_ldap_version in $authdef |
23 | !default ldap_version=!defof ldap_version in wimshome/log/wims.conf |
25 | !default ldap_version=!defof ldap_version in wimshome/log/wims.conf |
Line 43... | Line 45... | ||
43 | !exit |
45 | !exit |
44 | !endif |
46 | !endif |
45 | !!!FIXME Be careful : ldap must be configured such that the option -w is accepted. If not, the answer |
47 | !!!FIXME Be careful : ldap must be configured such that the option -w is accepted. If not, the answer |
46 | !!! is the same for a good or wrong password. |
48 | !!! is the same for a good or wrong password. |
47 | !!! should fix the test |
49 | !!! should fix the test |
48 | ldap_search=!sh ldapsearch -x -H |
50 | 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])' |
49 | atest=result: 0 Success |
51 | atest=result: 0 Success |
50 | btest=# numEntries: 1 |
52 | btest=# numEntries: 1 |
51 | firstcond=0 |
53 | firstcond=0 |
52 | 54 | ||
53 | ldap_cnt=!linecnt $ldap_search |
55 | ldap_cnt=!linecnt $ldap_search |
Line 75... | Line 77... | ||
75 | !if $auth_real_login!= and $auth_real_login!=ERROR |
77 | !if $auth_real_login!= and $auth_real_login!=ERROR |
76 | auth_test=$auth_real_login |
78 | auth_test=$auth_real_login |
77 | !else |
79 | !else |
78 | !! one looks for the ldap_login in an anonymous way (no password) |
80 | !! one looks for the ldap_login in an anonymous way (no password) |
79 | !! quite anonymous search, since $ldap_oneuser is unpriviledged |
81 | !! quite anonymous search, since $ldap_oneuser is unpriviledged |
80 | ldap_search2=!sh ldapsearch -x -H |
82 | ldap_search2=!sh ldapsearch -x -H $ldap_auth:$ldap_port -b "$ldap_base" $ldap_accreditation '$ldap_id' $ldap_login | grep -v "^[d]n:" |
81 | ldap_search2=!replace internal :$ $ by , in $ldap_search2 |
83 | ldap_search2=!replace internal :$ $ by , in $ldap_search2 |
82 | ldap_cnt2=!linecnt $ldap_search2 |
84 | ldap_cnt2=!linecnt $ldap_search2 |
83 | 85 | ||
84 | !for i=1 to $ldap_cnt2 |
86 | !for i=1 to $ldap_cnt2 |
85 | l=!line $i of $ldap_search2 |
87 | l=!line $i of $ldap_search2 |