Exemple #1
0
static int xattr_tdb_get_file_id(struct vfs_handle_struct *handle,
                                 const char *path, struct file_id *id)
{
    int ret;
    TALLOC_CTX *frame = talloc_stackframe();
    struct smb_filename *smb_fname;

    smb_fname = synthetic_smb_fname(frame, path, NULL, NULL, 0);
    if (smb_fname == NULL) {
        TALLOC_FREE(frame);
        errno = ENOMEM;
        return -1;
    }

    ret = SMB_VFS_NEXT_STAT(handle, smb_fname);

    if (ret == -1) {
        TALLOC_FREE(frame);
        return -1;
    }

    *id = SMB_VFS_NEXT_FILE_ID_CREATE(handle, &smb_fname->st);
    TALLOC_FREE(frame);
    return 0;
}
Exemple #2
0
static struct file_id skel_file_id_create(vfs_handle_struct *handle,
					  const SMB_STRUCT_STAT *sbuf)
{
	return SMB_VFS_NEXT_FILE_ID_CREATE(handle, sbuf);
}
Exemple #3
0
static struct file_id skel_file_id_create(vfs_handle_struct *handle,
					  SMB_DEV_T dev, SMB_INO_T inode)
{
	return SMB_VFS_NEXT_FILE_ID_CREATE(handle, dev, inode);
}