diff options
author | Volker Lendecke <vl@samba.org> | 2008-12-10 23:14:01 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-12-10 23:14:01 +0100 |
commit | 1896ccb24732fc9a3407224209d741640dd602d3 (patch) | |
tree | f68cedfcb41406624af26c017ff268ee33aef501 /source3/modules | |
parent | 0114cb52ca552bc8c70d6f8160ca5a481e41154d (diff) | |
download | samba-1896ccb24732fc9a3407224209d741640dd602d3.tar.gz samba-1896ccb24732fc9a3407224209d741640dd602d3.tar.bz2 samba-1896ccb24732fc9a3407224209d741640dd602d3.zip |
Revert "Make use of smbd_gpfs_get_realfilename_path in unix_convert"
This reverts commit b37684ffcec4ba0beada55d37bcaf4f5e79bcd58.
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/gpfs.c | 25 | ||||
-rw-r--r-- | source3/modules/vfs_gpfs.c | 61 |
2 files changed, 0 insertions, 86 deletions
diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c index 92aecb9fb6..c4b2518e02 100644 --- a/source3/modules/gpfs.c +++ b/source3/modules/gpfs.c @@ -31,8 +31,6 @@ static int (*gpfs_set_share_fn)(int fd, unsigned int allow, unsigned int deny); static int (*gpfs_set_lease_fn)(int fd, unsigned int leaseType); static int (*gpfs_getacl_fn)(char *pathname, int flags, void *acl); static int (*gpfs_putacl_fn)(char *pathname, int flags, void *acl); -static int (*gpfs_get_realfilename_path_fn)(char *pathname, char *filenamep, - int *buflen); bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, @@ -136,17 +134,6 @@ int smbd_gpfs_putacl(char *pathname, int flags, void *acl) return gpfs_putacl_fn(pathname, flags, acl); } -int smbd_gpfs_get_realfilename_path(char *pathname, char *filenamep, - int *buflen) -{ - if (gpfs_get_realfilename_path_fn == NULL) { - errno = ENOSYS; - return -1; - } - - return gpfs_get_realfilename_path_fn(pathname, filenamep, buflen); -} - static bool init_gpfs_function_lib(void *plibhandle_pointer, const char *libname, void *pfn_pointer, const char *fn_name) @@ -155,9 +142,6 @@ static bool init_gpfs_function_lib(void *plibhandle_pointer, void **libhandle_pointer = (void **)plibhandle_pointer; void **fn_pointer = (void **)pfn_pointer; - DEBUG(10, ("trying to load name %s from %s\n", - fn_name, libname)); - if (*libhandle_pointer == NULL) { *libhandle_pointer = sys_dlopen(libname, RTLD_LAZY); did_open_here = true; @@ -203,8 +187,6 @@ void init_gpfs(void) init_gpfs_function(&gpfs_set_lease_fn, "gpfs_set_lease"); init_gpfs_function(&gpfs_getacl_fn, "gpfs_getacl"); init_gpfs_function(&gpfs_putacl_fn, "gpfs_putacl"); - init_gpfs_function(&gpfs_get_realfilename_path_fn, - "gpfs_get_realfilename_path"); gpfs_share_modes = lp_parm_bool(-1, "gpfs", "sharemodes", True); gpfs_leases = lp_parm_bool(-1, "gpfs", "leases", True); @@ -244,13 +226,6 @@ int smbd_gpfs_putacl(char *pathname, int flags, void *acl) return -1; } -int smbd_gpfs_get_realfilename_path(char *pathname, char *fileamep, - int *buflen) -{ - errno = ENOSYS; - return -1; -} - void init_gpfs(void) { return; diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 780bd9b8a5..5cadce9e1d 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -72,64 +72,7 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp, return ret; } -static int vfs_gpfs_get_real_filename(struct vfs_handle_struct *handle, - const char *path, - const char *name, - TALLOC_CTX *mem_ctx, - char **found_name) -{ - int result; - char *full_path; - char real_pathname[PATH_MAX+1]; - int buflen; - - full_path = talloc_asprintf(talloc_tos(), "%s/%s", path, name); - if (full_path == NULL) { - errno = ENOMEM; - return -1; - } - - buflen = sizeof(real_pathname) - 1; - - result = smbd_gpfs_get_realfilename_path(full_path, real_pathname, - &buflen); - - TALLOC_FREE(full_path); - - if (result == -1) { - DEBUG(10, ("smbd_gpfs_get_realfilename_path returned %s\n", - strerror(errno))); - return -1; - } - - /* - * GPFS does not necessarily null-terminate the returned path - * but instead returns the buffer length in buflen. - */ - if (buflen < sizeof(real_pathname)) { - real_pathname[buflen] = '\0'; - } else { - real_pathname[sizeof(real_pathname)-1] = '\0'; - } - - DEBUG(10, ("smbd_gpfs_get_realfilename_path: %s/%s -> %s\n", - path, name, real_pathname)); - - name = strrchr_m(real_pathname, '/'); - if (name == NULL) { - errno = ENOENT; - return -1; - } - - *found_name = talloc_strdup(mem_ctx, name+1); - if (*found_name == NULL) { - errno = ENOMEM; - return -1; - } - - return 0; -} static void gpfs_dumpacl(int level, struct gpfs_acl *gacl) { @@ -879,10 +822,6 @@ static vfs_op_tuple gpfs_op_tuples[] = { SMB_VFS_OP_LINUX_SETLEASE, SMB_VFS_LAYER_OPAQUE }, - { SMB_VFS_OP(vfs_gpfs_get_real_filename), - SMB_VFS_OP_GET_REAL_FILENAME, - SMB_VFS_LAYER_OPAQUE }, - { SMB_VFS_OP(gpfsacl_fget_nt_acl), SMB_VFS_OP_FGET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT }, |