~ubuntu-branches/ubuntu/precise/samba/precise

« back to all changes in this revision

Viewing changes to source4/librpc/tests/binding_string.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:
24
24
#include "librpc/rpc/dcerpc.h"
25
25
#include "librpc/rpc/dcerpc_proto.h"
26
26
#include "torture/torture.h"
 
27
#include "lib/util/util_net.h"
27
28
 
28
29
static bool test_BindingString(struct torture_context *tctx,
29
30
                                                           const void *test_data)
127
128
        torture_assert_int_equal(tctx, b->object.if_version, 0, "object version");
128
129
        torture_assert_ntstatus_ok(tctx, dcerpc_parse_binding(tctx, 
129
130
                "308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:$SERVER", &b), "parse");
 
131
        torture_assert_ntstatus_ok(tctx, dcerpc_parse_binding(tctx, "ncacn_ip_tcp:$SERVER[,sign,localaddress=192.168.1.1]", &b), "parse");
 
132
        torture_assert(tctx, b->transport == NCACN_IP_TCP, "ncacn_ip_tcp expected");
 
133
        torture_assert(tctx, b->flags == (DCERPC_SIGN | DCERPC_LOCALADDRESS), "sign flag");
 
134
        torture_assert_str_equal(tctx, b->localaddress, "192.168.1.1", "localaddress");
 
135
        torture_assert_str_equal(tctx, "ncacn_ip_tcp:$SERVER[,sign,localaddress=192.168.1.1]",
 
136
                                 dcerpc_binding_string(tctx, b), "back to string");
130
137
 
131
138
        return true;
132
139
}
155
162
struct torture_suite *torture_local_binding_string(TALLOC_CTX *mem_ctx)
156
163
{
157
164
        int i;
158
 
        struct torture_suite *suite = torture_suite_create(mem_ctx, "BINDING");
 
165
        struct torture_suite *suite = torture_suite_create(mem_ctx, "binding");
159
166
 
160
167
        for (i = 0; i < ARRAY_SIZE(test_strings); i++) {
161
168
                torture_suite_add_simple_tcase_const(suite, test_strings[i],