~ubuntu-branches/ubuntu/utopic/samba/utopic

« back to all changes in this revision

Viewing changes to source3/smbd/trans2.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-02-21 09:06:34 UTC
  • mfrom: (0.39.23 sid)
  • Revision ID: package-import@ubuntu.com-20120221090634-svd7q7m33pfz0847
Tags: 2:3.6.3-1ubuntu1
* 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/fix-samba-printer-browsing.patch: No longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2271
2271
        TALLOC_CTX *ctx = talloc_tos();
2272
2272
        struct dptr_struct *dirptr = NULL;
2273
2273
        struct smbd_server_connection *sconn = req->sconn;
 
2274
        uint32_t ucf_flags = (UCF_SAVE_LCOMP | UCF_ALWAYS_ALLOW_WCARD_LCOMP);
2274
2275
 
2275
2276
        if (total_params < 13) {
2276
2277
                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
2314
2315
                                reply_nterror(req, NT_STATUS_INVALID_LEVEL);
2315
2316
                                goto out;
2316
2317
                        }
 
2318
                        ucf_flags |= UCF_UNIX_NAME_LOOKUP;
2317
2319
                        break;
2318
2320
                default:
2319
2321
                        reply_nterror(req, NT_STATUS_INVALID_LEVEL);
2331
2333
        ntstatus = filename_convert(ctx, conn,
2332
2334
                                    req->flags2 & FLAGS2_DFS_PATHNAMES,
2333
2335
                                    directory,
2334
 
                                    (UCF_SAVE_LCOMP |
2335
 
                                        UCF_ALWAYS_ALLOW_WCARD_LCOMP),
 
2336
                                    ucf_flags,
2336
2337
                                    &mask_contains_wcard,
2337
2338
                                    &smb_dname);
2338
2339
        if (!NT_STATUS_IS_OK(ntstatus)) {
4673
4674
                 */
4674
4675
                case SMB_QUERY_FILE_STREAM_INFO:
4675
4676
                case SMB_FILE_STREAM_INFORMATION: {
4676
 
                        unsigned int num_streams;
4677
 
                        struct stream_struct *streams;
 
4677
                        unsigned int num_streams = 0;
 
4678
                        struct stream_struct *streams = NULL;
4678
4679
 
4679
4680
                        DEBUG(10,("smbd_do_qfilepathinfo: "
4680
4681
                                  "SMB_FILE_STREAM_INFORMATION\n"));
4683
4684
                                return NT_STATUS_INVALID_PARAMETER;
4684
4685
                        }
4685
4686
 
4686
 
                        status = SMB_VFS_STREAMINFO(
4687
 
                                conn, fsp, smb_fname->base_name, talloc_tos(),
4688
 
                                &num_streams, &streams);
 
4687
                        status = vfs_streaminfo(conn, fsp, smb_fname->base_name,
 
4688
                                                talloc_tos(), &num_streams, &streams);
4689
4689
 
4690
4690
                        if (!NT_STATUS_IS_OK(status)) {
4691
4691
                                DEBUG(10, ("could not get stream info: %s\n",
5104
5104
        } else {
5105
5105
                uint32_t name_hash;
5106
5106
                char *fname = NULL;
 
5107
                uint32_t ucf_flags = 0;
5107
5108
 
5108
5109
                /* qpathinfo */
5109
5110
                if (total_params < 7) {
5115
5116
 
5116
5117
                DEBUG(3,("call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = %d\n", info_level));
5117
5118
 
5118
 
                if (INFO_LEVEL_IS_UNIX(info_level) && !lp_unix_extensions()) {
5119
 
                        reply_nterror(req, NT_STATUS_INVALID_LEVEL);
5120
 
                        return;
 
5119
                if (INFO_LEVEL_IS_UNIX(info_level)) {
 
5120
                        if (!lp_unix_extensions()) {
 
5121
                                reply_nterror(req, NT_STATUS_INVALID_LEVEL);
 
5122
                                return;
 
5123
                        }
 
5124
                        if (info_level == SMB_QUERY_FILE_UNIX_BASIC ||
 
5125
                                        info_level == SMB_QUERY_FILE_UNIX_INFO2 ||
 
5126
                                        info_level == SMB_QUERY_FILE_UNIX_LINK) {
 
5127
                                ucf_flags |= UCF_UNIX_NAME_LOOKUP;
 
5128
                        }
5121
5129
                }
5122
5130
 
5123
5131
                srvstr_get_path(req, params, req->flags2, &fname, &params[6],
5132
5140
                                        conn,
5133
5141
                                        req->flags2 & FLAGS2_DFS_PATHNAMES,
5134
5142
                                        fname,
5135
 
                                        0,
 
5143
                                        ucf_flags,
5136
5144
                                        NULL,
5137
5145
                                        &smb_fname);
5138
5146
                if (!NT_STATUS_IS_OK(status)) {
7976
7984
                }
7977
7985
        } else {
7978
7986
                char *fname = NULL;
 
7987
                uint32_t ucf_flags = 0;
7979
7988
 
7980
7989
                /* set path info */
7981
7990
                if (total_params < 7) {
7992
8001
                        return;
7993
8002
                }
7994
8003
 
 
8004
                if (info_level == SMB_SET_FILE_UNIX_BASIC ||
 
8005
                                info_level == SMB_SET_FILE_UNIX_INFO2 ||
 
8006
                                info_level == SMB_FILE_RENAME_INFORMATION ||
 
8007
                                info_level == SMB_POSIX_PATH_UNLINK) {
 
8008
                        ucf_flags |= UCF_UNIX_NAME_LOOKUP;
 
8009
                }
 
8010
 
7995
8011
                status = filename_convert(req, conn,
7996
8012
                                         req->flags2 & FLAGS2_DFS_PATHNAMES,
7997
8013
                                         fname,
7998
 
                                         0,
 
8014
                                         ucf_flags,
7999
8015
                                         NULL,
8000
8016
                                         &smb_fname);
8001
8017
                if (!NT_STATUS_IS_OK(status)) {