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

« back to all changes in this revision

Viewing changes to librpc/gen_ndr/cli_spoolss.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:
1144
1144
        }
1145
1145
 
1146
1146
        /* Return variables */
1147
 
        memcpy(data, r.out.data, r.in.data_size * sizeof(*data));
 
1147
        memcpy(data, r.out.data, (r.in.data_size) * sizeof(*data));
1148
1148
        *_data_size = *r.out._data_size;
1149
1149
 
1150
1150
        /* Return result */
1240
1240
 
1241
1241
        /* Return variables */
1242
1242
        if (buffer && r.out.buffer) {
1243
 
                memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
 
1243
                memcpy(buffer, r.out.buffer, (r.in.offered) * sizeof(*buffer));
1244
1244
        }
1245
1245
        *needed = *r.out.needed;
1246
1246
 
3464
3464
        }
3465
3465
 
3466
3466
        /* Return variables */
3467
 
        memcpy(CONST_DISCARD(char *, value_name), r.out.value_name, r.in.value_offered / 2 * sizeof(*value_name));
 
3467
        memcpy(discard_const_p(uint8_t *, value_name), r.out.value_name, (r.in.value_offered / 2) * sizeof(*value_name));
3468
3468
        *value_needed = *r.out.value_needed;
3469
3469
        *type = *r.out.type;
3470
 
        memcpy(data, r.out.data, r.in.data_offered * sizeof(*data));
 
3470
        memcpy(data, r.out.data, (r.in.data_offered) * sizeof(*data));
3471
3471
        *data_needed = *r.out.data_needed;
3472
3472
 
3473
3473
        /* Return result */
3743
3743
 
3744
3744
        /* Return variables */
3745
3745
        *type = *r.out.type;
3746
 
        memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
 
3746
        memcpy(buffer, r.out.buffer, (r.in.offered) * sizeof(*buffer));
3747
3747
        *needed = *r.out.needed;
3748
3748
 
3749
3749
        /* Return result */
3811
3811
                                       TALLOC_CTX *mem_ctx,
3812
3812
                                       struct policy_handle *handle /* [in] [ref] */,
3813
3813
                                       const char *key_name /* [in] [charset(UTF16)] */,
3814
 
                                       const char ** *key_buffer /* [out] [subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
 
3814
                                       uint32_t *_ndr_size /* [out] [ref] */,
 
3815
                                       union spoolss_KeyNames *key_buffer /* [out] [subcontext_size(*_ndr_size*2),ref,subcontext(0),switch_is(*_ndr_size)] */,
3815
3816
                                       uint32_t offered /* [in]  */,
3816
3817
                                       uint32_t *needed /* [out] [ref] */,
3817
3818
                                       WERROR *werror)
3847
3848
        }
3848
3849
 
3849
3850
        /* Return variables */
 
3851
        *_ndr_size = *r.out._ndr_size;
3850
3852
        *key_buffer = *r.out.key_buffer;
3851
3853
        *needed = *r.out.needed;
3852
3854
 
4211
4213
        }
4212
4214
 
4213
4215
        /* Return variables */
4214
 
        memcpy(out_data, r.out.out_data, r.in.out_data_size * sizeof(*out_data));
 
4216
        memcpy(out_data, r.out.out_data, (r.in.out_data_size) * sizeof(*out_data));
4215
4217
        *needed = *r.out.needed;
4216
4218
        *status_code = *r.out.status_code;
4217
4219