summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-11-08 04:02:05 +0000
committerAndrew Tridgell <tridge@samba.org>1997-11-08 04:02:05 +0000
commita90d2061316d19c30d9f14c1e78d6f6266183ce0 (patch)
tree4e4477829f154a4fae7d5dc345b5457fc7e85fb9 /source3/libsmb
parent029904995d27c4e765abf9334df34c399a535bea (diff)
downloadsamba-a90d2061316d19c30d9f14c1e78d6f6266183ce0.tar.gz
samba-a90d2061316d19c30d9f14c1e78d6f6266183ce0.tar.bz2
samba-a90d2061316d19c30d9f14c1e78d6f6266183ce0.zip
added two more sets of tests to the smbtorture test. The tests I added
are ones that I know Samba fails. They are: 1) correct support for retaining locks over a close (ie. the server must not use posix semantics) 2) support for lock timeouts 3) the server supports multiple locking contexts on the one SMB connection, distinguished by PID. 4) the server correctly fails overlapping locks made by the same PID (this goes against POSIX behaviour, which is why it is tricky to implement) 5) the server denies unlock requests by an incorrect client PID I've been discussing with Jeremy ways that we can re-implement the locking code to handle these correctly. This test code will be useful to see that we have got it right. (This used to be commit 097781e2992f12c545170c82ada2f4023a9784f5)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clientgen.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index b2ecb07ded..b98f2fca69 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -1072,3 +1072,13 @@ void cli_sockopt(struct cli_state *cli, char *options)
{
set_socket_options(cli->fd, options);
}
+
+/****************************************************************************
+set the PID to use for smb messages. Return the old pid.
+****************************************************************************/
+int cli_setpid(struct cli_state *cli, int pid)
+{
+ int ret = cli->pid;
+ cli->pid = pid;
+ return ret;
+}