diff options
author | Jeremy Allison <jra@samba.org> | 2002-03-28 01:00:31 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-03-28 01:00:31 +0000 |
commit | 14e2beca9b8fa1c8d893013f52f42b2721a82758 (patch) | |
tree | 78492a56b2863ca4fb257d937249f5b7efc04680 | |
parent | a66e04711a2a9d4514df52addb1256a008eff880 (diff) | |
download | samba-14e2beca9b8fa1c8d893013f52f42b2721a82758.tar.gz samba-14e2beca9b8fa1c8d893013f52f42b2721a82758.tar.xz samba-14e2beca9b8fa1c8d893013f52f42b2721a82758.zip |
Ensure that setting file length can return disk full on failure.
Jeremy.
-rw-r--r-- | source/smbd/trans2.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 5d0ee08f421..aca7e47d481 100644 --- a/source/smbd/trans2.c +++ b/source/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); |