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

« back to all changes in this revision

Viewing changes to source4/libcli/util/clilsa.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:
79
79
        }
80
80
        lsa->ipc_tree->tid = tcon.tconx.out.tid;
81
81
 
82
 
        lsa->pipe = dcerpc_pipe_init(lsa, cli->transport->socket->event.ctx,
83
 
                                                                 cli->transport->iconv_convenience);
 
82
        lsa->pipe = dcerpc_pipe_init(lsa, cli->transport->socket->event.ctx);
84
83
        if (lsa->pipe == NULL) {
85
84
                talloc_free(lsa);
86
85
                return NT_STATUS_NO_MEMORY;
119
118
        r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
120
119
        r.out.handle = &lsa->handle;
121
120
 
122
 
        status = dcerpc_lsa_OpenPolicy(lsa->pipe, lsa, &r);
 
121
        status = dcerpc_lsa_OpenPolicy_r(lsa->pipe->binding_handle, lsa, &r);
123
122
        if (!NT_STATUS_IS_OK(status)) {
124
123
                talloc_free(lsa);
125
124
                return status;
126
125
        }
127
126
 
 
127
        if (!NT_STATUS_IS_OK(r.out.result)) {
 
128
                talloc_free(lsa);
 
129
                return r.out.result;
 
130
        }
 
131
 
128
132
        cli->lsa = lsa;
129
133
        
130
134
        return NT_STATUS_OK;
150
154
        r.in.sid = sid;
151
155
        r.out.rights = rights;
152
156
 
153
 
        return dcerpc_lsa_EnumAccountRights(cli->lsa->pipe, mem_ctx, &r);
 
157
        status = dcerpc_lsa_EnumAccountRights_r(cli->lsa->pipe->binding_handle, mem_ctx, &r);
 
158
        if (!NT_STATUS_IS_OK(status)) {
 
159
                return status;
 
160
        }
 
161
 
 
162
        return r.out.result;
154
163
}
155
164
 
156
165
 
234
243
        r.out.names = &names;
235
244
        r.out.domains = &domains;
236
245
 
237
 
        status = dcerpc_lsa_LookupSids(cli->lsa->pipe, mem_ctx2, &r);
 
246
        status = dcerpc_lsa_LookupSids_r(cli->lsa->pipe->binding_handle, mem_ctx2, &r);
238
247
        if (!NT_STATUS_IS_OK(status)) {
239
248
                talloc_free(mem_ctx2);
240
249
                return status;
241
250
        }
 
251
        if (!NT_STATUS_IS_OK(r.out.result)) {
 
252
                talloc_free(mem_ctx2);
 
253
                return r.out.result;
 
254
        }
242
255
        if (names.count != 1) {
243
256
                talloc_free(mem_ctx2);
244
257
                return NT_STATUS_UNSUCCESSFUL;
291
304
        r.out.sids = &sids;
292
305
        r.out.domains = &domains;
293
306
 
294
 
        status = dcerpc_lsa_LookupNames(cli->lsa->pipe, mem_ctx2, &r);
 
307
        status = dcerpc_lsa_LookupNames_r(cli->lsa->pipe->binding_handle, mem_ctx2, &r);
295
308
        if (!NT_STATUS_IS_OK(status)) {
296
309
                talloc_free(mem_ctx2);
297
310
                return status;
298
311
        }
 
312
        if (!NT_STATUS_IS_OK(r.out.result)) {
 
313
                talloc_free(mem_ctx2);
 
314
                return r.out.result;
 
315
        }
299
316
        if (sids.count != 1) {
300
317
                talloc_free(mem_ctx2);
301
318
                return NT_STATUS_UNSUCCESSFUL;
332
349
        r.in.sid = sid;
333
350
        r.in.rights = rights;
334
351
 
335
 
        return dcerpc_lsa_AddAccountRights(cli->lsa->pipe, mem_ctx, &r);
 
352
        status = dcerpc_lsa_AddAccountRights_r(cli->lsa->pipe->binding_handle, mem_ctx, &r);
 
353
        if (!NT_STATUS_IS_OK(status)) {
 
354
                return status;
 
355
        }
 
356
 
 
357
        return r.out.result;
336
358
}
337
359
 
338
360
/*
355
377
        r.in.remove_all = 0;
356
378
        r.in.rights = rights;
357
379
 
358
 
        return dcerpc_lsa_RemoveAccountRights(cli->lsa->pipe, mem_ctx, &r);
 
380
        status = dcerpc_lsa_RemoveAccountRights_r(cli->lsa->pipe->binding_handle, mem_ctx, &r);
 
381
        if (!NT_STATUS_IS_OK(status)) {
 
382
                return status;
 
383
        }
 
384
 
 
385
        return r.out.result;
359
386
}