summaryrefslogtreecommitdiff
path: root/source3/smbd/msdfs.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-07 22:12:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:28 -0500
commit7b2c2e415543aaee13193be1bd11706f2528c692 (patch)
tree336321f4e3a5cc3d83128bb407ea027bdbfde4c4 /source3/smbd/msdfs.c
parentb7d96fdc0446bfce2aff5ddbe9c04f7400b6c9a0 (diff)
downloadsamba-7b2c2e415543aaee13193be1bd11706f2528c692.tar.gz
samba-7b2c2e415543aaee13193be1bd11706f2528c692.tar.bz2
samba-7b2c2e415543aaee13193be1bd11706f2528c692.zip
r21754: Volker is completely correct. There's no need for
the RESOLVE_DFSPATH macros and their varients any more. Fix reporting profile bug with all error returns. Jeremy. (This used to be commit cdf0fdb1049fd68b46885cbea887dc0e595fa524)
Diffstat (limited to 'source3/smbd/msdfs.c')
-rw-r--r--source3/smbd/msdfs.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index c24cdcc708..f06bb3b044 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -3,6 +3,7 @@
Version 3.0
MSDfs services for Samba
Copyright (C) Shirish Kalele 2000
+ Copyright (C) Jeremy Allison 2007
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
@@ -435,7 +436,7 @@ static BOOL resolve_dfs_path(TALLOC_CTX *ctx,
for details.
*****************************************************************/
-BOOL dfs_redirect( pstring pathname, connection_struct *conn, BOOL search_wcard_flag )
+static BOOL dfs_redirect( connection_struct *conn, pstring pathname, BOOL search_wcard_flag )
{
struct dfs_path dp;
@@ -1149,3 +1150,32 @@ int enum_msdfs_links(TALLOC_CTX *ctx, struct junction_map *jucn, int jn_max)
}
return jn_count;
}
+
+/******************************************************************************
+ Core function to resolve a dfs pathname.
+******************************************************************************/
+
+BOOL resolve_dfspath(connection_struct *conn, BOOL dfs_pathnames, pstring name)
+{
+ if (dfs_pathnames && lp_host_msdfs() && lp_msdfs_root(SNUM(conn)) &&
+ dfs_redirect(conn, name, False)) {
+ return False; /* Pathname didn't resolve. */
+ }
+ return True;
+}
+
+/******************************************************************************
+ Core function to resolve a dfs pathname possibly containing a wildcard.
+ This function is identical to the above except for the BOOL param to
+ dfs_redirect but I need this to be separate so it's really clear when
+ we're allowing wildcards and when we're not. JRA.
+******************************************************************************/
+
+BOOL resolve_dfspath_wcard(connection_struct *conn, BOOL dfs_pathnames, pstring name)
+{
+ if (dfs_pathnames && lp_host_msdfs() && lp_msdfs_root(SNUM(conn)) &&
+ dfs_redirect(conn, name, True)) {
+ return False; /* Pathname didn't resolve. */
+ }
+ return True;
+}