~ubuntu-branches/ubuntu/maverick/samba/maverick-security

« back to all changes in this revision

Viewing changes to source/lib/dbwrap_rbt.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2009-05-18 13:26:04 UTC
  • mfrom: (0.28.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090518132604-ebyuqimgymtr3h0k
Tags: 2:3.3.4-2ubuntu1
* Merge from debian unstable, remaining changes:
  + debian/patches/VERSION.patch:
    - setup SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted (LP: #312449)
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control:
    - Make libwbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against ctdb.
    - Add suggests keyutils for smbfs. (LP: #300221)
  + debian/rules:
    - enable "native" PIE hardening.
    - remove --with-ctdb and --with-cluster-support=yes
  + Add ufw integration:
    - Created debian/samba.ufw profile.
    - debian/rules, debian/samba.dirs, debian/samba.files: install 
      profile
    - debian/control: have samba sugguest ufw.
* Dropped patches:
  + debian/patches/fix-upstream-bug-6186.patch: Merged upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
                 */
132
132
        }
133
133
 
134
 
        node = (struct db_rbt_node *)SMB_MALLOC(
 
134
        node = (struct db_rbt_node *)talloc_size(rec_priv->db_ctx,
135
135
                offsetof(struct db_rbt_node, data) + rec->key.dsize
136
136
                + data.dsize);
137
137
 
138
138
        if (node == NULL) {
139
 
                SAFE_FREE(rec_priv->node);
 
139
                TALLOC_FREE(rec_priv->node);
140
140
                return NT_STATUS_NO_MEMORY;
141
141
        }
142
142
 
148
148
        db_rbt_parse_node(node, &this_key, &this_val);
149
149
 
150
150
        memcpy(this_key.dptr, rec->key.dptr, node->keysize);
151
 
        SAFE_FREE(rec_priv->node);
 
151
        TALLOC_FREE(rec_priv->node);
152
152
 
153
153
        memcpy(this_val.dptr, data.dptr, node->valuesize);
154
154
 
194
194
        }
195
195
 
196
196
        rb_erase(&rec_priv->node->rb_node, &rec_priv->db_ctx->tree);
197
 
        SAFE_FREE(rec_priv->node);
 
197
        TALLOC_FREE(rec_priv->node);
198
198
 
199
199
        return NT_STATUS_OK;
200
200
}