summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2020-02-12 13:54:08 -0800
committerRalph Boehme <slow@samba.org>2020-02-18 22:34:16 +0000
commit9ee1320049cf148a2bb102bbdee4a4bcc24c0de1 (patch)
tree91c21364c399658dc798ba1e91fe55f7b87e942b
parent94068b5438013479b0426fea7f83bbd7f8f935e9 (diff)
downloadsamba-9ee1320049cf148a2bb102bbdee4a4bcc24c0de1.tar.gz
s3: DFS: Remove is_msdfs_link_internal() - no longer used.
All DFS links are now read through the VFS and not via symlink calls. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Tue Feb 18 22:34:16 UTC 2020 on sn-devel-184
-rw-r--r--source3/smbd/msdfs.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 6a6ee3fd5f2..cc32ebc9d29 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -620,80 +620,6 @@ bool parse_msdfs_symlink(TALLOC_CTX *ctx,
return true;
}
-#if 0
-/**********************************************************************
- Returns true if the unix path is a valid msdfs symlink and also
- returns the target string from inside the link.
-**********************************************************************/
-
-static bool is_msdfs_link_internal(TALLOC_CTX *ctx,
- connection_struct *conn,
- struct smb_filename *smb_fname,
- char **pp_link_target)
-{
- int referral_len = 0;
-#if defined(HAVE_BROKEN_READLINK)
- char link_target_buf[PATH_MAX];
-#else
- char link_target_buf[7];
-#endif
- size_t bufsize = 0;
- char *link_target = NULL;
-
- if (pp_link_target) {
- bufsize = 1024;
- link_target = talloc_array(ctx, char, bufsize);
- if (!link_target) {
- return False;
- }
- *pp_link_target = link_target;
- } else {
- bufsize = sizeof(link_target_buf);
- link_target = link_target_buf;
- }
-
- if (SMB_VFS_LSTAT(conn, smb_fname) != 0) {
- DEBUG(5,("is_msdfs_link_read_target: %s does not exist.\n",
- smb_fname->base_name));
- goto err;
- }
- if (!S_ISLNK(smb_fname->st.st_ex_mode)) {
- DEBUG(5,("is_msdfs_link_read_target: %s is not a link.\n",
- smb_fname->base_name));
- goto err;
- }
-
- referral_len = SMB_VFS_READLINKAT(conn,
- conn->cwd_fsp,
- smb_fname,
- link_target,
- bufsize - 1);
-
- if (referral_len == -1) {
- DEBUG(0,("is_msdfs_link_read_target: Error reading "
- "msdfs link %s: %s\n",
- smb_fname->base_name, strerror(errno)));
- goto err;
- }
- link_target[referral_len] = '\0';
-
- DEBUG(5,("is_msdfs_link_internal: %s -> %s\n", smb_fname->base_name,
- link_target));
-
- if (!strnequal(link_target, "msdfs:", 6)) {
- goto err;
- }
- return True;
-
- err:
-
- if (link_target != link_target_buf) {
- TALLOC_FREE(link_target);
- }
- return False;
-}
-#endif
-
/**********************************************************************
Returns true if the unix path is a valid msdfs symlink.
**********************************************************************/