~ubuntu-branches/ubuntu/vivid/samba/vivid

« back to all changes in this revision

Viewing changes to source3/smbd/pipes.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:
26
26
 
27
27
 
28
28
#include "includes.h"
 
29
#include "smbd/smbd.h"
 
30
#include "smbd/globals.h"
 
31
#include "libcli/security/security.h"
 
32
#include "rpc_server/srv_pipe_hnd.h"
29
33
 
30
34
#define PIPE            "\\PIPE\\"
31
35
#define PIPELEN         strlen(PIPE)
65
69
                return status;
66
70
        }
67
71
 
68
 
        status = np_open(NULL, name, conn->client_address,
69
 
                         conn->server_info, &fsp->fake_file_handle);
 
72
        status = np_open(fsp, name,
 
73
                         conn->sconn->local_address,
 
74
                         conn->sconn->remote_address,
 
75
                         &conn->sconn->client_id,
 
76
                         conn->session_info,
 
77
                         conn->sconn->msg_ctx,
 
78
                         &fsp->fake_file_handle);
70
79
        if (!NT_STATUS_IS_OK(status)) {
71
80
                DEBUG(10, ("np_open(%s) returned %s\n", name,
72
81
                           nt_errstr(status)));
234
243
        DEBUG(3,("write-IPC nwritten=%d\n", (int)nwritten));
235
244
 
236
245
 send:
237
 
        if (!srv_send_smb(smbd_server_fd(), (char *)req->outbuf,
 
246
        if (!srv_send_smb(req->sconn, (char *)req->outbuf,
238
247
                          true, req->seqnum+1,
239
248
                          IS_CONN_ENCRYPTED(req->conn)||req->encrypted,
240
249
                          &req->pcd)) {
449
458
        state->outbuf = NULL;
450
459
 
451
460
        srv_set_message((char *)req->outbuf, 12, nread, False);
452
 
  
 
461
 
 
462
#if 0
 
463
        /*
 
464
         * we should return STATUS_BUFFER_OVERFLOW if there's
 
465
         * out standing data.
 
466
         *
 
467
         * But we can't enable it yet, as it has bad interactions
 
468
         * with fixup_chain_error_packet() in chain_reply().
 
469
         */
 
470
        if (is_data_outstanding) {
 
471
                error_packet_set((char *)req->outbuf, ERRDOS, ERRmoredata,
 
472
                                 STATUS_BUFFER_OVERFLOW, __LINE__, __FILE__);
 
473
        }
 
474
#endif
 
475
 
453
476
        SSVAL(req->outbuf,smb_vwv5,nread);
454
477
        SSVAL(req->outbuf,smb_vwv6,
455
478
              req_wct_ofs(req)