summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-03-28 01:00:31 +0000
committerJeremy Allison <jra@samba.org>2002-03-28 01:00:31 +0000
commit906d3bda2656c7d88cc02940f6d50fd98eb189ed (patch)
treede85e140b4ec6bcb24d20296bfbc52ef21353359
parent149291d3cf6400ed3c5fa49b0a4e5c1ca8ee08d9 (diff)
downloadsamba-906d3bda2656c7d88cc02940f6d50fd98eb189ed.tar.gz
samba-906d3bda2656c7d88cc02940f6d50fd98eb189ed.tar.bz2
samba-906d3bda2656c7d88cc02940f6d50fd98eb189ed.zip
Ensure that setting file length can return disk full on failure.
Jeremy. (This used to be commit 14e2beca9b8fa1c8d893013f52f42b2721a82758)
-rw-r--r--source3/smbd/trans2.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 5d0ee08f42..aca7e47d48 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2279,6 +2279,8 @@ static int call_trans2setfilepathinfo(connection_struct *conn,
if(size != sbuf.st_size) {
+ int ret;
+
DEBUG(10,("call_trans2setfilepathinfo: file %s : setting new size to %.0f\n",
fname, (double)size ));
@@ -2304,11 +2306,14 @@ static int call_trans2setfilepathinfo(connection_struct *conn,
if (new_fsp == NULL)
return(UNIXERROR(ERRDOS,ERRbadpath));
- vfs_set_filelen(new_fsp, size);
+ ret = vfs_set_filelen(new_fsp, size);
close_file(new_fsp,True);
} else {
- vfs_set_filelen(fsp, size);
+ ret = vfs_set_filelen(fsp, size);
}
+
+ if (ret == -1)
+ return (UNIXERROR(ERRHRD,ERRdiskfull));
}
SSVAL(params,0,0);