summaryrefslogtreecommitdiff
path: root/source3/smbd/dir.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-09-11 23:57:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:41 -0500
commit3a9d3821649c9ea88a6cd424f0838a453165a00a (patch)
tree4b4f61570a20e0a252436ebd88b1d0dee58c704e /source3/smbd/dir.c
parent1ef2464451ee64023173637fa03e703405dc8c85 (diff)
downloadsamba-3a9d3821649c9ea88a6cd424f0838a453165a00a.tar.gz
samba-3a9d3821649c9ea88a6cd424f0838a453165a00a.tar.bz2
samba-3a9d3821649c9ea88a6cd424f0838a453165a00a.zip
r25111: Move to talloced pathnames on most code paths.
There are now ony 17 pstrings left in reply.c, and these will be easy to remove (and I'll be doing that shortly). Had to fix an interesting bug in pull_ucs2_base_talloc() when a source string is not null terminated :-). Jeremy. (This used to be commit 0c9a8c4dff10974dbffd2a302ae982896122fcc0)
Diffstat (limited to 'source3/smbd/dir.c')
-rw-r--r--source3/smbd/dir.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index b21e6501d6..7a6815b680 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -752,8 +752,9 @@ BOOL dir_check_ftype(connection_struct *conn, uint32 mode, uint32 dirtype)
return True;
}
-static BOOL mangle_mask_match(connection_struct *conn, const char *filename,
- char *mask)
+static BOOL mangle_mask_match(connection_struct *conn,
+ const char *filename,
+ const char *mask)
{
char mname[13];
@@ -791,11 +792,11 @@ BOOL get_dir_entry(connection_struct *conn,char *mask,uint32 dirtype, pstring fn
DEBUG(6,("readdir on dirptr 0x%lx now at offset %ld\n",
(long)conn->dirptr,TellDir(conn->dirptr->dir_hnd)));
-
- if (dname == NULL)
+
+ if (dname == NULL)
return(False);
-
- pstrcpy(filename,dname);
+
+ pstrcpy(filename,dname);
/* notice the special *.* handling. This appears to be the only difference
between the wildcard handling in this routine and in the trans2 routines.