[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Fri Aug 5 10:25:01 UTC 2022
The branch, master has been updated
via 5075df4575d s3: smbd: Remove ugly SMB1-specific hack to filename_convert_dirfsp()
via 5c9404f7531 s3: smbd: Remove the ucf_flags parameter from extract_snapshot_token().
via d21cf6bbb18 s3: smbd: Cleanup - integer align. consumedcnt should be a size_t.
via 7ef1412f852 s3: smbd: Minor cleanup in parse_dfs_path().
via e5a49c310da s3: smbd: Remove 'bool posix_path' from struct dfs_path.
via f24ef117cfa s3: smbd: Change srvstr_get_path_internal() to always call check_path_syntaxXXX(), even on DFS pathnames.
from 972dd999b8d smbd: Fix a "set but not used" warning
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 5075df4575d9250fa53dcef024589084ad56062d
Author: Jeremy Allison <jra at samba.org>
Date: Thu Aug 4 11:32:05 2022 -0700
s3: smbd: Remove ugly SMB1-specific hack to filename_convert_dirfsp()
This was added due to the error code check in test_symlink_traversal_smb1_posix.sh.
After careful consideration I've realized the error code expected here
is incorrect, and not providing any security benefit.
We already check that trying to fetch a file/traverse through a
symlink that points outside of a share returns NT_STATUS_OBJECT_PATH_NOT_FOUND,
and this is enforced in the symlink checks already inside filename_convert_dirfsp().
If a symlink points to a directory within the share for which
the user has no permissions (as is tested here), then there's no
benefit in mapping the error code from NT_STATUS_ACCESS_DENIED
to NT_STATUS_OBJECT_PATH_NOT_FOUND, as we are not providing any
extra information about the filesystem state the user cannot already
obtain by normal SMB1+POSIX calls.
Change the error code expected in this single test from NT_STATUS_OBJECT_PATH_NOT_FOUND
to NT_STATUS_ACCESS_DENIED.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Fri Aug 5 10:24:23 UTC 2022 on sn-devel-184
commit 5c9404f753173465900c004e444174d247f692f6
Author: Jeremy Allison <jra at samba.org>
Date: Thu Aug 4 10:02:15 2022 -0700
s3: smbd: Remove the ucf_flags parameter from extract_snapshot_token().
Now we always call check_path_syntaxXXX(), even on DFS names
we no longer need this. It was a BAD change, and I should feel BAD :-).
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit d21cf6bbb18e6f83739caa457c983b361be789b4
Author: Jeremy Allison <jra at samba.org>
Date: Thu Aug 4 13:23:28 2022 -0700
s3: smbd: Cleanup - integer align. consumedcnt should be a size_t.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit 7ef1412f85273d27edbe4f8a02121c2d5d7479ac
Author: Jeremy Allison <jra at samba.org>
Date: Thu Aug 4 13:08:51 2022 -0700
s3: smbd: Minor cleanup in parse_dfs_path().
allow_wcards parameter is not used or looked at.
Remove it.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit e5a49c310da4b18e366762e073fc9244b96d1b46
Author: Jeremy Allison <jra at samba.org>
Date: Thu Aug 4 19:09:39 2022 -0700
s3: smbd: Remove 'bool posix_path' from struct dfs_path.
Nothing now sets or looks at it.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit f24ef117cfa195ef19b8130040555b75f42ae00b
Author: Jeremy Allison <jra at samba.org>
Date: Thu Aug 4 09:52:17 2022 -0700
s3: smbd: Change srvstr_get_path_internal() to always call check_path_syntaxXXX(), even on DFS pathnames.
The original design decision to just copy a DFS path and let
parse_dfs_path() take care of it was a horrible mistake.
Fix srvstr_get_path_internal() to always return a
/server/share/path (i.e. a path separated with '/', not '\').
This is a more complex change than I like to allow
DFS path procesing in srvstr_get_path_internal() but
needed as clients (including Samba smbclient) have a
rather "fuzzy" idea of what constitutes a valid DFS path.
If we detect the DFS path isn't valid here we have to
fall back to treating it as a local path.
I also need to modify the DFS parsing in
filename_convert_smb1_search_path() to cope with only '/'
separators.
This also means parse_dfs_path() needs changing to
cope.
The changes here are best reviewed by just applying
the fix and looking at the modified functions:
srvstr_get_path_internal()
parse_dfs_path()
For parse_dfs_path() it's mostly removing bad code
and makes parse_dfs_path() much easier to read.
These changes will enable me to remove some ugly mistakes made
adding ucf_flags to extract_snapshot_token(), as
we can now always assume canonicalized paths.
This is a little messy, but has to be done in
one chunk as the change to srvstr_get_path_internal()
depends on the change to parse_dfs_path().
Thanks to Volker for the insight that made this
cleanup possible.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/include/msdfs.h | 1 -
source3/modules/vfs_default.c | 2 +-
source3/rpc_server/dfs/srv_dfs_nt.c | 6 +-
.../tests/test_symlink_traversal_smb1_posix.sh | 2 +-
source3/smbd/filename.c | 42 +------
source3/smbd/msdfs.c | 130 +++++++++------------
source3/smbd/proto.h | 4 +-
source3/smbd/smb1_nttrans.c | 7 +-
source3/smbd/smb1_reply.c | 24 ++--
source3/smbd/smb1_trans2.c | 8 +-
source3/smbd/smb2_reply.c | 78 ++++++++++++-
source3/smbd/smb2_trans2.c | 8 +-
12 files changed, 159 insertions(+), 153 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/msdfs.h b/source3/include/msdfs.h
index 6a851cb3330..83265174373 100644
--- a/source3/include/msdfs.h
+++ b/source3/include/msdfs.h
@@ -61,7 +61,6 @@ struct dfs_path {
char *hostname;
char *servicename;
char *reqpath;
- bool posix_path;
};
#endif /* _MSDFS_H */
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 8e6cbfd3707..ef68a96282e 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -194,7 +194,7 @@ static NTSTATUS vfswrap_get_dfs_referrals(struct vfs_handle_struct *handle,
struct dfs_GetDFSReferral *r)
{
struct junction_map *junction = NULL;
- int consumedcnt = 0;
+ size_t consumedcnt = 0;
bool self_referral = false;
char *pathnamep = NULL;
char *local_dfs_path = NULL;
diff --git a/source3/rpc_server/dfs/srv_dfs_nt.c b/source3/rpc_server/dfs/srv_dfs_nt.c
index b69f7025191..a69494e3902 100644
--- a/source3/rpc_server/dfs/srv_dfs_nt.c
+++ b/source3/rpc_server/dfs/srv_dfs_nt.c
@@ -59,7 +59,7 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
struct junction_map *jn = NULL;
struct referral *old_referral_list = NULL;
bool self_ref = False;
- int consumedcnt = 0;
+ size_t consumedcnt = 0;
char *altpath = NULL;
NTSTATUS status;
TALLOC_CTX *ctx = talloc_tos();
@@ -137,7 +137,7 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r)
dcesrv_call_session_info(dce_call);
struct junction_map *jn = NULL;
bool self_ref = False;
- int consumedcnt = 0;
+ size_t consumedcnt = 0;
bool found = False;
TALLOC_CTX *ctx = talloc_tos();
char *altpath = NULL;
@@ -392,7 +392,7 @@ WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r)
dcesrv_connection_get_remote_address(dcesrv_conn);
struct auth_session_info *session_info =
dcesrv_call_session_info(dce_call);
- int consumedcnt = strlen(r->in.dfs_entry_path);
+ size_t consumedcnt = strlen(r->in.dfs_entry_path);
struct junction_map *jn = NULL;
bool self_ref = False;
TALLOC_CTX *ctx = talloc_tos();
diff --git a/source3/script/tests/test_symlink_traversal_smb1_posix.sh b/source3/script/tests/test_symlink_traversal_smb1_posix.sh
index 1bde9c4ffa1..1ad1d56f12a 100755
--- a/source3/script/tests/test_symlink_traversal_smb1_posix.sh
+++ b/source3/script/tests/test_symlink_traversal_smb1_posix.sh
@@ -252,7 +252,7 @@ test_symlink_traversal_SMB1_posix()
# Can't 'get' file inside a directory with no perms.
smbclient_expect_error "get" "dir_inside_share_noperms/noperm_file_exists" "" "NT_STATUS_ACCESS_DENIED" || return 1
# In SMB1+POSIX you can't traverse through a symlink that points to a noperm directory.
- smbclient_expect_error "get" "symlink_dir_inside_share_noperms/noperm_file_exists" "" "NT_STATUS_OBJECT_PATH_NOT_FOUND" || return 1
+ smbclient_expect_error "get" "symlink_dir_inside_share_noperms/noperm_file_exists" "" "NT_STATUS_ACCESS_DENIED" || return 1
# But can list the directory with no perms and the symlink to it.
smbclient_expect_error "ls" "dir_inside_share_noperms" "" "NT_STATUS_OK" || return 1
smbclient_expect_error "ls" "symlink_dir_inside_share_noperms" "" "NT_STATUS_OK" || return 1
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index e378bb72b32..87abc8be376 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -300,28 +300,14 @@ static bool find_snapshot_token(
return true;
}
-bool extract_snapshot_token(char *fname, uint32_t ucf_flags, NTTIME *twrp)
+bool extract_snapshot_token(char *fname, NTTIME *twrp)
{
const char *start = NULL;
const char *next = NULL;
size_t remaining;
bool found;
- bool posix_path = (ucf_flags & UCF_POSIX_PATHNAMES);
- bool msdfs_path = (ucf_flags & UCF_DFS_PATHNAME);
- if (msdfs_path && !posix_path) {
- /*
- * A raw (non-POSIX) MSDFS path looks like \server\share\path.
- * find_snapshot_token only looks for '/' separators.
- * Convert the separator characters in place.
- */
- string_replace(fname, '\\', '/');
- }
found = find_snapshot_token(fname, &start, &next, twrp);
- if (msdfs_path && !posix_path) {
- /* Put the original separators back. */
- string_replace(fname, '/', '\\');
- }
if (!found) {
return false;
}
@@ -360,7 +346,7 @@ NTSTATUS canonicalize_snapshot_path(struct smb_filename *smb_fname,
return NT_STATUS_OK;
}
- found = extract_snapshot_token(smb_fname->base_name, ucf_flags, &twrp);
+ found = extract_snapshot_token(smb_fname->base_name, &twrp);
if (!found) {
return NT_STATUS_OK;
}
@@ -1932,7 +1918,6 @@ NTSTATUS filename_convert_smb1_search_path(TALLOC_CTX *ctx,
char *p = NULL;
char *mask = NULL;
struct smb_filename *smb_fname = NULL;
- bool posix_pathnames = (ucf_flags & UCF_POSIX_PATHNAMES);
NTTIME twrp = 0;
*_smb_fname_out = NULL;
@@ -1942,17 +1927,14 @@ NTSTATUS filename_convert_smb1_search_path(TALLOC_CTX *ctx,
DBG_DEBUG("name_in: %s\n", name_in);
if (ucf_flags & UCF_GMT_PATHNAME) {
- extract_snapshot_token(name_in, ucf_flags, &twrp);
+ extract_snapshot_token(name_in, &twrp);
ucf_flags &= ~UCF_GMT_PATHNAME;
}
if (ucf_flags & UCF_DFS_PATHNAME) {
/*
* We've been given a raw DFS pathname.
- * In Windows mode this is separated by '\'
- * characters, in POSIX by '/' characters.
*/
- char path_sep = posix_pathnames ? '/' : '\\';
char *fname = NULL;
char *name_in_copy = NULL;
char *last_component = NULL;
@@ -1967,7 +1949,7 @@ NTSTATUS filename_convert_smb1_search_path(TALLOC_CTX *ctx,
* Now we know that the last component is the
* wildcard. Copy it and truncate to remove it.
*/
- p = strrchr_m(name_in_copy, path_sep);
+ p = strrchr(name_in_copy, '/');
if (p == NULL) {
last_component = talloc_strdup(ctx, name_in_copy);
name_in_copy[0] = '\0';
@@ -2835,22 +2817,6 @@ next:
&substitute,
&unparsed);
-#if defined(WITH_SMB1SERVER)
- /*
- * This isn't 100% correct, but it gets us close enough
- * to the old behavior for SMB1+POSIX libsmbclient. If we went through a
- * symlink, and we got NT_STATUS_ACCESS_DENIED on the directory
- * containing the target, just don't allow the client to see the
- * intermediate path.
- */
- if (!conn->sconn->using_smb2 &&
- (ucf_flags & UCF_POSIX_PATHNAMES) &&
- symlink_redirects > 0 &&
- NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
- return NT_STATUS_OBJECT_PATH_NOT_FOUND;
- }
-#endif
-
if (!NT_STATUS_EQUAL(status, NT_STATUS_STOPPED_ON_SYMLINK)) {
return status;
}
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 86dc3f4dd74..1f24c87ccbd 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -37,11 +37,13 @@
#include "source3/lib/substitute.h"
/**********************************************************************
- Parse a DFS pathname of the form \hostname\service\reqpath
+ Parse a DFS pathname of the form /hostname/service/reqpath
into the dfs_path structure.
- If POSIX pathnames is true, the pathname may also be of the
- form /hostname/service/reqpath.
- We cope with either here.
+
+ NB. srvstr_get_path_internal() now *always* calls
+ check_path_syntax_XXX() on an incoming name, so
+ the path separator is now always '/', even from
+ Windows clients.
Unfortunately, due to broken clients who might set the
SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES bit and then
@@ -58,18 +60,15 @@
static NTSTATUS parse_dfs_path(connection_struct *conn,
const char *pathname,
- bool allow_wcards,
bool allow_broken_path,
struct dfs_path *pdp) /* MUST BE TALLOCED */
{
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
char *pathname_local;
- char *p,*temp;
+ char *p;
char *servicename;
char *eos_ptr;
- NTSTATUS status = NT_STATUS_OK;
- char sepchar;
ZERO_STRUCTP(pdp);
@@ -80,30 +79,28 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
*/
pathname_local = talloc_strdup(pdp, pathname);
- if (!pathname_local) {
+ if (pathname_local == NULL) {
return NT_STATUS_NO_MEMORY;
}
+ /*
+ * parse_dfs_path() can be called from
+ * get_referred_path() and create_junction()
+ * which use Windows DFS paths of \server\share.
+ * Ensure we only have to cope with '/' separators.
+ */
+ string_replace(pathname_local, '\\', '/');
+
/* Get a pointer to the terminating '\0' */
eos_ptr = &pathname_local[strlen(pathname_local)];
- p = temp = pathname_local;
+ p = pathname_local;
/*
* Non-broken DFS paths *must* start with the
- * path separator. For Windows this is always '\\',
- * for posix paths this is always '/'.
+ * path separator '/'.
*/
- if (*pathname == '/') {
- pdp->posix_path = true;
- sepchar = '/';
- } else {
- pdp->posix_path = false;
- sepchar = '\\';
- }
-
- if (allow_broken_path && (*pathname != sepchar)) {
- DEBUG(10,("parse_dfs_path: path %s doesn't start with %c\n",
- pathname, sepchar ));
+ if (allow_broken_path && (*p != '/')) {
+ DBG_ERR("path %s doesn't start with /\n", p);
/*
* Possibly client sent a local path by mistake.
* Try and convert to a local path.
@@ -114,12 +111,7 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
pdp->hostname = eos_ptr; /* "" */
pdp->servicename = eos_ptr; /* "" */
- /* We've got no info about separators. */
- pdp->posix_path = lp_posix_pathnames();
- p = temp;
- DEBUG(10,("parse_dfs_path: trying to convert %s to a "
- "local path\n",
- temp));
+ DBG_ERR("trying to convert %s to a local path\n", p);
goto local_path;
}
@@ -127,17 +119,15 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
* Safe to use on talloc'ed string as it only shrinks.
* It also doesn't affect the eos_ptr.
*/
- trim_char(temp,sepchar,sepchar);
+ trim_char(p, '/', '/');
- DEBUG(10,("parse_dfs_path: temp = |%s| after trimming %c's\n",
- temp, sepchar));
+ DBG_ERR("p = |%s| after trimming /'s\n", p);
/* Now tokenize. */
/* Parse out hostname. */
- p = strchr_m(temp,sepchar);
+ p = strchr(p,'/');
if(p == NULL) {
- DEBUG(10,("parse_dfs_path: can't parse hostname from path %s\n",
- temp));
+ DBG_ERR("can't parse hostname from path %s\n", pathname_local);
/*
* Possibly client sent a local path by mistake.
* Try and convert to a local path.
@@ -146,20 +136,18 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
pdp->hostname = eos_ptr; /* "" */
pdp->servicename = eos_ptr; /* "" */
- p = temp;
- DEBUG(10,("parse_dfs_path: trying to convert %s "
- "to a local path\n",
- temp));
+ p = pathname_local;
+ DBG_ERR("trying to convert %s to a local path\n", p);
goto local_path;
}
*p = '\0';
- pdp->hostname = temp;
+ pdp->hostname = pathname_local;
- DEBUG(10,("parse_dfs_path: hostname: %s\n",pdp->hostname));
+ DBG_ERR("hostname: %s\n",pdp->hostname);
/* Parse out servicename. */
servicename = p+1;
- p = strchr_m(servicename,sepchar);
+ p = strchr(servicename, '/');
if (p) {
*p = '\0';
}
@@ -169,8 +157,7 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
|| (strequal(servicename, HOMES_NAME)
&& strequal(lp_servicename(talloc_tos(), lp_sub, SNUM(conn)),
get_current_username()) )) ) {
- DEBUG(10,("parse_dfs_path: %s is not our servicename\n",
- servicename));
+ DBG_ERR("%s is not our servicename\n", servicename);
/*
* Possibly client sent a local path by mistake.
@@ -183,21 +170,20 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
/* Repair the path - replace the sepchar's
we nulled out */
servicename--;
- *servicename = sepchar;
+ *servicename = '/';
if (p) {
- *p = sepchar;
+ *p = '/';
}
- p = temp;
- DEBUG(10,("parse_dfs_path: trying to convert %s "
- "to a local path\n",
- temp));
+ p = pathname_local;
+ DBG_ERR("trying to convert %s to a local path\n",
+ pathname_local);
goto local_path;
}
pdp->servicename = servicename;
- DEBUG(10,("parse_dfs_path: servicename: %s\n",pdp->servicename));
+ DBG_ERR("servicename: %s\n", pdp->servicename);
if(p == NULL) {
/* Client sent self referral \server\share. */
@@ -209,22 +195,14 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
local_path:
- pdp->reqpath = p;
-
- /* Rest is reqpath. */
- if (pdp->posix_path) {
- status = check_path_syntax_posix(pdp->reqpath);
- } else {
- status = check_path_syntax(pdp->reqpath);
- }
-
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10,("parse_dfs_path: '%s' failed with %s\n",
- p, nt_errstr(status) ));
- return status;
- }
+ /*
+ * As check_path_syntax_XXX() has already been
+ * called we know this is a normal path containing
+ * '/' separators.
+ */
- DEBUG(10,("parse_dfs_path: rest of the path: %s\n",pdp->reqpath));
+ pdp->reqpath = p;
+ DBG_ERR("rest of the path: %s\n", pdp->reqpath);
return NT_STATUS_OK;
}
@@ -688,7 +666,7 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
server+share+extrapath. */
uint32_t ucf_flags,
NTTIME *_twrp,
- int *consumedcntp,
+ size_t *consumedcntp,
struct referral **ppreflist,
size_t *preferral_count)
{
@@ -765,9 +743,7 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
status = NT_STATUS_NO_MEMORY;
goto out;
}
- if (!pdp->posix_path) {
- string_replace(canon_dfspath, '\\', '/');
- }
+ string_replace(canon_dfspath, '\\', '/');
/*
* localpath comes out of unix_convert, so it has
@@ -830,7 +806,7 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
if (consumedcntp) {
*consumedcntp = strlen(canon_dfspath);
DBG_DEBUG("Path consumed: %s "
- "(%d)\n",
+ "(%zu)\n",
canon_dfspath,
*consumedcntp);
}
@@ -894,7 +870,7 @@ NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
return NT_STATUS_NO_MEMORY;
}
- status = parse_dfs_path(conn, path_in, false,
+ status = parse_dfs_path(conn, path_in,
allow_broken_path, pdp);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(pdp);
@@ -952,7 +928,7 @@ NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
pdp,
ucf_flags,
_twrp, /* twrp. */
- NULL, /* int *consumedcntp */
+ NULL, /* size_t *consumedcntp */
NULL, /* struct referral **ppreflist */
NULL); /* size_t *preferral_count */
if (!NT_STATUS_IS_OK(status)) {
@@ -989,7 +965,7 @@ NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
static NTSTATUS self_ref(TALLOC_CTX *ctx,
const char *dfs_path,
struct junction_map *jucn,
- int *consumedcntp,
+ size_t *consumedcntp,
bool *self_referralp)
{
struct referral *ref;
@@ -1025,7 +1001,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
const struct tsocket_address *local_address,
bool allow_broken_path,
struct junction_map *jucn,
- int *consumedcntp,
+ size_t *consumedcntp,
bool *self_referralp)
{
TALLOC_CTX *frame = talloc_stackframe();
@@ -1044,7 +1020,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
*self_referralp = False;
- status = parse_dfs_path(NULL, dfs_path, False, allow_broken_path, pdp);
+ status = parse_dfs_path(NULL, dfs_path, allow_broken_path, pdp);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(frame);
return status;
@@ -1293,7 +1269,7 @@ bool create_junction(TALLOC_CTX *ctx,
if (!pdp) {
return False;
}
- status = parse_dfs_path(NULL, dfs_path, False, allow_broken_path, pdp);
+ status = parse_dfs_path(NULL, dfs_path, allow_broken_path, pdp);
if (!NT_STATUS_IS_OK(status)) {
return False;
}
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 8f3182a025e..daef19f13f7 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -356,7 +356,7 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
NTTIME twrp,
struct smb_filename **smb_fname,
uint32_t ucf_flags);
-bool extract_snapshot_token(char *fname, uint32_t ucf_flags, NTTIME *twrp);
+bool extract_snapshot_token(char *fname, NTTIME *twrp);
NTSTATUS canonicalize_snapshot_path(struct smb_filename *smb_fname,
uint32_t ucf_flags,
NTTIME twrp);
@@ -538,7 +538,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
const struct tsocket_address *local_address,
bool allow_broken_path,
struct junction_map *jucn,
- int *consumedcntp,
+ size_t *consumedcntp,
bool *self_referralp);
int setup_dfs_referral(connection_struct *orig_conn,
const char *dfs_path,
diff --git a/source3/smbd/smb1_nttrans.c b/source3/smbd/smb1_nttrans.c
index 05f341ae505..4a0cfcc1133 100644
--- a/source3/smbd/smb1_nttrans.c
+++ b/source3/smbd/smb1_nttrans.c
@@ -626,7 +626,7 @@ void reply_ntcreate_and_X(struct smb_request *req)
ucf_flags = filename_create_ucf_flags(req, create_disposition);
if (ucf_flags & UCF_GMT_PATHNAME) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list