char *ldap_bk;
char *ldap_uri = NULL;
char *p;
- struct smbldap_state *ls;
+ struct smbldap_state *state = NULL;
GROUP_MAP *gmap = NULL;
struct dom_sid gsid;
gid_t domusers_gid = -1;
goto failed;
}
- if (!NT_STATUS_IS_OK(smbldap_init(tc, NULL, ldap_uri, &ls))) {
+ if (!NT_STATUS_IS_OK(smbldap_init(tc, NULL, ldap_uri, &state))) {
d_fprintf(stderr, _("Unable to connect to the LDAP server.\n"));
goto failed;
}
talloc_autofree_ldapmod(tc, mods);
- rc = smbldap_add(ls, dn, mods);
+ rc = smbldap_add(state, dn, mods);
if (rc != LDAP_SUCCESS) {
d_fprintf(stderr, _("Failed to add Domain Users group "
talloc_autofree_ldapmod(tc, mods);
- rc = smbldap_add(ls, dn, mods);
+ rc = smbldap_add(state, dn, mods);
if (rc != LDAP_SUCCESS) {
d_fprintf(stderr, _("Failed to add Domain Admins group "
talloc_autofree_ldapmod(tc, mods);
- rc = smbldap_add(ls, dn, mods);
+ rc = smbldap_add(state, dn, mods);
if (rc != LDAP_SUCCESS) {
d_fprintf(stderr, _("Failed to add Administrator user "
talloc_autofree_ldapmod(tc, mods);
- rc = smbldap_add(ls, dn, mods);
+ rc = smbldap_add(state, dn, mods);
if (rc != LDAP_SUCCESS) {
d_fprintf(stderr, _("Failed to add Guest user to "
talloc_autofree_ldapmod(tc, mods);
- rc = smbldap_add(ls, dn, mods);
+ rc = smbldap_add(state, dn, mods);
if (rc != LDAP_SUCCESS) {
d_fprintf(stderr,
done:
- talloc_free(tc);
+ talloc_free(state);
return 0;
failed:
- talloc_free(tc);
+ talloc_free(state);
return -1;
}