src/server/daemon/ldap_auth.c

changeset 63
66442f81f823
parent 49
1fd94945796e
child 66
74babc0082b7
equal deleted inserted replaced
62:c47e081b6c0f 63:66442f81f823
89 return NULL; 89 return NULL;
90 } 90 }
91 91
92 LDAPMessage *msg = ldap_first_entry(ld, result); 92 LDAPMessage *msg = ldap_first_entry(ld, result);
93 if (msg) { 93 if (msg) {
94 LDAPUser *user = malloc(sizeof (LDAPUser)); 94 LDAPUser *user = malloc(sizeof(LDAPUser));
95 if (user != NULL) { 95 if (user != NULL) {
96 user->user.verify_password = ldap_user_verify_password; 96 user->user.verify_password = ldap_user_verify_password;
97 user->user.check_group = ldap_user_check_group; 97 user->user.check_group = ldap_user_check_group;
98 user->user.free = ldap_user_free; 98 user->user.free = ldap_user_free;
99 user->user.name = username; // must not be freed 99 user->user.name = username; // must not be freed
100
101 // TODO: get uid/gid from ldap
102 user->user.uid = -1;
103 user->user.gid = -1;
100 104
101 user->ldap = ld; 105 user->ldap = ld;
102 user->userdn = ldap_get_dn(ld, msg); 106 user->userdn = ldap_get_dn(ld, msg);
103 107
104 ldap_msgfree(result); 108 ldap_msgfree(result);

mercurial