summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-04-09 18:10:09 +0000
committerJeremy Allison <jra@samba.org>2002-04-09 18:10:09 +0000
commitc36b31783e172e683de5bfa1c7df8158acfb2ae5 (patch)
tree8346d3775c824f650a342059e1c31e18153386b8 /source3
parentd0d61ba689694a11165076b58c7ac0731333c0df (diff)
downloadsamba-c36b31783e172e683de5bfa1c7df8158acfb2ae5.tar.gz
samba-c36b31783e172e683de5bfa1c7df8158acfb2ae5.tar.bz2
samba-c36b31783e172e683de5bfa1c7df8158acfb2ae5.zip
Shirish pointed out more areas we should be doing roundups for allocation size.
Jeremy. (This used to be commit cda9fccd629d084039af642d9177865d88553be6)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/nttrans.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 2c0955c834..ed2979b3a4 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -842,7 +842,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
p += 8;
SIVAL(p,0,fmode); /* File Attributes. */
p += 4;
- SOFF_T(p, 0, file_len);
+ SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len));
p += 8;
SOFF_T(p,0,file_len);
p += 12;
@@ -1293,7 +1293,7 @@ static int call_nt_transact_create(connection_struct *conn,
p += 8;
SIVAL(p,0,fmode); /* File Attributes. */
p += 4;
- SOFF_T(p,0,file_len);
+ SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len));
p += 8;
SOFF_T(p,0,file_len);
@@ -1348,29 +1348,28 @@ static int call_nt_transact_notify_change(connection_struct *conn,
char **ppsetup,
char **ppparams, char **ppdata)
{
- char *setup = *ppsetup;
- files_struct *fsp;
- uint32 flags;
+ char *setup = *ppsetup;
+ files_struct *fsp;
+ uint32 flags;
- fsp = file_fsp(setup,4);
- flags = IVAL(setup, 0);
+ fsp = file_fsp(setup,4);
+ flags = IVAL(setup, 0);
- DEBUG(3,("call_nt_transact_notify_change\n"));
+ DEBUG(3,("call_nt_transact_notify_change\n"));
- if(!fsp)
- return ERROR_DOS(ERRDOS,ERRbadfid);
+ if(!fsp)
+ return ERROR_DOS(ERRDOS,ERRbadfid);
- if((!fsp->is_directory) || (conn != fsp->conn))
- return ERROR_DOS(ERRDOS,ERRbadfid);
+ if((!fsp->is_directory) || (conn != fsp->conn))
+ return ERROR_DOS(ERRDOS,ERRbadfid);
- if (!change_notify_set(inbuf, fsp, conn, flags)) {
- return(UNIXERROR(ERRDOS,ERRbadfid));
- }
+ if (!change_notify_set(inbuf, fsp, conn, flags))
+ return(UNIXERROR(ERRDOS,ERRbadfid));
- DEBUG(3,("call_nt_transact_notify_change: notify change called on directory \
+ DEBUG(3,("call_nt_transact_notify_change: notify change called on directory \
name = %s\n", fsp->fsp_name ));
- return -1;
+ return -1;
}
/****************************************************************************