summaryrefslogtreecommitdiffstats
path: root/source/smbd/fileio.c
Commit message (Collapse)AuthorAgeFilesLines
* lib/signal.c: Added CatchChildLeaveStatus() call needed in smbd/open.c and ↵Jeremy Allison1998-12-291-0/+12
| | | | | | | | | | | | | | | | | | | | | | | smbd/chgpasswd.c. smbd/chgpasswd.c smbd/open.c: Ensure that we replace SIGCLD handler with CatchChildLeaveStatus() *before* we expect to reap a child status - and reset it to CatchChild() after we've done the sys_waitpid(). The original CatchChild() code would eat the status code from the zombie in the signal handler, meaning that the sys_waitpid() calls in check_access_allowed_for_current_user() and chgpasswd would never return a status. smbd/open.c: smbd/reply.c: smbd/close.c: Check error return on close() calls - ensure a valid error return is sent back to the client. This catches the "file truncated" bug when a user has run out of quota (or space) and the ENOSPC error is returned on the *close()* call, not the write() (eg. on an nfs mounted drive). smbd/fileio.c: Added check for ESPIPE on sys_lseek() in file_seek() to allow people to use Windows clients to communicate with UNIX fifo's (like they could in 1.9.18). Jeremy.
* Fixed sys_lseek and seek_file calls so all returnsJeremy Allison1998-10-181-2/+11
| | | | | are *checked* :-). Jeremy.
* config: Fix crypt prototype on RedHat Linux.Jeremy Allison1998-10-151-1/+1
| | | | | | | | include/includes.h: Fix crypt prototype on RedHat Linux. smbd/fileio.c: Fix mmap bug found by WinCE client. smbd/ipc.c: Fix WinCE wierdness with pipes being opened as \server\pipe\lanman smbd/password.c: Fix encrypted null passwords. Jeremy.
* gto ri of a bunch more #ifdef LARGE_SMB_OFF_T checks by introducing aAndrew Tridgell1998-09-181-13/+9
| | | | | | | SOFF_T() macro for setting an SMB_OFF_T variable also limited mmap based reads to MAX_MMAP_SIZE. We really can't mmap 2^50 bytes due to virtual address space problems.
* Ok so with this bugfix 64 bit file access actually seems to work :-).Jeremy Allison1998-09-111-2/+6
| | | | | | Problems were just dumb bugs like (defining sys_lseek to return 'int' DOH !). Jeremy.
* Added ssize_t to configure code.Jeremy Allison1998-09-111-30/+30
| | | | | | | | | | | Got 'religion' about using size_t and ssize_t for read/write stuff as part of the code to expose 64 bits to the client. This checkin does all the 'easy' stuff - such as all the read/write/lock calls - but now comes the harder parts (open & friends) and all the file enquiry functions..... Jeremy.
* Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison1998-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy.
* More abstraction of file system data types, to move to a 64Jeremy Allison1998-09-011-2/+2
| | | | | | | | | | | | | | | | | | | | | bit file interface for the NT SMB's. Created a new define, SMB_STRUCT_STAT that currently is defined to be struct stat - this wil change to a user defined type containing 64 bit info when the correct wrappers are written for 64 bit stat(), fstat() and lstat() calls. Also changed all sys_xxxx() calls that were previously just wrappers to the same call prefixed by a dos_to_unix() call into dos_xxxx() calls. This makes it explicit when a pathname translation is being done, and when it is not. Now, all sys_xxx() calls are meant to be wrappers to mask OS differences, and not silently converting filenames on the fly. Jeremy.
* more splitting of server.cAndrew Tridgell1998-08-171-0/+12
| | | | created dosmode.c and filename.c
* now that we have no global arrays we can start to split up the monsterAndrew Tridgell1998-08-171-0/+117
server.c without breaking things. this splits off netprot.c and fileio.c for negprot and read/write/seek handling respectively.