static int alloc_append_client_suffix(vfs_handle_struct *handle,
char **path)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with *path '%s'\n", *path));
-
int status = 0;
char *raddr = NULL;
+ DEBUG(MH_INFO_DEBUG, ("Entering with *path '%s'\n", *path));
+
raddr = tsocket_address_inet_addr_string(
handle->conn->sconn->remote_address, talloc_tos());
if (raddr == NULL)
*/
static bool is_apple_double(const char* fname)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with fname '%s'\n", fname));
-
bool ret = False;
+ DEBUG(MH_INFO_DEBUG, ("Entering with fname '%s'\n", fname));
+
if (strncmp(APPLE_DOUBLE_PREFIX, fname, APPLE_DOUBLE_PREFIX_LEN)
== 0)
{
static bool starts_with_media_dir(const char* media_dirname,
size_t media_dirname_len, const char* path)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with media_dirname '%s' "
- "path '%s'\n", media_dirname, path));
-
bool ret = False;
char* path_start;
+ DEBUG(MH_INFO_DEBUG, ("Entering with media_dirname '%s' "
+ "path '%s'\n", media_dirname, path));
+
/* Sometimes Samba gives us "./OMFI MediaFiles". */
if (strncmp(path, "./", 2) == 0)
{
*/
static bool is_in_media_files(const char* path)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
-
bool ret = False;
+ DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
+
if (
starts_with_media_dir(AVID_MEDIAFILES_DIRNAME,
AVID_MEDIAFILES_DIRNAME_LEN, path)
static int depth_from_media_dir(const char* media_dirname,
size_t media_dirname_len, const char* path)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with media_dirname '%s' "
- "path '%s'\n", media_dirname, path));
int transition_count = 0;
char* path_start;
char* pathPtr;
+ DEBUG(MH_INFO_DEBUG, ("Entering with media_dirname '%s' "
+ "path '%s'\n", media_dirname, path));
+
/* Sometimes Samba gives us "./OMFI MediaFiles". */
if (strncmp(path, "./", 2) == 0)
{
const char *avid_db_filename,
const size_t avid_db_filename_len)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with path '%s', "
- "avid_db_filename '%s', "
- "path_len '%i', "
- "avid_db_filename_len '%i'\n",
- path, avid_db_filename,
- path_len, avid_db_filename_len));
-
bool ret = False;
+ DEBUG(MH_INFO_DEBUG, ("Entering with path '%s', "
+ "avid_db_filename '%s', "
+ "path_len '%i', "
+ "avid_db_filename_len '%i'\n",
+ path, avid_db_filename,
+ path_len, avid_db_filename_len));
+
if (
path_len > avid_db_filename_len
&&
const char *path,
char **newPath)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
-
/* replace /CREATING_DIRNAME/ or /._CREATING_DIRNAME/
* directory in path - potentially in middle of path
* - with suffixed name.
*/
int status = 0;
char* pathPtr;
+ size_t intermPathLen;
+
+ DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
+
*newPath = talloc_strdup(ctx, path);
if (*newPath == NULL)
{
/* replace /MDB_FILENAME or /PMR_FILENAME or /._MDB_FILENAME
* or /._PMR_FILENAME at newPath end with suffixed name.
*/
- size_t intermPathLen = strlen(*newPath);
+ intermPathLen = strlen(*newPath);
if (
is_avid_database(*newPath, intermPathLen,
MDB_FILENAME, MDB_FILENAME_LEN)
const struct smb_filename *smb_fname,
struct smb_filename **clientFname)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with smb_fname->base_name '%s'\n",
- smb_fname->base_name));
-
int status = 0;
NTSTATUS copystatus;
+ DEBUG(MH_INFO_DEBUG, ("Entering with smb_fname->base_name '%s'\n",
+ smb_fname->base_name));
+
copystatus = copy_smb_filename(ctx, smb_fname, clientFname);
if (!NT_STATUS_IS_OK(copystatus))
{
char **path,
const char *avid_db_filename)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with avid_db_filename '%s'\n",
- avid_db_filename));
-
int status = 0;
+ DEBUG(MH_INFO_DEBUG, ("Entering with avid_db_filename '%s'\n",
+ avid_db_filename));
+
if ((*path = talloc_strdup(ctx, avid_db_filename)) == NULL)
{
DEBUG(MH_ERR_DEBUG, ("alloc_set_client_dirinfo_path "
struct smb_filename **clientFname,
int (*statFn)(const char *, SMB_STRUCT_STAT *, bool))
{
- DEBUG(MH_INFO_DEBUG, ("Entering with (*clientFname)->base_name "
- "'%s', (*clientFname)->st.st_ex_mtime %s",
- (*clientFname)->base_name,
- ctime(&((*clientFname)->st.st_ex_mtime.tv_sec))));
-
int status = 0;
+ char *statPath;
+ SMB_STRUCT_STAT fakeStat;
+ int copy_len;
+
+ DEBUG(MH_INFO_DEBUG, ("Entering with (*clientFname)->base_name "
+ "'%s', (*clientFname)->st.st_ex_mtime %s",
+ (*clientFname)->base_name,
+ ctime(&((*clientFname)->st.st_ex_mtime.tv_sec))));
if (
depth_from_media_dir(AVID_MXF_DIRNAME,
goto out;
}
- char *statPath;
- SMB_STRUCT_STAT fakeStat;
- int copy_len = strlen((*clientFname)->base_name);
+ copy_len = strlen((*clientFname)->base_name);
/* Hack to deal with occasional "Avid MediaFiles/MXF/1/." paths.
* We know we're under a media dir, so paths are at least 2 chars
const char *path,
struct vfs_statvfs_struct *statbuf)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
-
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
+
+ DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
if (!is_in_media_files(path))
{
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
const char *fname,
struct mh_dirinfo_struct **dirInfo)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with fname '%s'\n", fname));
-
int status = 0;
+ char *clientPath;
+ TALLOC_CTX *ctx;
+
+ DEBUG(MH_INFO_DEBUG, ("Entering with fname '%s'\n", fname));
*dirInfo = talloc(NULL, struct mh_dirinfo_struct);
if (*dirInfo == NULL)
goto err;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if (alloc_get_client_path(handle, ctx,
fname,
const char *mask,
uint32 attr)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with fname '%s'\n", fname));
-
struct mh_dirinfo_struct *dirInfo;
+ DEBUG(MH_INFO_DEBUG, ("Entering with fname '%s'\n", fname));
+
if (alloc_set_client_dirinfo(handle, fname, &dirInfo))
{
goto err;
const char *mask,
uint32 attr)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with fsp->fsp_name->base_name '%s'\n",
- fsp->fsp_name->base_name));
-
struct mh_dirinfo_struct *dirInfo;
DIR *dirstream;
+ DEBUG(MH_INFO_DEBUG, ("Entering with fsp->fsp_name->base_name '%s'\n",
+ fsp->fsp_name->base_name));
+
dirstream = SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
if (!dirstream)
{
DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
- DEBUG(MH_INFO_DEBUG, ("Entering mh_readdir\n"));
-
mh_dirinfo_struct* dirInfo = (mh_dirinfo_struct*)dirp;
+ struct dirent *d = NULL;
+ int skip;
- DEBUG(MH_INFO_DEBUG, ("dirInfo->dirpath '%s', "
- "dirInfo->clientPath '%s', "
- "dirInfo->isInMediaFiles '%s', "
- "dirInfo->clientMDBFilename '%s', "
- "dirInfo->clientPMRFilename '%s', "
- "dirInfo->clientCreatingDirname '%s'\n",
- dirInfo->dirpath,
- dirInfo->clientPath,
- dirInfo->isInMediaFiles ? "True" : "False",
- dirInfo->clientMDBFilename,
- dirInfo->clientPMRFilename,
- dirInfo->clientCreatingDirname));
+ DEBUG(MH_INFO_DEBUG, ("Entering mh_readdir\n"));
- struct dirent *d = NULL;
+ DEBUG(MH_INFO_DEBUG, ("dirInfo->dirpath '%s', "
+ "dirInfo->clientPath '%s', "
+ "dirInfo->isInMediaFiles '%s', "
+ "dirInfo->clientMDBFilename '%s', "
+ "dirInfo->clientPMRFilename '%s', "
+ "dirInfo->clientCreatingDirname '%s'\n",
+ dirInfo->dirpath,
+ dirInfo->clientPath,
+ dirInfo->isInMediaFiles ? "True" : "False",
+ dirInfo->clientMDBFilename,
+ dirInfo->clientPMRFilename,
+ dirInfo->clientCreatingDirname));
if (! dirInfo->isInMediaFiles)
{
goto out;
}
- int skip;
do
{
+ const char* dname;
+ bool isAppleDouble;
+
skip = False;
d = SMB_VFS_NEXT_READDIR(handle, dirInfo->dirstream, sbuf);
break;
}
- const char* dname;
- bool isAppleDouble;
-
/* ignore apple double prefix for logic below */
if (is_apple_double(d->d_name))
{
const char *path,
mode_t mode)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
-
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
+
+
+ DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
if (!is_in_media_files(path))
{
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
static int mh_rmdir(vfs_handle_struct *handle,
const char *path)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
-
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
+
+
+ DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
if (!is_in_media_files(path))
{
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
static int mh_closedir(vfs_handle_struct *handle,
DIR *dirp)
{
- DEBUG(MH_INFO_DEBUG, ("Entering mh_closedir\n"));
DIR *realdirp = ((mh_dirinfo_struct*)dirp)->dirstream;
+
+ DEBUG(MH_INFO_DEBUG, ("Entering mh_closedir\n"));
// Will this talloc_free destroy realdirp?
TALLOC_FREE(dirp);
int flags,
mode_t mode)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with smb_fname->base_name '%s'\n",
- smb_fname->base_name));
-
int ret;
+ struct smb_filename *clientFname;
+ TALLOC_CTX *ctx;
+
+
+ DEBUG(MH_INFO_DEBUG, ("Entering with smb_fname->base_name '%s'\n",
+ smb_fname->base_name));
if (!is_in_media_files(smb_fname->base_name))
{
goto out;
}
- struct smb_filename *clientFname = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientFname = NULL;
+ ctx = talloc_tos();
if(alloc_get_client_smb_fname(handle, ctx,
smb_fname,
int *pinfo)
{
NTSTATUS status;
+ struct smb_filename *clientFname;
+ TALLOC_CTX *ctx;
+
DEBUG(MH_INFO_DEBUG, ("Entering with smb_fname->base_name '%s'\n",
smb_fname->base_name));
goto out;
}
- struct smb_filename *clientFname = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientFname = NULL;
+ ctx = talloc_tos();
if (alloc_get_client_smb_fname(handle, ctx,
smb_fname,
const struct smb_filename *smb_fname_src,
const struct smb_filename *smb_fname_dst)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with "
- "smb_fname_src->base_name '%s', "
- "smb_fname_dst->base_name '%s'\n",
- smb_fname_src->base_name,
- smb_fname_dst->base_name));
-
int status;
+ struct smb_filename *srcClientFname;
+ struct smb_filename *dstClientFname;
+ TALLOC_CTX *ctx;
+
+
+ DEBUG(MH_INFO_DEBUG, ("Entering with "
+ "smb_fname_src->base_name '%s', "
+ "smb_fname_dst->base_name '%s'\n",
+ smb_fname_src->base_name,
+ smb_fname_dst->base_name));
if (!is_in_media_files(smb_fname_src->base_name)
&&
goto out;
}
- struct smb_filename *srcClientFname = NULL;
- struct smb_filename *dstClientFname = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ srcClientFname = NULL;
+ dstClientFname = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_smb_fname(handle, ctx,
smb_fname_src,
static int mh_stat(vfs_handle_struct *handle,
struct smb_filename *smb_fname)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with smb_fname->base_name '%s'\n",
- smb_fname->base_name));
-
int status = 0;
+ struct smb_filename *clientFname;
+ TALLOC_CTX *ctx;
+
+
+ DEBUG(MH_INFO_DEBUG, ("Entering with smb_fname->base_name '%s'\n",
+ smb_fname->base_name));
if (!is_in_media_files(smb_fname->base_name))
{
goto out;
}
- struct smb_filename *clientFname = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientFname = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_smb_fname(handle, ctx,
smb_fname,
static int mh_lstat(vfs_handle_struct *handle,
struct smb_filename *smb_fname)
{
- DEBUG(MH_INFO_DEBUG, ("Entering with smb_fname->base_name '%s'\n",
- smb_fname->base_name));
-
int status = 0;
+ struct smb_filename *clientFname;
+ TALLOC_CTX *ctx;
+
+ DEBUG(MH_INFO_DEBUG, ("Entering with smb_fname->base_name '%s'\n",
+ smb_fname->base_name));
if (!is_in_media_files(smb_fname->base_name))
{
goto out;
}
- struct smb_filename *clientFname = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientFname = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_smb_fname(handle, ctx,
smb_fname,
static int mh_fstat(vfs_handle_struct *handle,
files_struct *fsp, SMB_STRUCT_STAT *sbuf)
{
+ int status = 0;
+
DEBUG(MH_INFO_DEBUG, ("Entering with fsp->fsp_name->base_name "
"'%s'\n", fsp_str_dbg(fsp)));
- int status = 0;
-
if ((status = SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf)))
{
goto out;
const struct smb_filename *smb_fname)
{
int status;
+ struct smb_filename *clientFname;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_unlink\n"));
if (!is_in_media_files(smb_fname->base_name))
goto out;
}
- struct smb_filename *clientFname = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientFname = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_smb_fname(handle, ctx,
smb_fname,
mode_t mode)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_chmod\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
gid_t gid)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_chown\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
gid_t gid)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_lchown\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
const char *path)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_chdir\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
struct smb_file_time *ft)
{
int status;
+ struct smb_filename *clientFname;
+ TALLOC_CTX *ctx;
+
DEBUG(MH_INFO_DEBUG, ("Entering mh_ntimes\n"));
if (!is_in_media_files(smb_fname->base_name))
goto out;
}
- struct smb_filename *clientFname = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientFname = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_smb_fname(handle, ctx,
smb_fname,
const char *newpath)
{
int status;
+ char *oldClientPath;
+ char *newClientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_symlink\n"));
if (!is_in_media_files(oldpath) && !is_in_media_files(newpath))
goto out;
}
- char *oldClientPath = NULL;
- char *newClientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ oldClientPath = NULL;
+ newClientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
oldpath,
size_t bufsiz)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_readlink\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
const char *newpath)
{
int status;
+ char *oldClientPath;
+ char *newClientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_link\n"));
if (!is_in_media_files(oldpath) && !is_in_media_files(newpath))
goto out;
}
- char *oldClientPath = NULL;
- char *newClientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ oldClientPath = NULL;
+ newClientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
oldpath,
SMB_DEV_T dev)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_mknod\n"));
if (!is_in_media_files(pathname))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
pathname,
const char *path)
{
char *buf;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_realpath\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if (alloc_get_client_path(handle, ctx,
path,
unsigned int flags)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_chflags\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
struct stream_struct **streams)
{
NTSTATUS status;
+ char *clientPath;
+ TALLOC_CTX *mem_ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_streaminfo\n"));
if (!is_in_media_files(fname))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *mem_ctx = talloc_tos();
+ clientPath = NULL;
+ mem_ctx = talloc_tos();
if (alloc_get_client_path(handle, mem_ctx,
fname,
struct security_descriptor **ppdesc)
{
NTSTATUS status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_get_nt_acl\n"));
if (!is_in_media_files(name))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if (alloc_get_client_path(handle, ctx,
name,
mode_t mode)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_chmod_acl\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
SMB_ACL_TYPE_T type)
{
SMB_ACL_T ret;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_sys_acl_get_file\n"));
if (!is_in_media_files(path_p))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if (alloc_get_client_path(handle, ctx,
path_p,
SMB_ACL_T theacl)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_sys_acl_set_file\n"));
if (!is_in_media_files(name))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
name,
const char *path)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_sys_acl_delete_def_file\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
size_t size)
{
ssize_t ret;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_getxattr\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if (alloc_get_client_path(handle, ctx,
path,
size_t size)
{
ssize_t ret;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_listxattr\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if (alloc_get_client_path(handle, ctx,
path,
const char *name)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_removexattr\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
int flags)
{
int status;
+ char *clientPath;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_setxattr\n"));
if (!is_in_media_files(path))
goto out;
}
- char *clientPath = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientPath = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_path(handle, ctx,
path,
{
// check if sbuf is modified further down the chain.
bool ret;
+ struct smb_filename *clientFname;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_is_offline\n"));
if (!is_in_media_files(fname->base_name))
goto out;
}
- struct smb_filename *clientFname = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientFname = NULL;
+ ctx = talloc_tos();
if(alloc_get_client_smb_fname(handle, ctx,
fname,
const struct smb_filename *fname)
{
int status;
+ struct smb_filename *clientFname;
+ TALLOC_CTX *ctx;
DEBUG(MH_INFO_DEBUG, ("Entering mh_set_offline\n"));
if (!is_in_media_files(fname->base_name))
goto out;
}
- struct smb_filename *clientFname = NULL;
- TALLOC_CTX *ctx = talloc_tos();
+ clientFname = NULL;
+ ctx = talloc_tos();
if ((status = alloc_get_client_smb_fname(handle, ctx,
fname,