diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-10-03 03:34:19 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-10-03 03:34:19 +0000 |
commit | 2534e0688ba703423c9d18b3296b00c097aa351d (patch) | |
tree | 768a087c022fb2dd49e95fb90d896c848087dffd /source3/smbd | |
parent | 4438d7b57e459e091017fcbe18547a8b69be4d80 (diff) | |
download | samba-2534e0688ba703423c9d18b3296b00c097aa351d.tar.gz samba-2534e0688ba703423c9d18b3296b00c097aa351d.tar.bz2 samba-2534e0688ba703423c9d18b3296b00c097aa351d.zip |
add "static" to a couple of functions that are only used locally.
set granted_oplock=False at the start of open_file(). This is
paranoia.
(This used to be commit c7f09ffd4a00ef7266e3f54536ee6aaca9335fb8)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/server.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index d7620a5804..9af1a88062 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -886,8 +886,7 @@ static void check_for_pipe(char *fname) /**************************************************************************** fd support routines - attempt to do a sys_open ****************************************************************************/ - -int fd_attempt_open(char *fname, int flags, int mode) +static int fd_attempt_open(char *fname, int flags, int mode) { int fd = sys_open(fname,flags,mode); @@ -939,7 +938,7 @@ int fd_attempt_open(char *fname, int flags, int mode) fd support routines - attempt to find an already open file by dev and inode - increments the ref_count of the returned file_fd_struct *. ****************************************************************************/ -file_fd_struct *fd_get_already_open(struct stat *sbuf) +static file_fd_struct *fd_get_already_open(struct stat *sbuf) { int i; file_fd_struct *fd_ptr; @@ -966,7 +965,7 @@ file_fd_struct *fd_get_already_open(struct stat *sbuf) fd support routines - attempt to find a empty slot in the FileFd array. Increments the ref_count of the returned entry. ****************************************************************************/ -file_fd_struct *fd_get_new() +static file_fd_struct *fd_get_new() { int i; file_fd_struct *fd_ptr; @@ -999,8 +998,7 @@ n")); fd support routines - attempt to re-open an already open fd as O_RDWR. Save the already open fd (we cannot close due to POSIX file locking braindamage. ****************************************************************************/ - -void fd_attempt_reopen(char *fname, int mode, file_fd_struct *fd_ptr) +static void fd_attempt_reopen(char *fname, int mode, file_fd_struct *fd_ptr) { int fd = sys_open( fname, O_RDWR, mode); @@ -1020,7 +1018,7 @@ void fd_attempt_reopen(char *fname, int mode, file_fd_struct *fd_ptr) fd support routines - attempt to close the file referenced by this fd. Decrements the ref_count and returns it. ****************************************************************************/ -int fd_attempt_close(file_fd_struct *fd_ptr) +static int fd_attempt_close(file_fd_struct *fd_ptr) { DEBUG(3,("fd_attempt_close on file_fd_struct %d, fd = %d, dev = %x, inode = %x, open_flags = %d, ref_count = %d.\n", fd_ptr - &FileFd[0], @@ -1060,6 +1058,7 @@ static void open_file(int fnum,int cnum,char *fname1,int flags,int mode, struct fsp->open = False; fsp->fd_ptr = 0; + fsp->granted_oplock = False; errno = EPERM; pstrcpy(fname,fname1); |