|
|
source_content: DOMAIN domain | source_content: DOMAIN domain |
| USER user | | USER user |
| USERLIST WORD { sgSourceUserList($2); } | | USERLIST WORD { sgSourceUserList($2); } |
@YACCLINE@ |
|
| EXECUSERLIST EXECCMD { sgSourceExecUserList($2); } | | EXECUSERLIST EXECCMD { sgSourceExecUserList($2); } |
| USERQUOTA NUMBER NUMBER HOURLY { | | USERQUOTA NUMBER NUMBER HOURLY { |
sgSourceUserQuota($2,$3,"3600");} | sgSourceUserQuota($2,$3,"3600");} |
|
|
*/ | */ |
| |
if(!ldap_is_ldap_url(url)) { | if(!ldap_is_ldap_url(url)) { |
@NOLOG1@ sgLogError("%s: can't parse LDAP url %s",progname, url); @NOLOG2@ |
sgLogError("%s: can't parse LDAP url %s",progname, url); |
return; | return; |
} | } |
| |
|
|
m = ((lastval - m) * 60) - lt->tm_sec; | m = ((lastval - m) * 60) - lt->tm_sec; |
if(m <= 0) | if(m <= 0) |
m = 30; | m = 30; |
@NOLOG1@ sgLogError("Info: recalculating alarm in %d seconds", (unsigned int)m); @NOLOG2@ |
sgLogError("Info: recalculating alarm in %d seconds", (unsigned int)m); |
alarm((unsigned int) m); | alarm((unsigned int) m); |
sgTimeCheck(lt,t); | sgTimeCheck(lt,t); |
sgTimeSetAcl(); | sgTimeSetAcl(); |
|
|
} | } |
} | } |
} | } |
@NOLOG1@ |
|
else { | else { |
if( globalDebug == 1 ) { sgLogError("source not found"); } | if( globalDebug == 1 ) { sgLogError("source not found"); } |
} | } |
@NOLOG2@ |
|
if(!found) { | if(!found) { |
acl = defaultAcl; | acl = defaultAcl; |
@NOLOG1@ |
|
if( globalDebug == 1 ) { sgLogError("no ACL matching source, using default"); } | if( globalDebug == 1 ) { sgLogError("no ACL matching source, using default"); } |
@NOLOG2@ |
|
} | } |
return acl; | return acl; |
} | } |
|
|
| |
sgDbUpdate(src->userDb, ident, (char *) userinfo, | sgDbUpdate(src->userDb, ident, (char *) userinfo, |
sizeof(struct UserInfo)); | sizeof(struct UserInfo)); |
@NOLOG1@ sgLogError("Added LDAP source: %s", ident); @NOLOG2@ |
sgLogError("Added LDAP source: %s", ident); |
| |
if(found) { | if(found) { |
*rval = userinfo; | *rval = userinfo; |
|
|
if (strncmp(key, "bindname=", 9) == 0) | if (strncmp(key, "bindname=", 9) == 0) |
{ | { |
binddn = data; | binddn = data; |
@NOLOG1@ sgLogError("Extracted binddn: %s", binddn); @NOLOG2@ |
sgLogError("Extracted binddn: %s", binddn); |
} | } |
else if (strncmp(key, "x-bindpass=", 11) == 0) | else if (strncmp(key, "x-bindpass=", 11) == 0) |
{ | { |
bindpass = data; | bindpass = data; |
@NOLOG1@ sgLogError("Extracted x-bindpass: %s", bindpass); @NOLOG2@ |
sgLogError("Extracted x-bindpass: %s", bindpass); |
} | } |
} | } |
| |
|
|
lud->lud_attrs, 0, NULL, NULL, NULL, -1, | lud->lud_attrs, 0, NULL, NULL, NULL, -1, |
&ldapresult) != LDAP_SUCCESS) { | &ldapresult) != LDAP_SUCCESS) { |
| |
@NOLOG1@ |
|
sgLogError("%s: ldap_search_ext_s failed: %s " | sgLogError("%s: ldap_search_ext_s failed: %s " |
| |
"(params: %s, %d, %s, %s)", | "(params: %s, %d, %s, %s)", |
progname, ldap_err2string(get_ldap_errno(ld)), | progname, ldap_err2string(get_ldap_errno(ld)), |
lud->lud_dn, lud->lud_scope, lud->lud_filter, | lud->lud_dn, lud->lud_scope, lud->lud_filter, |
lud->lud_attrs[0]); | lud->lud_attrs[0]); |
@NOLOG2@ |
|
| |
ldap_unbind(ld); | ldap_unbind(ld); |
ldap_free_urldesc(lud); | ldap_free_urldesc(lud); |