summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/files.c46
-rw-r--r--source3/smbd/reply.c7
2 files changed, 30 insertions, 23 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 80544c9a30..580dc54545 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -289,12 +289,12 @@ files_struct *file_find_fsp(files_struct *orig_fsp)
{
files_struct *fsp;
- for (fsp=Files;fsp;fsp=fsp->next) {
- if (fsp == orig_fsp)
- return fsp;
- }
+ for (fsp=Files;fsp;fsp=fsp->next) {
+ if (fsp == orig_fsp)
+ return fsp;
+ }
- return NULL;
+ return NULL;
}
/****************************************************************************
@@ -303,16 +303,16 @@ files_struct *file_find_fsp(files_struct *orig_fsp)
files_struct *file_find_di_first(SMB_DEV_T dev, SMB_INO_T inode)
{
- files_struct *fsp;
+ files_struct *fsp;
- for (fsp=Files;fsp;fsp=fsp->next) {
- if ( fsp->fd != -1 &&
- fsp->dev == dev &&
- fsp->inode == inode )
- return fsp;
- }
+ for (fsp=Files;fsp;fsp=fsp->next) {
+ if ( fsp->fd != -1 &&
+ fsp->dev == dev &&
+ fsp->inode == inode )
+ return fsp;
+ }
- return NULL;
+ return NULL;
}
/****************************************************************************
@@ -321,16 +321,16 @@ files_struct *file_find_di_first(SMB_DEV_T dev, SMB_INO_T inode)
files_struct *file_find_di_next(files_struct *start_fsp)
{
- files_struct *fsp;
+ files_struct *fsp;
- for (fsp = start_fsp->next;fsp;fsp=fsp->next) {
- if ( fsp->fd != -1 &&
- fsp->dev == start_fsp->dev &&
- fsp->inode == start_fsp->inode )
- return fsp;
- }
+ for (fsp = start_fsp->next;fsp;fsp=fsp->next) {
+ if ( fsp->fd != -1 &&
+ fsp->dev == start_fsp->dev &&
+ fsp->inode == start_fsp->inode )
+ return fsp;
+ }
- return NULL;
+ return NULL;
}
/****************************************************************************
@@ -388,7 +388,9 @@ void file_free(files_struct *fsp)
information */
ZERO_STRUCTP(fsp);
- if (fsp == chain_fsp) chain_fsp = NULL;
+ if (fsp == chain_fsp) {
+ chain_fsp = NULL;
+ }
SAFE_FREE(fsp);
}
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index cdf607e273..845f058867 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -4514,13 +4514,18 @@ int reply_lockingX(connection_struct *conn, char *inbuf,char *outbuf,int length,
data = smb_buf(inbuf);
- if (locktype & (LOCKING_ANDX_CANCEL_LOCK | LOCKING_ANDX_CHANGE_LOCKTYPE)) {
+ if (locktype & LOCKING_ANDX_CHANGE_LOCKTYPE) {
/* we don't support these - and CANCEL_LOCK makes w2k
and XP reboot so I don't really want to be
compatible! (tridge) */
return ERROR_NT(NT_STATUS_NOT_SUPPORTED);
}
+ if (locktype & LOCKING_ANDX_CANCEL_LOCK) {
+ /* Need to make this like a cancel.... JRA. */
+ return ERROR_NT(NT_STATUS_UNSUCCESSFUL);
+ }
+
/* Check if this is an oplock break on a file
we have granted an oplock on.
*/