s3:torture:delete: untangle function call from result check
[kai/samba.git] / source3 / torture / locktest2.c
index aba6d2ff134a9d4c4786ca2a052e5483256eeb1b..aefdcd3ff2588a86fa12414876cd3de91da527e9 100644 (file)
@@ -73,7 +73,7 @@ static int try_open(struct cli_state *c, char *nfs, int fstype, const char *fnam
        case FSTYPE_SMB:
                {
                        uint16_t fd;
-                       if (!NT_STATUS_IS_OK(cli_open(c, fname, flags, DENY_NONE, &fd))) {
+                       if (!NT_STATUS_IS_OK(cli_openx(c, fname, flags, DENY_NONE, &fd))) {
                                return -1;
                        }
                        return fd;
@@ -114,7 +114,8 @@ static bool try_lock(struct cli_state *c, int fstype,
 
        switch (fstype) {
        case FSTYPE_SMB:
-               return cli_lock(c, fd, start, len, LOCK_TIMEOUT, op);
+               return NT_STATUS_IS_OK(cli_lock32(c, fd, start, len,
+                                      LOCK_TIMEOUT, op));
 
        case FSTYPE_NFS:
                lock.l_type = (op==READ_LOCK) ? F_RDLCK:F_WRLCK;
@@ -193,7 +194,7 @@ static struct cli_state *connect_one(char *share)
 
        nt_status = cli_full_connection(&c, myname, server_n, NULL, 0, share, "?????", 
                                        username, lp_workgroup(), password, 0,
-                                       Undefined);
+                                       SMB_SIGNING_DEFAULT);
 
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("cli_full_connection failed with error %s\n", nt_errstr(nt_status)));
@@ -512,7 +513,7 @@ static void usage(void)
        argc -= 4;
        argv += 4;
 
-       lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
+       lp_load_global(get_dyn_CONFIGFILE());
        load_interfaces();
 
        if (getenv("USER")) {