*/
#include "includes.h"
+#include "system/passwd.h"
static fstring password;
static fstring username;
return False;
}
-static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, int pid,
- enum brl_type lock_type,
- br_off start, br_off size)
-{
- printf("%6d %05x:%05x %s %.0f:%.0f(%.0f)\n",
- (int)pid, (int)dev, (int)ino,
- lock_type==READ_LOCK?"R":"W",
- (double)start, (double)start+size-1,(double)size);
-
-}
-
/*****************************************************
return a connection to a server
*******************************************************/
slprintf(myname,sizeof(myname), "lock-%u-%u", getpid(), count++);
- nt_status = smbcli_full_connection(&c, myname, server_n, NULL, 0, share, "?????",
- username, lp_workgroup(), password, 0,
- NULL);
-
+ nt_status = smbcli_full_connection(NULL,
+ &c, myname, server_n, 0, share, NULL,
+ username, lp_workgroup(), password);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("smbcli_full_connection failed with error %s\n", nt_errstr(nt_status)));
return NULL;
op==READ_LOCK?"READ_LOCK":"WRITE_LOCK",
ret[0], ret[1]);
}
- if (showall) brl_forall(print_brl);
if (ret[0] != ret[1]) return False;
} else if (r2 < LOCK_PCT+UNLOCK_PCT) {
/* unset a lock */
start, start+len-1, len,
ret[0], ret[1]);
}
- if (showall) brl_forall(print_brl);
if (!hide_unlock_fails && ret[0] != ret[1]) return False;
} else {
/* reopen the file */
if (showall) {
printf("reopen conn=%u fstype=%u f=%u\n",
conn, fstype, f);
- brl_forall(print_brl);
}
}
return True;
ZERO_STRUCT(fnum);
ZERO_STRUCT(cli);
- recorded = (struct record *)malloc(sizeof(*recorded) * numops);
+ recorded = malloc_array_p(struct record, numops);
for (n=0; n<numops; n++) {
recorded[n].conn = random() % NCONNECTIONS;