From 6e0c276ec8b918165a19b3dfc86bc7bef6d1f706 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 8 Sep 1998 19:21:04 +0000 Subject: Added back groupname map stuff removed by Andrew's "slash 'n' burn" tactics :-). Protected by #ifdef until used. Fixed bug in fd_attempt_close() where a pointer to potentially free'd memory was returned. I hate that. Added "blocking locks" as a per-share option for performance testing. Changed is_mangled() so it will return true if called with a pathname and any component of the pathname was mangled (it was already attempting to do this, but not checking for a '/' as end-of-mangle). This should be a better fix for the wierd stat cache bug Andrew identified. Jeremy. (This used to be commit 0de01f45980c7bc261248a9cead972a8d8cbd594) --- source3/smbd/reply.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/smbd/reply.c') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index d7ab997010..3d537d8868 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1891,7 +1891,7 @@ int reply_lockread(connection_struct *conn, char *inbuf,char *outbuf, int length data = smb_buf(outbuf) + 3; if(!do_lock( fsp, conn, numtoread, startpos, F_RDLCK, &eclass, &ecode)) { - if(ecode == ERRlock) { + if((ecode == ERRlock) && lp_blocking_locks(SNUM(conn))) { /* * A blocking lock was requested. Package up * this smb into a queued request and push it @@ -2485,7 +2485,7 @@ int reply_lock(connection_struct *conn, fsp->fd_ptr->fd, fsp->fnum, offset, count)); if (!do_lock(fsp, conn, count, offset, F_WRLCK, &eclass, &ecode)) { - if(ecode == ERRlock) { + if((ecode == ERRlock) && lp_blocking_locks(SNUM(conn))) { /* * A blocking lock was requested. Package up * this smb into a queued request and push it @@ -3618,7 +3618,7 @@ dev = %x, inode = %lx\n", fsp->fnum, (unsigned int)dev, (unsigned long)inode)); (int)offset, (int)count, fsp->fsp_name )); if(!do_lock(fsp,conn,count,offset, ((locktype & 1) ? F_RDLCK : F_WRLCK), &eclass, &ecode)) { - if((ecode == ERRlock) && (lock_timeout != 0)) { + if((ecode == ERRlock) && (lock_timeout != 0) && lp_blocking_locks(SNUM(conn))) { /* * A blocking lock was requested. Package up * this smb into a queued request and push it -- cgit