summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-16 13:23:12 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-16 13:23:12 +0000
commitc6cf08774114a906645a405dea8a7546d614de35 (patch)
tree004c26e77ad97565896024ca1c9b8134cc213128 /source3
parent400bb4bfab01a6c262b15658dee5c0d011d0e883 (diff)
downloadsamba-c6cf08774114a906645a405dea8a7546d614de35.tar.gz
samba-c6cf08774114a906645a405dea8a7546d614de35.tar.bz2
samba-c6cf08774114a906645a405dea8a7546d614de35.zip
Add const.
(This used to be commit 5371720971bc60a4cfba0460614306f322aa10b8)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/dir.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 95acf4a262..ec570d3a18 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -578,7 +578,7 @@ BOOL dir_check_ftype(connection_struct *conn,int mode,SMB_STRUCT_STAT *st,int di
return True;
}
-static BOOL mangle_mask_match(connection_struct *conn, char *filename, char *mask)
+static BOOL mangle_mask_match(connection_struct *conn, fstring filename, char *mask)
{
mangle_map(filename,True,False,SNUM(conn));
return mask_match(filename,mask,False);
@@ -588,10 +588,10 @@ static BOOL mangle_mask_match(connection_struct *conn, char *filename, char *mas
Get an 8.3 directory entry.
****************************************************************************/
-BOOL get_dir_entry(connection_struct *conn,char *mask,int dirtype,char *fname,
+BOOL get_dir_entry(connection_struct *conn,char *mask,int dirtype, pstring fname,
SMB_OFF_T *size,int *mode,time_t *date,BOOL check_descend)
{
- char *dname;
+ const char *dname;
BOOL found = False;
SMB_STRUCT_STAT sbuf;
pstring path;
@@ -627,8 +627,8 @@ BOOL get_dir_entry(connection_struct *conn,char *mask,int dirtype,char *fname,
see masktest for a demo
*/
if ((strcmp(mask,"*.*") == 0) ||
- mask_match(filename,mask,False) ||
- mangle_mask_match(conn,filename,mask)) {
+ mask_match(filename,mask,False) ||
+ mangle_mask_match(conn,filename,mask)) {
if (isrootdir && (strequal(filename,"..") || strequal(filename,".")))
continue;
@@ -907,7 +907,7 @@ void *OpenDir(connection_struct *conn, const char *name, BOOL use_veto)
dirp->current = dirp->data;
}
- safe_strcpy(dirp->data+used,n, dirp->mallocsize - used - 1);
+ safe_strcpy_base(dirp->data+used,n, dirp->data, dirp->mallocsize);
used += l;
dirp->numentries++;
}
@@ -933,7 +933,7 @@ void CloseDir(void *p)
Read from a directory.
********************************************************************/
-char *ReadDirName(void *p)
+const char *ReadDirName(void *p)
{
char *ret;
Dir *dirp = (Dir *)p;