diff options
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/clifile.c | 6 | ||||
-rw-r--r-- | source4/libcli/clitrans2.c | 4 | ||||
-rw-r--r-- | source4/libcli/config.m4 | 1 | ||||
-rw-r--r-- | source4/libcli/util/cliutil.c | 109 |
4 files changed, 5 insertions, 115 deletions
diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c index b233064085..cdb29beb2d 100644 --- a/source4/libcli/clifile.c +++ b/source4/libcli/clifile.c @@ -429,7 +429,7 @@ NTSTATUS smbcli_unlock(struct smbcli_tree *tree, int fnum, uint32_t offset, uint Lock a file with 64 bit offsets. ****************************************************************************/ NTSTATUS smbcli_lock64(struct smbcli_tree *tree, int fnum, - SMB_OFF_T offset, SMB_OFF_T len, int timeout, + off_t offset, off_t len, int timeout, enum brl_type lock_type) { union smb_lock parms; @@ -464,8 +464,8 @@ NTSTATUS smbcli_lock64(struct smbcli_tree *tree, int fnum, /**************************************************************************** Unlock a file with 64 bit offsets. ****************************************************************************/ -NTSTATUS smbcli_unlock64(struct smbcli_tree *tree, int fnum, SMB_OFF_T offset, - SMB_OFF_T len) +NTSTATUS smbcli_unlock64(struct smbcli_tree *tree, int fnum, off_t offset, + off_t len) { union smb_lock parms; struct smb_lock_entry lock[1]; diff --git a/source4/libcli/clitrans2.c b/source4/libcli/clitrans2.c index 7a37df6e1f..eb2c671a95 100644 --- a/source4/libcli/clitrans2.c +++ b/source4/libcli/clitrans2.c @@ -67,7 +67,7 @@ send a qpathinfo call with the SMB_QUERY_FILE_ALL_INFO info level NTSTATUS smbcli_qpathinfo2(struct smbcli_tree *tree, const char *fname, time_t *c_time, time_t *a_time, time_t *m_time, time_t *w_time, size_t *size, uint16_t *mode, - SMB_INO_T *ino) + ino_t *ino) { union smb_fileinfo parms; TALLOC_CTX *mem_ctx; @@ -143,7 +143,7 @@ send a qfileinfo call NTSTATUS smbcli_qfileinfo(struct smbcli_tree *tree, int fnum, uint16_t *mode, size_t *size, time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino) + time_t *w_time, ino_t *ino) { union smb_fileinfo parms; TALLOC_CTX *mem_ctx; diff --git a/source4/libcli/config.m4 b/source4/libcli/config.m4 index 41f7ad6812..32a62dbb20 100644 --- a/source4/libcli/config.m4 +++ b/source4/libcli/config.m4 @@ -34,7 +34,6 @@ SMB_SUBSYSTEM(LIBCLI_UTILS,[], libcli/util/doserr.o libcli/util/errormap.o libcli/util/clierror.o - libcli/util/cliutil.o libcli/util/nterr.o libcli/util/smbdes.o libcli/util/smbencrypt.o diff --git a/source4/libcli/util/cliutil.c b/source4/libcli/util/cliutil.c deleted file mode 100644 index ead09c4b41..0000000000 --- a/source4/libcli/util/cliutil.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - Unix SMB/CIFS implementation. - client utility routines - Copyright (C) Andrew Tridgell 2001 - Copyright (C) James Myers 2003 <myersjj@samba.org> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "includes.h" -#include "libcli/raw/libcliraw.h" - -/******************************************************************* - Functions nicked from lib/util.c needed by client. -*******************************************************************/ - -/******************************************************************* - A wrapper that handles case sensitivity and the special handling - of the ".." name. -*******************************************************************/ - -BOOL mask_match(struct smbcli_state *cli, const char *string, char *pattern, BOOL is_case_sensitive) -{ - fstring p2, s2; - - if (strcmp(string,"..") == 0) - string = "."; - if (strcmp(pattern,".") == 0) - return False; - - if (is_case_sensitive) - return ms_fnmatch(pattern, string, - cli->transport->negotiate.protocol) == 0; - - fstrcpy(p2, pattern); - fstrcpy(s2, string); - strlower(p2); - strlower(s2); - return ms_fnmatch(p2, s2, cli->transport->negotiate.protocol) == 0; -} - -/**************************************************************************** - Put up a yes/no prompt. -****************************************************************************/ - -BOOL yesno(char *p) -{ - pstring ans; - printf("%s",p); - - if (!fgets(ans,sizeof(ans)-1,stdin)) - return(False); - - if (*ans == 'y' || *ans == 'Y') - return(True); - - return(False); -} - -/******************************************************************* - A readdir wrapper which just returns the file name. - ********************************************************************/ - -const char *readdirname(DIR *p) -{ - struct smb_dirent *ptr; - char *dname; - - if (!p) - return(NULL); - - ptr = (struct smb_dirent *)sys_readdir(p); - if (!ptr) - return(NULL); - - dname = ptr->d_name; - -#ifdef NEXT2 - if (telldir(p) < 0) - return(NULL); -#endif - -#ifdef HAVE_BROKEN_READDIR - /* using /usr/ucb/cc is BAD */ - dname = dname - 2; -#endif - - { - static pstring buf; - int len = NAMLEN(ptr); - memcpy(buf, dname, len); - buf[len] = 0; - dname = buf; - } - - return(dname); -} |