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

« back to all changes in this revision

Viewing changes to source3/lib/dbwrap_util.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-01-29 06:16:15 UTC
  • mfrom: (0.27.9 upstream) (0.34.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100129061615-37hs6xqpsdhjq3ld
Tags: 2:3.4.5~dfsg-1ubuntu1
* Merge from debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set 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 additon to authenticated ones.
    - add map to guest = Bad user, maps bad username to gues access.
  + debian/samba-common.conf:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control: 
    - Make libswbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against ctdb, since its not in main yet.
  + debian/rules:
    - Enable "native" PIE hardening.
    - Add BIND_NOW to maximize benefit of RELRO hardening.
  + Add ufw integration:
    - Created debian/samba.ufw.profile.
    - debian/rules, debian/samba.dirs, debian/samba.files: install
  + Add apoort hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + debian/rules, debian/samba.if-up: allow "NetworkManager" as a recognized address
    family... it's obviously /not/ an address family, but it's what gets
    sent when using NM, so we'll cope for now.  (LP: #462169). Taken from karmic-proposed.
  + debian/control: Recommend keyutils for smbfs (LP: #493565)
  + Dropped patches:
    - debian/patches/security-CVE-2009-3297.patch: No longer needed
    - debian/patches/fix-too-many-open-files.patch: No longer needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
{
111
111
        struct db_record *rec;
112
112
        uint32 val = -1;
113
 
        TDB_DATA data;
 
113
        uint32_t v_store;
114
114
 
115
115
        if (!(rec = db->fetch_locked(db, NULL,
116
116
                                     string_term_tdb_data(keystr)))) {
128
128
 
129
129
        val += change_val;
130
130
 
131
 
        data.dsize = sizeof(val);
132
 
        data.dptr = (uint8 *)&val;
 
131
        SIVAL(&v_store, 0, val);
133
132
 
134
 
        rec->store(rec, data, TDB_REPLACE);
 
133
        rec->store(rec,
 
134
                   make_tdb_data((const uint8_t *)&v_store, sizeof(v_store)),
 
135
                   TDB_REPLACE);
135
136
 
136
137
        TALLOC_FREE(rec);
137
138
 
150
151
{
151
152
        struct db_record *rec;
152
153
        int32 val = -1;
153
 
        TDB_DATA data;
 
154
        int32_t v_store;
154
155
 
155
156
        if (!(rec = db->fetch_locked(db, NULL,
156
157
                                     string_term_tdb_data(keystr)))) {
168
169
 
169
170
        val += change_val;
170
171
 
171
 
        data.dsize = sizeof(val);
172
 
        data.dptr = (uint8 *)&val;
 
172
        SIVAL(&v_store, 0, val);
173
173
 
174
 
        rec->store(rec, data, TDB_REPLACE);
 
174
        rec->store(rec,
 
175
                   make_tdb_data((const uint8_t *)&v_store, sizeof(v_store)),
 
176
                   TDB_REPLACE);
175
177
 
176
178
        TALLOC_FREE(rec);
177
179