diff options
author | Jeremy Allison <jra@samba.org> | 2009-06-18 15:07:14 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-06-18 15:07:14 -0700 |
commit | d2da9dee686881106678d50a96713f0632dcdf10 (patch) | |
tree | 9b46c0c510a995414e07d2cda99c40123f88e5f6 /source3/smbd/reply.c | |
parent | 34267482d53cb559cc40c4ec2bee929c21b7886b (diff) | |
download | samba-d2da9dee686881106678d50a96713f0632dcdf10.tar.gz samba-d2da9dee686881106678d50a96713f0632dcdf10.tar.bz2 samba-d2da9dee686881106678d50a96713f0632dcdf10.zip |
Add some const to the stat struct in the dosmode calls.
Fix a couple more unix_convert uses to filename_convert.
Fix bug in acl_group_override() where an uninitialized
struct could be used. Move unix_convert with wildcard
use in SMBsearch reply to boilerplate code.
Jeremy.
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index f11f3bfed7..9544b845da 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1323,6 +1323,7 @@ static NTSTATUS split_fname_dir_mask(TALLOC_CTX *ctx, const char *fname_in, void reply_search(struct smb_request *req) { connection_struct *conn = req->conn; + char *path = NULL; const char *mask = NULL; char *directory = NULL; char *fname = NULL; @@ -1335,7 +1336,6 @@ void reply_search(struct smb_request *req) bool finished = False; const char *p; int status_len; - char *path = NULL; char status[21]; int dptr_num= -1; bool check_descend = False; @@ -1377,23 +1377,6 @@ void reply_search(struct smb_request *req) return; } - nt_status = resolve_dfspath_wcard(ctx, conn, - req->flags2 & FLAGS2_DFS_PATHNAMES, - path, - &path, - &mask_contains_wcard); - if (!NT_STATUS_IS_OK(nt_status)) { - if (NT_STATUS_EQUAL(nt_status,NT_STATUS_PATH_NOT_COVERED)) { - reply_botherror(req, NT_STATUS_PATH_NOT_COVERED, - ERRSRV, ERRbadpath); - END_PROFILE(SMBsearch); - return; - } - reply_nterror(req, nt_status); - END_PROFILE(SMBsearch); - return; - } - p++; status_len = SVAL(p, 0); p += 2; @@ -1403,6 +1386,23 @@ void reply_search(struct smb_request *req) if (status_len == 0) { struct smb_filename *smb_fname = NULL; + nt_status = resolve_dfspath_wcard(ctx, conn, + req->flags2 & FLAGS2_DFS_PATHNAMES, + path, + &path, + &mask_contains_wcard); + if (!NT_STATUS_IS_OK(nt_status)) { + if (NT_STATUS_EQUAL(nt_status,NT_STATUS_PATH_NOT_COVERED)) { + reply_botherror(req, NT_STATUS_PATH_NOT_COVERED, + ERRSRV, ERRbadpath); + END_PROFILE(SMBsearch); + return; + } + reply_nterror(req, nt_status); + END_PROFILE(SMBsearch); + return; + } + nt_status = unix_convert(ctx, conn, path, &smb_fname, UCF_ALLOW_WCARD_LCOMP); if (!NT_STATUS_IS_OK(nt_status)) { |