* an option to put in a special ACL entry for a non-existing group.
*/
-static bool file_is_valid(vfs_handle_struct *handle, const char *path,
- bool check_valid)
+static bool file_is_valid(vfs_handle_struct *handle, const char *path)
{
char buf;
- if (!check_valid) {
- return true;
- }
-
DEBUG(10, ("file_is_valid (%s) called\n", path));
if (SMB_VFS_GETXATTR(handle->conn, path, SAMBA_XATTR_MARKER,
return true;
}
-static bool mark_file_valid(vfs_handle_struct *handle, const char *path,
- bool check_valid)
+static bool mark_file_valid(vfs_handle_struct *handle, const char *path)
{
char buf = '1';
int ret;
- if (!check_valid) {
- return true;
- }
-
DEBUG(10, ("marking file %s as valid\n", path));
ret = SMB_VFS_SETXATTR(handle->conn, path, SAMBA_XATTR_MARKER,
goto fail;
}
- if (file_is_valid(handle, smb_fname->base_name, check_valid)) {
+ if (!check_valid ||
+ file_is_valid(handle, smb_fname->base_name)) {
return result;
}
goto fail;
}
- if (!mark_file_valid(handle, smb_fname->base_name, check_valid)) {
+ if (check_valid && !mark_file_valid(handle, smb_fname->base_name)) {
goto fail;
}
void *private_data)
{
char *dirname;
- SMB_STRUCT_DIR *dirhandle = NULL;
+ DIR *dirhandle = NULL;
const char *dirent = NULL;
char *talloced = NULL;
static bool add_one_stream(TALLOC_CTX *mem_ctx, unsigned int *num_streams,
struct stream_struct **streams,
- const char *name, SMB_OFF_T size,
- SMB_OFF_T alloc_size)
+ const char *name, off_t size,
+ off_t alloc_size)
{
struct stream_struct *tmp;