modules/vfs_default.c

ソースコードを見る。

関数

static int vfswrap_connect (vfs_handle_struct *handle, const char *service, const char *user)
static void vfswrap_disconnect (vfs_handle_struct *handle)
static SMB_BIG_UINT vfswrap_disk_free (vfs_handle_struct *handle, const char *path, BOOL small_query, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
static int vfswrap_get_quota (struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt)
static int vfswrap_set_quota (struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt)
static int vfswrap_get_shadow_copy_data (struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels)
static int vfswrap_statvfs (struct vfs_handle_struct *handle, const char *path, vfs_statvfs_struct *statbuf)
static SMB_STRUCT_DIR * vfswrap_opendir (vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
static SMB_STRUCT_DIRENT * vfswrap_readdir (vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
static void vfswrap_seekdir (vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset)
static long vfswrap_telldir (vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
static void vfswrap_rewinddir (vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
static int vfswrap_mkdir (vfs_handle_struct *handle, const char *path, mode_t mode)
static int vfswrap_rmdir (vfs_handle_struct *handle, const char *path)
static int vfswrap_closedir (vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
static int vfswrap_open (vfs_handle_struct *handle, const char *fname, files_struct *fsp, int flags, mode_t mode)
static int vfswrap_close (vfs_handle_struct *handle, files_struct *fsp, int fd)
static ssize_t vfswrap_read (vfs_handle_struct *handle, files_struct *fsp, int fd, void *data, size_t n)
static ssize_t vfswrap_pread (vfs_handle_struct *handle, files_struct *fsp, int fd, void *data, size_t n, SMB_OFF_T offset)
static ssize_t vfswrap_write (vfs_handle_struct *handle, files_struct *fsp, int fd, const void *data, size_t n)
static ssize_t vfswrap_pwrite (vfs_handle_struct *handle, files_struct *fsp, int fd, const void *data, size_t n, SMB_OFF_T offset)
static SMB_OFF_T vfswrap_lseek (vfs_handle_struct *handle, files_struct *fsp, int filedes, SMB_OFF_T offset, int whence)
static ssize_t vfswrap_sendfile (vfs_handle_struct *handle, int tofd, files_struct *fsp, int fromfd, const DATA_BLOB *hdr, SMB_OFF_T offset, size_t n)
static int copy_reg (const char *source, const char *dest)
static int vfswrap_rename (vfs_handle_struct *handle, const char *oldname, const char *newname)
static int vfswrap_fsync (vfs_handle_struct *handle, files_struct *fsp, int fd)
static int vfswrap_stat (vfs_handle_struct *handle, const char *fname, SMB_STRUCT_STAT *sbuf)
static int vfswrap_fstat (vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf)
int vfswrap_lstat (vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf)
static int vfswrap_unlink (vfs_handle_struct *handle, const char *path)
static int vfswrap_chmod (vfs_handle_struct *handle, const char *path, mode_t mode)
static int vfswrap_fchmod (vfs_handle_struct *handle, files_struct *fsp, int fd, mode_t mode)
static int vfswrap_chown (vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid)
static int vfswrap_fchown (vfs_handle_struct *handle, files_struct *fsp, int fd, uid_t uid, gid_t gid)
static int vfswrap_chdir (vfs_handle_struct *handle, const char *path)
static char * vfswrap_getwd (vfs_handle_struct *handle, char *path)
static int vfswrap_ntimes (vfs_handle_struct *handle, const char *path, const struct timespec ts[2])
static int strict_allocate_ftruncate (vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T len)
static int vfswrap_ftruncate (vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T len)
static BOOL vfswrap_lock (vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
static int vfswrap_kernel_flock (vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 share_mode)
static BOOL vfswrap_getlock (vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
static int vfswrap_linux_setlease (vfs_handle_struct *handle, files_struct *fsp, int fd, int leasetype)
static int vfswrap_symlink (vfs_handle_struct *handle, const char *oldpath, const char *newpath)
static int vfswrap_readlink (vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz)
static int vfswrap_link (vfs_handle_struct *handle, const char *oldpath, const char *newpath)
static int vfswrap_mknod (vfs_handle_struct *handle, const char *pathname, mode_t mode, SMB_DEV_T dev)
static char * vfswrap_realpath (vfs_handle_struct *handle, const char *path, char *resolved_path)
static NTSTATUS vfswrap_notify_watch (vfs_handle_struct *vfs_handle, struct sys_notify_context *ctx, struct notify_entry *e, void(*callback)(struct sys_notify_context *ctx, void *private_data, struct notify_event *ev), void *private_data, void *handle)
static int vfswrap_chflags (vfs_handle_struct *handle, const char *path, int flags)
static size_t vfswrap_fget_nt_acl (vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info, SEC_DESC **ppdesc)
static size_t vfswrap_get_nt_acl (vfs_handle_struct *handle, files_struct *fsp, const char *name, uint32 security_info, SEC_DESC **ppdesc)
static BOOL vfswrap_fset_nt_acl (vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info_sent, SEC_DESC *psd)
static BOOL vfswrap_set_nt_acl (vfs_handle_struct *handle, files_struct *fsp, const char *name, uint32 security_info_sent, SEC_DESC *psd)
static int vfswrap_chmod_acl (vfs_handle_struct *handle, const char *name, mode_t mode)
static int vfswrap_fchmod_acl (vfs_handle_struct *handle, files_struct *fsp, int fd, mode_t mode)
static int vfswrap_sys_acl_get_entry (vfs_handle_struct *handle, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p)
static int vfswrap_sys_acl_get_tag_type (vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p)
static int vfswrap_sys_acl_get_permset (vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p)
static void * vfswrap_sys_acl_get_qualifier (vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d)
static SMB_ACL_T vfswrap_sys_acl_get_file (vfs_handle_struct *handle, const char *path_p, SMB_ACL_TYPE_T type)
static SMB_ACL_T vfswrap_sys_acl_get_fd (vfs_handle_struct *handle, files_struct *fsp, int fd)
static int vfswrap_sys_acl_clear_perms (vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset)
static int vfswrap_sys_acl_add_perm (vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
static char * vfswrap_sys_acl_to_text (vfs_handle_struct *handle, SMB_ACL_T theacl, ssize_t *plen)
static SMB_ACL_T vfswrap_sys_acl_init (vfs_handle_struct *handle, int count)
static int vfswrap_sys_acl_create_entry (vfs_handle_struct *handle, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry)
static int vfswrap_sys_acl_set_tag_type (vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype)
static int vfswrap_sys_acl_set_qualifier (vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, void *qual)
static int vfswrap_sys_acl_set_permset (vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset)
static int vfswrap_sys_acl_valid (vfs_handle_struct *handle, SMB_ACL_T theacl)
static int vfswrap_sys_acl_set_file (vfs_handle_struct *handle, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
static int vfswrap_sys_acl_set_fd (vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_ACL_T theacl)
static int vfswrap_sys_acl_delete_def_file (vfs_handle_struct *handle, const char *path)
static int vfswrap_sys_acl_get_perm (vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
static int vfswrap_sys_acl_free_text (vfs_handle_struct *handle, char *text)
static int vfswrap_sys_acl_free_acl (vfs_handle_struct *handle, SMB_ACL_T posix_acl)
static int vfswrap_sys_acl_free_qualifier (vfs_handle_struct *handle, void *qualifier, SMB_ACL_TAG_T tagtype)
static ssize_t vfswrap_getxattr (struct vfs_handle_struct *handle, const char *path, const char *name, void *value, size_t size)
static ssize_t vfswrap_lgetxattr (struct vfs_handle_struct *handle, const char *path, const char *name, void *value, size_t size)
static ssize_t vfswrap_fgetxattr (struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, const char *name, void *value, size_t size)
static ssize_t vfswrap_listxattr (struct vfs_handle_struct *handle, const char *path, char *list, size_t size)
ssize_t vfswrap_llistxattr (struct vfs_handle_struct *handle, const char *path, char *list, size_t size)
ssize_t vfswrap_flistxattr (struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, char *list, size_t size)
static int vfswrap_removexattr (struct vfs_handle_struct *handle, const char *path, const char *name)
static int vfswrap_lremovexattr (struct vfs_handle_struct *handle, const char *path, const char *name)
static int vfswrap_fremovexattr (struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, const char *name)
static int vfswrap_setxattr (struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
static int vfswrap_lsetxattr (struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
static int vfswrap_fsetxattr (struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, const char *name, const void *value, size_t size, int flags)
static int vfswrap_aio_read (struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
static int vfswrap_aio_write (struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
static ssize_t vfswrap_aio_return (struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
static int vfswrap_aio_cancel (struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_STRUCT_AIOCB *aiocb)
static int vfswrap_aio_error (struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
static int vfswrap_aio_fsync (struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
static int vfswrap_aio_suspend (struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB *const aiocb[], int n, const struct timespec *timeout)
NTSTATUS vfs_default_init (void)

変数

static vfs_op_tuple vfs_default_ops []


関数

static int vfswrap_connect ( vfs_handle_struct handle,
const char *  service,
const char *  user 
) [static]

vfs_default.c33 行で定義されています。

00034 {
00035     return 0;    /* Return >= 0 for success */
00036 }

static void vfswrap_disconnect ( vfs_handle_struct handle  )  [static]

vfs_default.c38 行で定義されています。

00039 {
00040 }

static SMB_BIG_UINT vfswrap_disk_free ( vfs_handle_struct handle,
const char *  path,
BOOL  small_query,
SMB_BIG_UINT *  bsize,
SMB_BIG_UINT *  dfree,
SMB_BIG_UINT *  dsize 
) [static]

vfs_default.c44 行で定義されています。

参照先 handleresultsys_disk_free().

00046 {
00047         SMB_BIG_UINT result;
00048 
00049         result = sys_disk_free(handle->conn, path, small_query, bsize, dfree, dsize);
00050         return result;
00051 }

static int vfswrap_get_quota ( struct vfs_handle_struct handle,
enum SMB_QUOTA_TYPE  qtype,
unid_t  id,
SMB_DISK_QUOTA qt 
) [static]

vfs_default.c53 行で定義されています。

参照先 errnohandleresultsys_get_quota().

00054 {
00055 #ifdef HAVE_SYS_QUOTAS
00056         int result;
00057 
00058         START_PROFILE(syscall_get_quota);
00059         result = sys_get_quota(handle->conn->connectpath, qtype, id, qt);
00060         END_PROFILE(syscall_get_quota);
00061         return result;
00062 #else
00063         errno = ENOSYS;
00064         return -1;
00065 #endif
00066 }

static int vfswrap_set_quota ( struct vfs_handle_struct handle,
enum SMB_QUOTA_TYPE  qtype,
unid_t  id,
SMB_DISK_QUOTA qt 
) [static]

vfs_default.c68 行で定義されています。

参照先 errnohandleresultsys_set_quota().

00069 {
00070 #ifdef HAVE_SYS_QUOTAS
00071         int result;
00072 
00073         START_PROFILE(syscall_set_quota);
00074         result = sys_set_quota(handle->conn->connectpath, qtype, id, qt);
00075         END_PROFILE(syscall_set_quota);
00076         return result;
00077 #else
00078         errno = ENOSYS;
00079         return -1;
00080 #endif
00081 }

static int vfswrap_get_shadow_copy_data ( struct vfs_handle_struct handle,
struct files_struct fsp,
SHADOW_COPY_DATA shadow_copy_data,
BOOL  labels 
) [static]

vfs_default.c83 行で定義されています。

参照先 errno.

00084 {
00085         errno = ENOSYS;
00086         return -1;  /* Not implemented. */
00087 }

static int vfswrap_statvfs ( struct vfs_handle_struct handle,
const char *  path,
vfs_statvfs_struct statbuf 
) [static]

vfs_default.c89 行で定義されています。

参照先 sys_statvfs().

00090 {
00091         return sys_statvfs(path, statbuf);
00092 }

static SMB_STRUCT_DIR* vfswrap_opendir ( vfs_handle_struct handle,
const char *  fname,
const char *  mask,
uint32  attr 
) [static]

vfs_default.c96 行で定義されています。

参照先 resultsys_opendir().

00097 {
00098         SMB_STRUCT_DIR *result;
00099 
00100         START_PROFILE(syscall_opendir);
00101         result = sys_opendir(fname);
00102         END_PROFILE(syscall_opendir);
00103         return result;
00104 }

static SMB_STRUCT_DIRENT* vfswrap_readdir ( vfs_handle_struct handle,
SMB_STRUCT_DIR *  dirp 
) [static]

vfs_default.c106 行で定義されています。

参照先 resultsys_readdir().

00107 {
00108         SMB_STRUCT_DIRENT *result;
00109 
00110         START_PROFILE(syscall_readdir);
00111         result = sys_readdir(dirp);
00112         END_PROFILE(syscall_readdir);
00113         return result;
00114 }

static void vfswrap_seekdir ( vfs_handle_struct handle,
SMB_STRUCT_DIR *  dirp,
long  offset 
) [static]

vfs_default.c116 行で定義されています。

参照先 sys_seekdir().

00117 {
00118         START_PROFILE(syscall_seekdir);
00119         sys_seekdir(dirp, offset);
00120         END_PROFILE(syscall_seekdir);
00121 }

static long vfswrap_telldir ( vfs_handle_struct handle,
SMB_STRUCT_DIR *  dirp 
) [static]

vfs_default.c123 行で定義されています。

参照先 resultsys_telldir().

00124 {
00125         long result;
00126         START_PROFILE(syscall_telldir);
00127         result = sys_telldir(dirp);
00128         END_PROFILE(syscall_telldir);
00129         return result;
00130 }

static void vfswrap_rewinddir ( vfs_handle_struct handle,
SMB_STRUCT_DIR *  dirp 
) [static]

vfs_default.c132 行で定義されています。

参照先 sys_rewinddir().

00133 {
00134         START_PROFILE(syscall_rewinddir);
00135         sys_rewinddir(dirp);
00136         END_PROFILE(syscall_rewinddir);
00137 }

static int vfswrap_mkdir ( vfs_handle_struct handle,
const char *  path,
mode_t  mode 
) [static]

vfs_default.c139 行で定義されています。

参照先 directory_has_default_acl()errnohandleparent_dirname()result.

00140 {
00141         int result;
00142         BOOL has_dacl = False;
00143 
00144         START_PROFILE(syscall_mkdir);
00145 
00146         if (lp_inherit_acls(SNUM(handle->conn)) && (has_dacl = directory_has_default_acl(handle->conn, parent_dirname(path))))
00147                 mode = 0777;
00148 
00149         result = mkdir(path, mode);
00150 
00151         if (result == 0 && !has_dacl) {
00152                 /*
00153                  * We need to do this as the default behavior of POSIX ACLs
00154                  * is to set the mask to be the requested group permission
00155                  * bits, not the group permission bits to be the requested
00156                  * group permission bits. This is not what we want, as it will
00157                  * mess up any inherited ACL bits that were set. JRA.
00158                  */
00159                 int saved_errno = errno; /* We may get ENOSYS */
00160                 if ((SMB_VFS_CHMOD_ACL(handle->conn, path, mode) == -1) && (errno == ENOSYS))
00161                         errno = saved_errno;
00162         }
00163 
00164         END_PROFILE(syscall_mkdir);
00165         return result;
00166 }

static int vfswrap_rmdir ( vfs_handle_struct handle,
const char *  path 
) [static]

vfs_default.c168 行で定義されています。

参照先 result.

00169 {
00170         int result;
00171 
00172         START_PROFILE(syscall_rmdir);
00173         result = rmdir(path);
00174         END_PROFILE(syscall_rmdir);
00175         return result;
00176 }

static int vfswrap_closedir ( vfs_handle_struct handle,
SMB_STRUCT_DIR *  dirp 
) [static]

vfs_default.c178 行で定義されています。

参照先 resultsys_closedir().

00179 {
00180         int result;
00181 
00182         START_PROFILE(syscall_closedir);
00183         result = sys_closedir(dirp);
00184         END_PROFILE(syscall_closedir);
00185         return result;
00186 }

static int vfswrap_open ( vfs_handle_struct handle,
const char *  fname,
files_struct fsp,
int  flags,
mode_t  mode 
) [static]

vfs_default.c190 行で定義されています。

参照先 resultsys_open().

00192 {
00193         int result;
00194 
00195         START_PROFILE(syscall_open);
00196         result = sys_open(fname, flags, mode);
00197         END_PROFILE(syscall_open);
00198         return result;
00199 }

static int vfswrap_close ( vfs_handle_struct handle,
files_struct fsp,
int  fd 
) [static]

vfs_default.c201 行で定義されています。

参照先 result.

00202 {
00203         int result;
00204 
00205         START_PROFILE(syscall_close);
00206 
00207         result = close(fd);
00208         END_PROFILE(syscall_close);
00209         return result;
00210 }

static ssize_t vfswrap_read ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
void *  data,
size_t  n 
) [static]

vfs_default.c212 行で定義されています。

参照先 resultsys_read().

00213 {
00214         ssize_t result;
00215 
00216         START_PROFILE_BYTES(syscall_read, n);
00217         result = sys_read(fd, data, n);
00218         END_PROFILE(syscall_read);
00219         return result;
00220 }

static ssize_t vfswrap_pread ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
void *  data,
size_t  n,
SMB_OFF_T  offset 
) [static]

vfs_default.c222 行で定義されています。

参照先 errnofiles_struct::fhfd_handle::posresultsys_pread().

00224 {
00225         ssize_t result;
00226 
00227 #if defined(HAVE_PREAD) || defined(HAVE_PREAD64)
00228         START_PROFILE_BYTES(syscall_pread, n);
00229         result = sys_pread(fd, data, n, offset);
00230         END_PROFILE(syscall_pread);
00231 
00232         if (result == -1 && errno == ESPIPE) {
00233                 /* Maintain the fiction that pipes can be seeked (sought?) on. */
00234                 result = SMB_VFS_READ(fsp, fd, data, n);
00235                 fsp->fh->pos = 0;
00236         }
00237 
00238 #else /* HAVE_PREAD */
00239         SMB_OFF_T   curr;
00240         int lerrno;
00241 
00242         curr = SMB_VFS_LSEEK(fsp, fd, 0, SEEK_CUR);
00243         if (curr == -1 && errno == ESPIPE) {
00244                 /* Maintain the fiction that pipes can be seeked (sought?) on. */
00245                 result = SMB_VFS_READ(fsp, fd, data, n);
00246                 fsp->fh->pos = 0;
00247                 return result;
00248         }
00249 
00250         if (SMB_VFS_LSEEK(fsp, fd, offset, SEEK_SET) == -1) {
00251                 return -1;
00252         }
00253 
00254         errno = 0;
00255         result = SMB_VFS_READ(fsp, fd, data, n);
00256         lerrno = errno;
00257 
00258         SMB_VFS_LSEEK(fsp, fd, curr, SEEK_SET);
00259         errno = lerrno;
00260 
00261 #endif /* HAVE_PREAD */
00262 
00263         return result;
00264 }

static ssize_t vfswrap_write ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
const void *  data,
size_t  n 
) [static]

vfs_default.c266 行で定義されています。

参照先 resultsys_write().

00267 {
00268         ssize_t result;
00269 
00270         START_PROFILE_BYTES(syscall_write, n);
00271         result = sys_write(fd, data, n);
00272         END_PROFILE(syscall_write);
00273         return result;
00274 }

static ssize_t vfswrap_pwrite ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
const void *  data,
size_t  n,
SMB_OFF_T  offset 
) [static]

vfs_default.c276 行で定義されています。

参照先 errnoresultsys_pwrite().

00278 {
00279         ssize_t result;
00280 
00281 #if defined(HAVE_PWRITE) || defined(HAVE_PRWITE64)
00282         START_PROFILE_BYTES(syscall_pwrite, n);
00283         result = sys_pwrite(fd, data, n, offset);
00284         END_PROFILE(syscall_pwrite);
00285 
00286         if (result == -1 && errno == ESPIPE) {
00287                 /* Maintain the fiction that pipes can be sought on. */
00288                 result = SMB_VFS_WRITE(fsp, fd, data, n);
00289         }
00290 
00291 #else /* HAVE_PWRITE */
00292         SMB_OFF_T   curr;
00293         int         lerrno;
00294 
00295         curr = SMB_VFS_LSEEK(fsp, fd, 0, SEEK_CUR);
00296         if (curr == -1) {
00297                 return -1;
00298         }
00299 
00300         if (SMB_VFS_LSEEK(fsp, fd, offset, SEEK_SET) == -1) {
00301                 return -1;
00302         }
00303 
00304         result = SMB_VFS_WRITE(fsp, fd, data, n);
00305         lerrno = errno;
00306 
00307         SMB_VFS_LSEEK(fsp, fd, curr, SEEK_SET);
00308         errno = lerrno;
00309 
00310 #endif /* HAVE_PWRITE */
00311 
00312         return result;
00313 }

static SMB_OFF_T vfswrap_lseek ( vfs_handle_struct handle,
files_struct fsp,
int  filedes,
SMB_OFF_T  offset,
int  whence 
) [static]

vfs_default.c315 行で定義されています。

参照先 errnoresultsys_lseek().

00316 {
00317         SMB_OFF_T result = 0;
00318 
00319         START_PROFILE(syscall_lseek);
00320 
00321         /* Cope with 'stat' file opens. */
00322         if (filedes != -1)
00323                 result = sys_lseek(filedes, offset, whence);
00324 
00325         /*
00326          * We want to maintain the fiction that we can seek
00327          * on a fifo for file system purposes. This allows
00328          * people to set up UNIX fifo's that feed data to Windows
00329          * applications. JRA.
00330          */
00331 
00332         if((result == -1) && (errno == ESPIPE)) {
00333                 result = 0;
00334                 errno = 0;
00335         }
00336 
00337         END_PROFILE(syscall_lseek);
00338         return result;
00339 }

static ssize_t vfswrap_sendfile ( vfs_handle_struct handle,
int  tofd,
files_struct fsp,
int  fromfd,
const DATA_BLOB hdr,
SMB_OFF_T  offset,
size_t  n 
) [static]

vfs_default.c341 行で定義されています。

参照先 resultsys_sendfile().

00343 {
00344         ssize_t result;
00345 
00346         START_PROFILE_BYTES(syscall_sendfile, n);
00347         result = sys_sendfile(tofd, fromfd, hdr, offset, n);
00348         END_PROFILE(syscall_sendfile);
00349         return result;
00350 }

static int copy_reg ( const char *  source,
const char *  dest 
) [static]

vfs_default.c357 行で定義されています。

参照先 errerrnosys_lstat()sys_open()transfer_file().

参照元 vfswrap_rename().

00358 {
00359         SMB_STRUCT_STAT source_stats;
00360         int saved_errno;
00361         int ifd = -1;
00362         int ofd = -1;
00363 
00364         if (sys_lstat (source, &source_stats) == -1)
00365                 return -1;
00366 
00367         if (!S_ISREG (source_stats.st_mode))
00368                 return -1;
00369 
00370         if((ifd = sys_open (source, O_RDONLY, 0)) < 0)
00371                 return -1;
00372 
00373         if (unlink (dest) && errno != ENOENT)
00374                 return -1;
00375 
00376 #ifdef O_NOFOLLOW
00377         if((ofd = sys_open (dest, O_WRONLY | O_CREAT | O_TRUNC | O_NOFOLLOW, 0600)) < 0 )
00378 #else
00379         if((ofd = sys_open (dest, O_WRONLY | O_CREAT | O_TRUNC , 0600)) < 0 )
00380 #endif
00381                 goto err;
00382 
00383         if (transfer_file(ifd, ofd, (size_t)-1) == -1)
00384                 goto err;
00385 
00386         /*
00387          * Try to preserve ownership.  For non-root it might fail, but that's ok.
00388          * But root probably wants to know, e.g. if NFS disallows it.
00389          */
00390 
00391 #ifdef HAVE_FCHOWN
00392         if ((fchown(ofd, source_stats.st_uid, source_stats.st_gid) == -1) && (errno != EPERM))
00393 #else
00394         if ((chown(dest, source_stats.st_uid, source_stats.st_gid) == -1) && (errno != EPERM))
00395 #endif
00396                 goto err;
00397 
00398         /*
00399          * fchown turns off set[ug]id bits for non-root,
00400          * so do the chmod last.
00401          */
00402 
00403 #if defined(HAVE_FCHMOD)
00404         if (fchmod (ofd, source_stats.st_mode & 07777))
00405 #else
00406         if (chmod (dest, source_stats.st_mode & 07777))
00407 #endif
00408                 goto err;
00409 
00410         if (close (ifd) == -1)
00411                 goto err;
00412 
00413         if (close (ofd) == -1)
00414                 return -1;
00415 
00416         /* Try to copy the old file's modtime and access time.  */
00417         {
00418                 struct utimbuf tv;
00419 
00420                 tv.actime = source_stats.st_atime;
00421                 tv.modtime = source_stats.st_mtime;
00422                 utime(dest, &tv);
00423         }
00424 
00425         if (unlink (source) == -1)
00426                 return -1;
00427 
00428         return 0;
00429 
00430   err:
00431 
00432         saved_errno = errno;
00433         if (ifd != -1)
00434                 close(ifd);
00435         if (ofd != -1)
00436                 close(ofd);
00437         errno = saved_errno;
00438         return -1;
00439 }

static int vfswrap_rename ( vfs_handle_struct handle,
const char *  oldname,
const char *  newname 
) [static]

vfs_default.c441 行で定義されています。

参照先 copy_reg()errnoresult.

00442 {
00443         int result;
00444 
00445         START_PROFILE(syscall_rename);
00446         result = rename(oldname, newname);
00447         if ((result == -1) && (errno == EXDEV)) {
00448                 /* Rename across filesystems needed. */
00449                 result = copy_reg(oldname, newname);
00450         }
00451 
00452         END_PROFILE(syscall_rename);
00453         return result;
00454 }

static int vfswrap_fsync ( vfs_handle_struct handle,
files_struct fsp,
int  fd 
) [static]

vfs_default.c456 行で定義されています。

参照先 result.

00457 {
00458 #ifdef HAVE_FSYNC
00459         int result;
00460 
00461         START_PROFILE(syscall_fsync);
00462         result = fsync(fd);
00463         END_PROFILE(syscall_fsync);
00464         return result;
00465 #else
00466         return 0;
00467 #endif
00468 }

static int vfswrap_stat ( vfs_handle_struct handle,
const char *  fname,
SMB_STRUCT_STAT *  sbuf 
) [static]

vfs_default.c470 行で定義されています。

参照先 resultsys_stat().

00471 {
00472         int result;
00473 
00474         START_PROFILE(syscall_stat);
00475         result = sys_stat(fname, sbuf);
00476         END_PROFILE(syscall_stat);
00477         return result;
00478 }

static int vfswrap_fstat ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
SMB_STRUCT_STAT *  sbuf 
) [static]

vfs_default.c480 行で定義されています。

参照先 resultsys_fstat().

00481 {
00482         int result;
00483 
00484         START_PROFILE(syscall_fstat);
00485         result = sys_fstat(fd, sbuf);
00486         END_PROFILE(syscall_fstat);
00487         return result;
00488 }

int vfswrap_lstat ( vfs_handle_struct handle,
const char *  path,
SMB_STRUCT_STAT *  sbuf 
)

vfs_default.c490 行で定義されています。

参照先 resultsys_lstat().

00491 {
00492         int result;
00493 
00494         START_PROFILE(syscall_lstat);
00495         result = sys_lstat(path, sbuf);
00496         END_PROFILE(syscall_lstat);
00497         return result;
00498 }

static int vfswrap_unlink ( vfs_handle_struct handle,
const char *  path 
) [static]

vfs_default.c500 行で定義されています。

参照先 result.

00501 {
00502         int result;
00503 
00504         START_PROFILE(syscall_unlink);
00505         result = unlink(path);
00506         END_PROFILE(syscall_unlink);
00507         return result;
00508 }

static int vfswrap_chmod ( vfs_handle_struct handle,
const char *  path,
mode_t  mode 
) [static]

vfs_default.c510 行で定義されています。

参照先 errnohandleresult.

00511 {
00512         int result;
00513 
00514         START_PROFILE(syscall_chmod);
00515 
00516         /*
00517          * We need to do this due to the fact that the default POSIX ACL
00518          * chmod modifies the ACL *mask* for the group owner, not the
00519          * group owner bits directly. JRA.
00520          */
00521 
00522 
00523         {
00524                 int saved_errno = errno; /* We might get ENOSYS */
00525                 if ((result = SMB_VFS_CHMOD_ACL(handle->conn, path, mode)) == 0) {
00526                         END_PROFILE(syscall_chmod);
00527                         return result;
00528                 }
00529                 /* Error - return the old errno. */
00530                 errno = saved_errno;
00531         }
00532 
00533         result = chmod(path, mode);
00534         END_PROFILE(syscall_chmod);
00535         return result;
00536 }

static int vfswrap_fchmod ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
mode_t  mode 
) [static]

vfs_default.c538 行で定義されています。

参照先 errnoresult.

00539 {
00540         int result;
00541 
00542         START_PROFILE(syscall_fchmod);
00543 
00544         /*
00545          * We need to do this due to the fact that the default POSIX ACL
00546          * chmod modifies the ACL *mask* for the group owner, not the
00547          * group owner bits directly. JRA.
00548          */
00549 
00550         {
00551                 int saved_errno = errno; /* We might get ENOSYS */
00552                 if ((result = SMB_VFS_FCHMOD_ACL(fsp, fd, mode)) == 0) {
00553                         END_PROFILE(syscall_fchmod);
00554                         return result;
00555                 }
00556                 /* Error - return the old errno. */
00557                 errno = saved_errno;
00558         }
00559 
00560 #if defined(HAVE_FCHMOD)
00561         result = fchmod(fd, mode);
00562 #else
00563         result = -1;
00564         errno = ENOSYS;
00565 #endif
00566 
00567         END_PROFILE(syscall_fchmod);
00568         return result;
00569 }

static int vfswrap_chown ( vfs_handle_struct handle,
const char *  path,
uid_t  uid,
gid_t  gid 
) [static]

vfs_default.c571 行で定義されています。

参照先 resultsys_chown().

00572 {
00573         int result;
00574 
00575         START_PROFILE(syscall_chown);
00576         result = sys_chown(path, uid, gid);
00577         END_PROFILE(syscall_chown);
00578         return result;
00579 }

static int vfswrap_fchown ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
uid_t  uid,
gid_t  gid 
) [static]

vfs_default.c581 行で定義されています。

参照先 errnoresult.

00582 {
00583 #ifdef HAVE_FCHOWN
00584         int result;
00585 
00586         START_PROFILE(syscall_fchown);
00587         result = fchown(fd, uid, gid);
00588         END_PROFILE(syscall_fchown);
00589         return result;
00590 #else
00591         errno = ENOSYS;
00592         return -1;
00593 #endif
00594 }

static int vfswrap_chdir ( vfs_handle_struct handle,
const char *  path 
) [static]

vfs_default.c596 行で定義されています。

参照先 result.

00597 {
00598         int result;
00599 
00600         START_PROFILE(syscall_chdir);
00601         result = chdir(path);
00602         END_PROFILE(syscall_chdir);
00603         return result;
00604 }

static char* vfswrap_getwd ( vfs_handle_struct handle,
char *  path 
) [static]

vfs_default.c606 行で定義されています。

参照先 resultsys_getwd().

00607 {
00608         char *result;
00609 
00610         START_PROFILE(syscall_getwd);
00611         result = sys_getwd(path);
00612         END_PROFILE(syscall_getwd);
00613         return result;
00614 }

static int vfswrap_ntimes ( vfs_handle_struct handle,
const char *  path,
const struct timespec  ts[2] 
) [static]

vfs_default.c621 行で定義されています。

参照先 convert_timespec_to_time_t()convert_timespec_to_timeval()errnoresult.

00622 {
00623         int result;
00624 
00625         START_PROFILE(syscall_ntimes);
00626 #if defined(HAVE_UTIMES)
00627         {
00628                 struct timeval tv[2];
00629                 tv[0] = convert_timespec_to_timeval(ts[0]);
00630                 tv[1] = convert_timespec_to_timeval(ts[1]);
00631                 result = utimes(path, tv);
00632         }
00633 #elif defined(HAVE_UTIME)
00634         {
00635                 struct utimbuf times;
00636                 times.actime = convert_timespec_to_time_t(ts[0]);
00637                 times.modtime = convert_timespec_to_time_t(ts[1]);
00638                 result = utime(path, times);
00639         }
00640 #else
00641         errno = ENOSYS;
00642         result = -1;
00643 #endif
00644         END_PROFILE(syscall_ntimes);
00645         return result;
00646 }

static int strict_allocate_ftruncate ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
SMB_OFF_T  len 
) [static]

vfs_default.c653 行で定義されています。

参照先 fd_handle::fdfiles_struct::fhsys_ftruncate().

参照元 vfswrap_ftruncate().

00654 {
00655         SMB_STRUCT_STAT st;
00656         SMB_OFF_T currpos = SMB_VFS_LSEEK(fsp, fd, 0, SEEK_CUR);
00657         unsigned char zero_space[4096];
00658         SMB_OFF_T space_to_write;
00659 
00660         if (currpos == -1)
00661                 return -1;
00662 
00663         if (SMB_VFS_FSTAT(fsp, fd, &st) == -1)
00664                 return -1;
00665 
00666         space_to_write = len - st.st_size;
00667 
00668 #ifdef S_ISFIFO
00669         if (S_ISFIFO(st.st_mode))
00670                 return 0;
00671 #endif
00672 
00673         if (st.st_size == len)
00674                 return 0;
00675 
00676         /* Shrink - just ftruncate. */
00677         if (st.st_size > len)
00678                 return sys_ftruncate(fd, len);
00679 
00680         /* Write out the real space on disk. */
00681         if (SMB_VFS_LSEEK(fsp, fd, st.st_size, SEEK_SET) != st.st_size)
00682                 return -1;
00683 
00684         space_to_write = len - st.st_size;
00685 
00686         memset(zero_space, '\0', sizeof(zero_space));
00687         while ( space_to_write > 0) {
00688                 SMB_OFF_T retlen;
00689                 SMB_OFF_T current_len_to_write = MIN(sizeof(zero_space),space_to_write);
00690 
00691                 retlen = SMB_VFS_WRITE(fsp,fsp->fh->fd,(char *)zero_space,current_len_to_write);
00692                 if (retlen <= 0)
00693                         return -1;
00694 
00695                 space_to_write -= retlen;
00696         }
00697 
00698         /* Seek to where we were */
00699         if (SMB_VFS_LSEEK(fsp, fd, currpos, SEEK_SET) != currpos)
00700                 return -1;
00701 
00702         return 0;
00703 }

static int vfswrap_ftruncate ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
SMB_OFF_T  len 
) [static]

vfs_default.c705 行で定義されています。

参照先 cfiles_struct::connhandleresultstrict_allocate_ftruncate()sys_ftruncate().

00706 {
00707         int result = -1;
00708         SMB_STRUCT_STAT st;
00709         char c = 0;
00710         SMB_OFF_T currpos;
00711 
00712         START_PROFILE(syscall_ftruncate);
00713 
00714         if (lp_strict_allocate(SNUM(fsp->conn))) {
00715                 result = strict_allocate_ftruncate(handle, fsp, fd, len);
00716                 END_PROFILE(syscall_ftruncate);
00717                 return result;
00718         }
00719 
00720         /* we used to just check HAVE_FTRUNCATE_EXTEND and only use
00721            sys_ftruncate if the system supports it. Then I discovered that
00722            you can have some filesystems that support ftruncate
00723            expansion and some that don't! On Linux fat can't do
00724            ftruncate extend but ext2 can. */
00725 
00726         result = sys_ftruncate(fd, len);
00727         if (result == 0)
00728                 goto done;
00729 
00730         /* According to W. R. Stevens advanced UNIX prog. Pure 4.3 BSD cannot
00731            extend a file with ftruncate. Provide alternate implementation
00732            for this */
00733         currpos = SMB_VFS_LSEEK(fsp, fd, 0, SEEK_CUR);
00734         if (currpos == -1) {
00735                 goto done;
00736         }
00737 
00738         /* Do an fstat to see if the file is longer than the requested
00739            size in which case the ftruncate above should have
00740            succeeded or shorter, in which case seek to len - 1 and
00741            write 1 byte of zero */
00742         if (SMB_VFS_FSTAT(fsp, fd, &st) == -1) {
00743                 goto done;
00744         }
00745 
00746 #ifdef S_ISFIFO
00747         if (S_ISFIFO(st.st_mode)) {
00748                 result = 0;
00749                 goto done;
00750         }
00751 #endif
00752 
00753         if (st.st_size == len) {
00754                 result = 0;
00755                 goto done;
00756         }
00757 
00758         if (st.st_size > len) {
00759                 /* the sys_ftruncate should have worked */
00760                 goto done;
00761         }
00762 
00763         if (SMB_VFS_LSEEK(fsp, fd, len-1, SEEK_SET) != len -1)
00764                 goto done;
00765 
00766         if (SMB_VFS_WRITE(fsp, fd, &c, 1)!=1)
00767                 goto done;
00768 
00769         /* Seek to where we were */
00770         if (SMB_VFS_LSEEK(fsp, fd, currpos, SEEK_SET) != currpos)
00771                 goto done;
00772         result = 0;
00773 
00774   done:
00775 
00776         END_PROFILE(syscall_ftruncate);
00777         return result;
00778 }

static BOOL vfswrap_lock ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
int  op,
SMB_OFF_T  offset,
SMB_OFF_T  count,
int  type 
) [static]

vfs_default.c780 行で定義されています。

参照先 fcntl_lock()result.

00781 {
00782         BOOL result;
00783 
00784         START_PROFILE(syscall_fcntl_lock);
00785         result =  fcntl_lock(fd, op, offset, count, type);
00786         END_PROFILE(syscall_fcntl_lock);
00787         return result;
00788 }

static int vfswrap_kernel_flock ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
uint32  share_mode 
) [static]

vfs_default.c790 行で定義されています。

参照先 kernel_flock().

00792 {
00793         START_PROFILE(syscall_kernel_flock);
00794         kernel_flock(fd, share_mode);
00795         END_PROFILE(syscall_kernel_flock);
00796         return 0;
00797 }

static BOOL vfswrap_getlock ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
SMB_OFF_T *  poffset,
SMB_OFF_T *  pcount,
int *  ptype,
pid_t *  ppid 
) [static]

vfs_default.c799 行で定義されています。

参照先 fcntl_getlock()result.

00800 {
00801         BOOL result;
00802 
00803         START_PROFILE(syscall_fcntl_getlock);
00804         result =  fcntl_getlock(fd, poffset, pcount, ptype, ppid);
00805         END_PROFILE(syscall_fcntl_getlock);
00806         return result;
00807 }

static int vfswrap_linux_setlease ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
int  leasetype 
) [static]

vfs_default.c809 行で定義されています。

参照先 errnolinux_set_lease_sighandler()linux_setlease()result.

00811 {
00812         int result = -1;
00813 
00814         START_PROFILE(syscall_linux_setlease);
00815 
00816 #ifdef LINUX
00817         /* first set the signal handler */
00818         if(linux_set_lease_sighandler(fd) == -1)
00819                 return -1;
00820 
00821         result = linux_setlease(fd, leasetype);
00822 #else
00823         errno = ENOSYS;
00824 #endif
00825         END_PROFILE(syscall_linux_setlease);
00826         return result;
00827 }

static int vfswrap_symlink ( vfs_handle_struct handle,
const char *  oldpath,
const char *  newpath 
) [static]

vfs_default.c829 行で定義されています。

参照先 resultsys_symlink().

00830 {
00831         int result;
00832 
00833         START_PROFILE(syscall_symlink);
00834         result = sys_symlink(oldpath, newpath);
00835         END_PROFILE(syscall_symlink);
00836         return result;
00837 }

static int vfswrap_readlink ( vfs_handle_struct handle,
const char *  path,
char *  buf,
size_t  bufsiz 
) [static]

vfs_default.c839 行で定義されています。

参照先 resultsys_readlink().

00840 {
00841         int result;
00842 
00843         START_PROFILE(syscall_readlink);
00844         result = sys_readlink(path, buf, bufsiz);
00845         END_PROFILE(syscall_readlink);
00846         return result;
00847 }

static int vfswrap_link ( vfs_handle_struct handle,
const char *  oldpath,
const char *  newpath 
) [static]

vfs_default.c849 行で定義されています。

参照先 resultsys_link().

00850 {
00851         int result;
00852 
00853         START_PROFILE(syscall_link);
00854         result = sys_link(oldpath, newpath);
00855         END_PROFILE(syscall_link);
00856         return result;
00857 }

static int vfswrap_mknod ( vfs_handle_struct handle,
const char *  pathname,
mode_t  mode,
SMB_DEV_T  dev 
) [static]

vfs_default.c859 行で定義されています。

参照先 resultsys_mknod().

00860 {
00861         int result;
00862 
00863         START_PROFILE(syscall_mknod);
00864         result = sys_mknod(pathname, mode, dev);
00865         END_PROFILE(syscall_mknod);
00866         return result;
00867 }

static char* vfswrap_realpath ( vfs_handle_struct handle,
const char *  path,
char *  resolved_path 
) [static]

vfs_default.c869 行で定義されています。

参照先 resultsys_realpath().

00870 {
00871         char *result;
00872 
00873         START_PROFILE(syscall_realpath);
00874         result = sys_realpath(path, resolved_path);
00875         END_PROFILE(syscall_realpath);
00876         return result;
00877 }

static NTSTATUS vfswrap_notify_watch ( vfs_handle_struct vfs_handle,
struct sys_notify_context ctx,
struct notify_entry e,
void(*)(struct sys_notify_context *ctx, void *private_data, struct notify_event *ev)  callback,
void *  private_data,
void *  handle 
) [static]

vfs_default.c879 行で定義されています。

参照先 inotify_watch().

00886 {
00887         /*
00888          * So far inotify is the only supported default notify mechanism. If
00889          * another platform like the the BSD's or a proprietary Unix comes
00890          * along and wants another default, we can play the same trick we
00891          * played with Posix ACLs.
00892          *
00893          * Until that is the case, hard-code inotify here.
00894          */
00895 #ifdef HAVE_INOTIFY
00896         if (lp_kernel_change_notify(ctx->conn->params)) {
00897                 return inotify_watch(ctx, e, callback, private_data, handle);
00898         }
00899 #endif
00900         /*
00901          * Do nothing, leave everything to notify_internal.c
00902          */
00903         return NT_STATUS_OK;
00904 }

static int vfswrap_chflags ( vfs_handle_struct handle,
const char *  path,
int  flags 
) [static]

vfs_default.c906 行で定義されています。

参照先 errno.

00907 {
00908 #ifdef HAVE_CHFLAGS
00909         return chflags(path, flags);
00910 #else
00911         errno = ENOSYS;
00912         return -1;
00913 #endif
00914 }

static size_t vfswrap_fget_nt_acl ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
uint32  security_info,
SEC_DESC **  ppdesc 
) [static]

vfs_default.c916 行で定義されています。

参照先 get_nt_acl()result.

00917 {
00918         size_t result;
00919 
00920         START_PROFILE(fget_nt_acl);
00921         result = get_nt_acl(fsp, security_info, ppdesc);
00922         END_PROFILE(fget_nt_acl);
00923         return result;
00924 }

static size_t vfswrap_get_nt_acl ( vfs_handle_struct handle,
files_struct fsp,
const char *  name,
uint32  security_info,
SEC_DESC **  ppdesc 
) [static]

vfs_default.c926 行で定義されています。

参照先 get_nt_acl()result.

00927 {
00928         size_t result;
00929 
00930         START_PROFILE(get_nt_acl);
00931         result = get_nt_acl(fsp, security_info, ppdesc);
00932         END_PROFILE(get_nt_acl);
00933         return result;
00934 }

static BOOL vfswrap_fset_nt_acl ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
uint32  security_info_sent,
SEC_DESC psd 
) [static]

vfs_default.c936 行で定義されています。

参照先 resultset_nt_acl().

00937 {
00938         BOOL result;
00939 
00940         START_PROFILE(fset_nt_acl);
00941         result = set_nt_acl(fsp, security_info_sent, psd);
00942         END_PROFILE(fset_nt_acl);
00943         return result;
00944 }

static BOOL vfswrap_set_nt_acl ( vfs_handle_struct handle,
files_struct fsp,
const char *  name,
uint32  security_info_sent,
SEC_DESC psd 
) [static]

vfs_default.c946 行で定義されています。

参照先 resultset_nt_acl().

00947 {
00948         BOOL result;
00949 
00950         START_PROFILE(set_nt_acl);
00951         result = set_nt_acl(fsp, security_info_sent, psd);
00952         END_PROFILE(set_nt_acl);
00953         return result;
00954 }

static int vfswrap_chmod_acl ( vfs_handle_struct handle,
const char *  name,
mode_t  mode 
) [static]

vfs_default.c956 行で定義されています。

参照先 chmod_acl()errnohandleresult.

00957 {
00958 #ifdef HAVE_NO_ACL
00959         errno = ENOSYS;
00960         return -1;
00961 #else
00962         int result;
00963 
00964         START_PROFILE(chmod_acl);
00965         result = chmod_acl(handle->conn, name, mode);
00966         END_PROFILE(chmod_acl);
00967         return result;
00968 #endif
00969 }

static int vfswrap_fchmod_acl ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
mode_t  mode 
) [static]

vfs_default.c971 行で定義されています。

参照先 errnofchmod_acl()result.

00972 {
00973 #ifdef HAVE_NO_ACL
00974         errno = ENOSYS;
00975         return -1;
00976 #else
00977         int result;
00978 
00979         START_PROFILE(fchmod_acl);
00980         result = fchmod_acl(fsp, fd, mode);
00981         END_PROFILE(fchmod_acl);
00982         return result;
00983 #endif
00984 }

static int vfswrap_sys_acl_get_entry ( vfs_handle_struct handle,
SMB_ACL_T  theacl,
int  entry_id,
SMB_ACL_ENTRY_T entry_p 
) [static]

vfs_default.c986 行で定義されています。

参照先 sys_acl_get_entry().

00987 {
00988         return sys_acl_get_entry(theacl, entry_id, entry_p);
00989 }

static int vfswrap_sys_acl_get_tag_type ( vfs_handle_struct handle,
SMB_ACL_ENTRY_T  entry_d,
SMB_ACL_TAG_T tag_type_p 
) [static]

vfs_default.c991 行で定義されています。

参照先 sys_acl_get_tag_type().

00992 {
00993         return sys_acl_get_tag_type(entry_d, tag_type_p);
00994 }

static int vfswrap_sys_acl_get_permset ( vfs_handle_struct handle,
SMB_ACL_ENTRY_T  entry_d,
SMB_ACL_PERMSET_T permset_p 
) [static]

vfs_default.c996 行で定義されています。

参照先 sys_acl_get_permset().

00997 {
00998         return sys_acl_get_permset(entry_d, permset_p);
00999 }

static void* vfswrap_sys_acl_get_qualifier ( vfs_handle_struct handle,
SMB_ACL_ENTRY_T  entry_d 
) [static]

vfs_default.c1001 行で定義されています。

参照先 sys_acl_get_qualifier().

01002 {
01003         return sys_acl_get_qualifier(entry_d);
01004 }

static SMB_ACL_T vfswrap_sys_acl_get_file ( vfs_handle_struct handle,
const char *  path_p,
SMB_ACL_TYPE_T  type 
) [static]

vfs_default.c1006 行で定義されています。

参照先 handlesys_acl_get_file().

01007 {
01008         return sys_acl_get_file(handle, path_p, type);
01009 }

static SMB_ACL_T vfswrap_sys_acl_get_fd ( vfs_handle_struct handle,
files_struct fsp,
int  fd 
) [static]

vfs_default.c1011 行で定義されています。

参照先 handlesys_acl_get_fd().

01012 {
01013         return sys_acl_get_fd(handle, fsp, fd);
01014 }

static int vfswrap_sys_acl_clear_perms ( vfs_handle_struct handle,
SMB_ACL_PERMSET_T  permset 
) [static]

vfs_default.c1016 行で定義されています。

参照先 sys_acl_clear_perms().

01017 {
01018         return sys_acl_clear_perms(permset);
01019 }

static int vfswrap_sys_acl_add_perm ( vfs_handle_struct handle,
SMB_ACL_PERMSET_T  permset,
SMB_ACL_PERM_T  perm 
) [static]

vfs_default.c1021 行で定義されています。

参照先 sys_acl_add_perm().

01022 {
01023         return sys_acl_add_perm(permset, perm);
01024 }

static char* vfswrap_sys_acl_to_text ( vfs_handle_struct handle,
SMB_ACL_T  theacl,
ssize_t *  plen 
) [static]

vfs_default.c1026 行で定義されています。

参照先 sys_acl_to_text().

01027 {
01028         return sys_acl_to_text(theacl, plen);
01029 }

static SMB_ACL_T vfswrap_sys_acl_init ( vfs_handle_struct handle,
int  count 
) [static]

vfs_default.c1031 行で定義されています。

参照先 sys_acl_init().

01032 {
01033         return sys_acl_init(count);
01034 }

static int vfswrap_sys_acl_create_entry ( vfs_handle_struct handle,
SMB_ACL_T pacl,
SMB_ACL_ENTRY_T pentry 
) [static]

vfs_default.c1036 行で定義されています。

参照先 sys_acl_create_entry().

01037 {
01038         return sys_acl_create_entry(pacl, pentry);
01039 }

static int vfswrap_sys_acl_set_tag_type ( vfs_handle_struct handle,
SMB_ACL_ENTRY_T  entry,
SMB_ACL_TAG_T  tagtype 
) [static]

vfs_default.c1041 行で定義されています。

参照先 sys_acl_set_tag_type().

01042 {
01043         return sys_acl_set_tag_type(entry, tagtype);
01044 }

static int vfswrap_sys_acl_set_qualifier ( vfs_handle_struct handle,
SMB_ACL_ENTRY_T  entry,
void *  qual 
) [static]

vfs_default.c1046 行で定義されています。

参照先 sys_acl_set_qualifier().

01047 {
01048         return sys_acl_set_qualifier(entry, qual);
01049 }

static int vfswrap_sys_acl_set_permset ( vfs_handle_struct handle,
SMB_ACL_ENTRY_T  entry,
SMB_ACL_PERMSET_T  permset 
) [static]

vfs_default.c1051 行で定義されています。

参照先 sys_acl_set_permset().

01052 {
01053         return sys_acl_set_permset(entry, permset);
01054 }

static int vfswrap_sys_acl_valid ( vfs_handle_struct handle,
SMB_ACL_T  theacl 
) [static]

vfs_default.c1056 行で定義されています。

参照先 sys_acl_valid().

01057 {
01058         return sys_acl_valid(theacl );
01059 }

static int vfswrap_sys_acl_set_file ( vfs_handle_struct handle,
const char *  name,
SMB_ACL_TYPE_T  acltype,
SMB_ACL_T  theacl 
) [static]

vfs_default.c1061 行で定義されています。

参照先 handlesys_acl_set_file().

01062 {
01063         return sys_acl_set_file(handle, name, acltype, theacl);
01064 }

static int vfswrap_sys_acl_set_fd ( vfs_handle_struct handle,
files_struct fsp,
int  fd,
SMB_ACL_T  theacl 
) [static]

vfs_default.c1066 行で定義されています。

参照先 handlesys_acl_set_fd().

01067 {
01068         return sys_acl_set_fd(handle, fsp, fd, theacl);
01069 }

static int vfswrap_sys_acl_delete_def_file ( vfs_handle_struct handle,
const char *  path 
) [static]

vfs_default.c1071 行で定義されています。

参照先 handlesys_acl_delete_def_file().

01072 {
01073         return sys_acl_delete_def_file(handle, path);
01074 }

static int vfswrap_sys_acl_get_perm ( vfs_handle_struct handle,
SMB_ACL_PERMSET_T  permset,
SMB_ACL_PERM_T  perm 
) [static]

vfs_default.c1076 行で定義されています。

参照先 sys_acl_get_perm().

01077 {
01078         return sys_acl_get_perm(permset, perm);
01079 }

static int vfswrap_sys_acl_free_text ( vfs_handle_struct handle,
char *  text 
) [static]

vfs_default.c1081 行で定義されています。

参照先 sys_acl_free_text().

01082 {
01083         return sys_acl_free_text(text);
01084 }

static int vfswrap_sys_acl_free_acl ( vfs_handle_struct handle,
SMB_ACL_T  posix_acl 
) [static]

vfs_default.c1086 行で定義されています。

参照先 sys_acl_free_acl().

01087 {
01088         return sys_acl_free_acl(posix_acl);
01089 }

static int vfswrap_sys_acl_free_qualifier ( vfs_handle_struct handle,
void *  qualifier,
SMB_ACL_TAG_T  tagtype 
) [static]

vfs_default.c1091 行で定義されています。

参照先 sys_acl_free_qualifier().

01092 {
01093         return sys_acl_free_qualifier(qualifier, tagtype);
01094 }

static ssize_t vfswrap_getxattr ( struct vfs_handle_struct handle,
const char *  path,
const char *  name,
void *  value,
size_t  size 
) [static]

vfs_default.c1100 行で定義されています。

参照先 sys_getxattr().

01101 {
01102         return sys_getxattr(path, name, value, size);
01103 }

static ssize_t vfswrap_lgetxattr ( struct vfs_handle_struct handle,
const char *  path,
const char *  name,
void *  value,
size_t  size 
) [static]

vfs_default.c1105 行で定義されています。

参照先 sys_lgetxattr().

01106 {
01107         return sys_lgetxattr(path, name, value, size);
01108 }

static ssize_t vfswrap_fgetxattr ( struct vfs_handle_struct handle,
struct files_struct fsp,
int  fd,
const char *  name,
void *  value,
size_t  size 
) [static]

vfs_default.c1110 行で定義されています。

参照先 sys_fgetxattr().

01111 {
01112         return sys_fgetxattr(fd, name, value, size);
01113 }

static ssize_t vfswrap_listxattr ( struct vfs_handle_struct handle,
const char *  path,
char *  list,
size_t  size 
) [static]

vfs_default.c1115 行で定義されています。

参照先 sys_listxattr().

01116 {
01117         return sys_listxattr(path, list, size);
01118 }

ssize_t vfswrap_llistxattr ( struct vfs_handle_struct handle,
const char *  path,
char *  list,
size_t  size 
)

vfs_default.c1120 行で定義されています。

参照先 sys_llistxattr().

01121 {
01122         return sys_llistxattr(path, list, size);
01123 }

ssize_t vfswrap_flistxattr ( struct vfs_handle_struct handle,
struct files_struct fsp,
int  fd,
char *  list,
size_t  size 
)

vfs_default.c1125 行で定義されています。

参照先 sys_flistxattr().

01126 {
01127         return sys_flistxattr(fd, list, size);
01128 }

static int vfswrap_removexattr ( struct vfs_handle_struct handle,
const char *  path,
const char *  name 
) [static]

vfs_default.c1130 行で定義されています。

参照先 sys_removexattr().

01131 {
01132         return sys_removexattr(path, name);
01133 }

static int vfswrap_lremovexattr ( struct vfs_handle_struct handle,
const char *  path,
const char *  name 
) [static]

vfs_default.c1135 行で定義されています。

参照先 sys_lremovexattr().

01136 {
01137         return sys_lremovexattr(path, name);
01138 }

static int vfswrap_fremovexattr ( struct vfs_handle_struct handle,
struct files_struct fsp,
int  fd,
const char *  name 
) [static]

vfs_default.c1140 行で定義されています。

参照先 sys_fremovexattr().

01141 {
01142         return sys_fremovexattr(fd, name);
01143 }

static int vfswrap_setxattr ( struct vfs_handle_struct handle,
const char *  path,
const char *  name,
const void *  value,
size_t  size,
int  flags 
) [static]

vfs_default.c1145 行で定義されています。

参照先 sys_setxattr().

01146 {
01147         return sys_setxattr(path, name, value, size, flags);
01148 }

static int vfswrap_lsetxattr ( struct vfs_handle_struct handle,
const char *  path,
const char *  name,
const void *  value,
size_t  size,
int  flags 
) [static]

vfs_default.c1150 行で定義されています。

参照先 sys_lsetxattr().

01151 {
01152         return sys_lsetxattr(path, name, value, size, flags);
01153 }

static int vfswrap_fsetxattr ( struct vfs_handle_struct handle,
struct files_struct fsp,
int  fd,
const char *  name,
const void *  value,
size_t  size,
int  flags 
) [static]

vfs_default.c1155 行で定義されています。

参照先 sys_fsetxattr().

01156 {
01157         return sys_fsetxattr(fd, name, value, size, flags);
01158 }

static int vfswrap_aio_read ( struct vfs_handle_struct handle,
struct files_struct fsp,
SMB_STRUCT_AIOCB *  aiocb 
) [static]

vfs_default.c1160 行で定義されています。

参照先 sys_aio_read().

01161 {
01162         return sys_aio_read(aiocb);
01163 }

static int vfswrap_aio_write ( struct vfs_handle_struct handle,
struct files_struct fsp,
SMB_STRUCT_AIOCB *  aiocb 
) [static]

vfs_default.c1165 行で定義されています。

参照先 sys_aio_write().

01166 {
01167         return sys_aio_write(aiocb);
01168 }

static ssize_t vfswrap_aio_return ( struct vfs_handle_struct handle,
struct files_struct fsp,
SMB_STRUCT_AIOCB *  aiocb 
) [static]

vfs_default.c1170 行で定義されています。

参照先 sys_aio_return().

01171 {
01172         return sys_aio_return(aiocb);
01173 }

static int vfswrap_aio_cancel ( struct vfs_handle_struct handle,
struct files_struct fsp,
int  fd,
SMB_STRUCT_AIOCB *  aiocb 
) [static]

vfs_default.c1175 行で定義されています。

参照先 sys_aio_cancel().

01176 {
01177         return sys_aio_cancel(fd, aiocb);
01178 }

static int vfswrap_aio_error ( struct vfs_handle_struct handle,
struct files_struct fsp,
SMB_STRUCT_AIOCB *  aiocb 
) [static]

vfs_default.c1180 行で定義されています。

参照先 sys_aio_error().

01181 {
01182         return sys_aio_error(aiocb);
01183 }

static int vfswrap_aio_fsync ( struct vfs_handle_struct handle,
struct files_struct fsp,
int  op,
SMB_STRUCT_AIOCB *  aiocb 
) [static]

vfs_default.c1185 行で定義されています。

参照先 sys_aio_fsync().

01186 {
01187         return sys_aio_fsync(op, aiocb);
01188 }

static int vfswrap_aio_suspend ( struct vfs_handle_struct handle,
struct files_struct fsp,
const SMB_STRUCT_AIOCB *const   aiocb[],
int  n,
const struct timespec *  timeout 
) [static]

vfs_default.c1190 行で定義されています。

参照先 sys_aio_suspend().

01191 {
01192         return sys_aio_suspend(aiocb, n, timeout);
01193 }

NTSTATUS vfs_default_init ( void   ) 

vfs_default.c1413 行で定義されています。

参照先 smb_panic()smb_register_vfs()SMB_VFS_OP_LASTvfs_default_ops.

01414 {
01415         unsigned int needed = SMB_VFS_OP_LAST + 1; /* convert from index to count */
01416 
01417         if (ARRAY_SIZE(vfs_default_ops) != needed) {
01418                 DEBUG(0, ("%s: %u ops registered, but %u ops are required\n",
01419                         DEFAULT_VFS_MODULE_NAME, (unsigned int)ARRAY_SIZE(vfs_default_ops), needed));
01420                 smb_panic("operation(s) missing from default VFS module");
01421         }
01422 
01423         return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
01424                                 DEFAULT_VFS_MODULE_NAME, vfs_default_ops);
01425 }


変数

vfs_op_tuple vfs_default_ops[] [static]

vfs_default.c1195 行で定義されています。

参照元 vfs_default_init().


Sambaに対してSat Aug 29 21:23:51 2009に生成されました。  doxygen 1.4.7