~lefteris-nikoltsios/+junk/samba-lp1016895

« back to all changes in this revision

Viewing changes to source4/smb_server/smb/reply.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + 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/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
811
811
        struct smbsrv_request *req;
812
812
        union smb_read *io;
813
813
 
814
 
        SMBSRV_CHECK_ASYNC_STATUS(io, union smb_read);
 
814
        SMBSRV_CHECK_ASYNC_STATUS_ERR(io, union smb_read);
815
815
 
816
816
        /* readx reply packets can be over-sized */
817
817
        req->control_flags |= SMBSRV_REQ_CONTROL_LARGE;
834
834
        SSVAL(req->out.vwv, VWV(7), (io->readx.out.nread>>16));
835
835
        SMBSRV_VWV_RESERVED(8, 4);
836
836
 
 
837
        if (!NT_STATUS_IS_OK(req->ntvfs->async_states->status)) {
 
838
                smbsrv_setup_error(req, req->ntvfs->async_states->status);
 
839
        }
 
840
 
837
841
        smbsrv_chain_reply(req);
838
842
}
839
843
 
1380
1384
        struct smbsrv_request *req;
1381
1385
        union smb_lpq *lpq;
1382
1386
        int i, maxcount;
1383
 
        const uint_t el_size = 28;
 
1387
        const unsigned int el_size = 28;
1384
1388
 
1385
1389
        SMBSRV_CHECK_ASYNC_STATUS(lpq,union smb_lpq);
1386
1390
 
1647
1651
void smbsrv_reply_lockingX(struct smbsrv_request *req)
1648
1652
{
1649
1653
        union smb_lock *lck;
1650
 
        uint_t total_locks, i;
1651
 
        uint_t lck_size;
 
1654
        unsigned int total_locks, i;
 
1655
        unsigned int lck_size;
1652
1656
        uint8_t *p;
1653
1657
 
1654
1658
        /* parse request */
2216
2220
        /* notice that the word parameters are not word aligned, so we don't use VWV() */
2217
2221
        fname_len =                         SVAL(req->in.vwv, 5);
2218
2222
        io->ntcreatex.in.flags =            IVAL(req->in.vwv, 7);
2219
 
        io->ntcreatex.in.root_fid =         IVAL(req->in.vwv, 11);
 
2223
        io->ntcreatex.in.root_fid.ntvfs =   smbsrv_pull_fnum(req, req->in.vwv, 11);
2220
2224
        io->ntcreatex.in.access_mask =      IVAL(req->in.vwv, 15);
2221
2225
        io->ntcreatex.in.alloc_size =       BVAL(req->in.vwv, 19);
2222
2226
        io->ntcreatex.in.file_attr =        IVAL(req->in.vwv, 27);
2228
2232
        io->ntcreatex.in.ea_list          = NULL;
2229
2233
        io->ntcreatex.in.sec_desc         = NULL;
2230
2234
        io->ntcreatex.in.query_maximal_access = false;
2231
 
 
2232
 
        /* we use a couple of bits of the create options internally */
2233
 
        if (io->ntcreatex.in.create_options & NTCREATEX_OPTIONS_PRIVATE_MASK) {
2234
 
                smbsrv_send_error(req, NT_STATUS_INVALID_PARAMETER);
2235
 
                return;
2236
 
        }
 
2235
        io->ntcreatex.in.private_flags    = 0;
2237
2236
 
2238
2237
        /* we need a neater way to handle this alignment */
2239
2238
        if ((req->flags2 & FLAGS2_UNICODE_STRINGS) &&