s3-net: use better state variable name for smbldap_state.
authorGünther Deschner <gd@samba.org>
Tue, 15 Nov 2011 16:53:25 +0000 (17:53 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 16 Nov 2011 11:26:26 +0000 (12:26 +0100)
Guenther

source3/utils/net_sam.c

index d0640dd7b3278ea9c1c850f647dcdb94d717135f..7798fbb9080492eba65ff54fc48b7aae6a46d835 100644 (file)
@@ -1583,7 +1583,7 @@ static int net_sam_provision(struct net_context *c, int argc, const char **argv)
        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;
@@ -1645,7 +1645,7 @@ static int net_sam_provision(struct net_context *c, int argc, const char **argv)
                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;
        }
@@ -1709,7 +1709,7 @@ static int net_sam_provision(struct net_context *c, int argc, const char **argv)
 
                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 "
@@ -1785,7 +1785,7 @@ domu_done:
 
                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 "
@@ -1902,7 +1902,7 @@ doma_done:
 
                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 "
@@ -2013,7 +2013,7 @@ doma_done:
 
                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 "
@@ -2086,7 +2086,7 @@ doma_done:
 
                talloc_autofree_ldapmod(tc, mods);
 
-               rc = smbldap_add(ls, dn, mods);
+               rc = smbldap_add(state, dn, mods);
 
                if (rc != LDAP_SUCCESS) {
                        d_fprintf(stderr,
@@ -2099,11 +2099,11 @@ doma_done:
 
 
 done:
-       talloc_free(tc);
+       talloc_free(state);
        return 0;
 
 failed:
-       talloc_free(tc);
+       talloc_free(state);
        return -1;
 }