diff options
author | Jeremy Allison <jra@samba.org> | 2007-03-07 22:12:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:28 -0500 |
commit | cdf0fdb1049fd68b46885cbea887dc0e595fa524 (patch) | |
tree | a65f32e375bcb8fa629b445e1dfbda00e43cd0ce /source/smbd/msdfs.c | |
parent | c1cfeb61a1d36d5cd219b5f5a7a84649e2028c4d (diff) | |
download | samba-cdf0fdb1049fd68b46885cbea887dc0e595fa524.tar.gz samba-cdf0fdb1049fd68b46885cbea887dc0e595fa524.tar.xz samba-cdf0fdb1049fd68b46885cbea887dc0e595fa524.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.
Diffstat (limited to 'source/smbd/msdfs.c')
-rw-r--r-- | source/smbd/msdfs.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/source/smbd/msdfs.c b/source/smbd/msdfs.c index c24cdcc7086..f06bb3b044d 100644 --- a/source/smbd/msdfs.c +++ b/source/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; +} |