summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-04 08:46:25 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-05 13:39:01 +1000
commit19eee33d82b4c1947b646241b6f22651abbce19d (patch)
tree7be6faa2f4a5072bffd420af0e8f70fab7113f48 /source3
parent4af0f5f135211f49f8d6365e1819c11037485170 (diff)
downloadsamba-19eee33d82b4c1947b646241b6f22651abbce19d.tar.gz
samba-19eee33d82b4c1947b646241b6f22651abbce19d.tar.bz2
samba-19eee33d82b4c1947b646241b6f22651abbce19d.zip
s3-vfs: Remove unused lremovexattr call from VFS modules, system.c and configure
If this is ever needed again, it would be more appropriate as an options argument to removexattr. Andrew Bartlett
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in6
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/include/vfs.h3
-rw-r--r--source3/include/vfs_macros.h5
-rw-r--r--source3/lib/system.c37
-rw-r--r--source3/modules/vfs_cap.c13
-rw-r--r--source3/modules/vfs_catia.c23
-rw-r--r--source3/modules/vfs_default.c6
-rw-r--r--source3/modules/vfs_full_audit.c17
-rw-r--r--source3/modules/vfs_onefs_shadow_copy.c10
-rw-r--r--source3/modules/vfs_shadow_copy2.c28
-rw-r--r--source3/modules/vfs_time_audit.c20
-rw-r--r--source3/smbd/vfs.c7
-rw-r--r--source3/wscript4
14 files changed, 5 insertions, 175 deletions
diff --git a/source3/configure.in b/source3/configure.in
index c369479226..40308d2668 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1301,16 +1301,16 @@ case "$host_os" in
*)
AC_SEARCH_LIBS(getxattr, [attr])
AC_CHECK_FUNCS(getxattr,[
- AC_CHECK_FUNCS(fgetxattr listxattr flistxattr removexattr lremovexattr fremovexattr setxattr fsetxattr)
+ AC_CHECK_FUNCS(fgetxattr listxattr flistxattr removexattr fremovexattr setxattr fsetxattr)
])
AC_CHECK_FUNCS(getea,[
- AC_CHECK_FUNCS(fgetea lgetea listea flistea removeea fremoveea lremoveea setea fsetea)
+ AC_CHECK_FUNCS(fgetea lgetea listea flistea removeea fremoveea setea fsetea)
])
AC_CHECK_FUNCS(attr_get,[
AC_CHECK_FUNCS(attr_list attr_set attr_remove attr_getf attr_listf attr_setf attr_removef)
])
AC_CHECK_FUNCS(extattr_delete_file,[
- AC_CHECK_FUNCS(extattr_delete_fd extattr_delete_link extattr_get_fd extattr_get_file extattr_get_link extattr_list_fd extattr_list_file extattr_list_link extattr_set_fd extattr_set_file)
+ AC_CHECK_FUNCS(extattr_delete_fd extattr_get_fd extattr_get_file extattr_get_link extattr_list_fd extattr_list_file extattr_list_link extattr_set_fd extattr_set_file)
])
;;
esac
diff --git a/source3/include/proto.h b/source3/include/proto.h
index b4b91e2b18..1d3dba6a83 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -355,7 +355,6 @@ ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size);
ssize_t sys_listxattr (const char *path, char *list, size_t size);
ssize_t sys_flistxattr (int filedes, char *list, size_t size);
int sys_removexattr (const char *path, const char *name);
-int sys_lremovexattr (const char *path, const char *name);
int sys_fremovexattr (int filedes, const char *name);
int sys_setxattr (const char *path, const char *name, const void *value, size_t size, int flags);
int sys_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags);
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 0e42a3e812..48b0973fe5 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -403,7 +403,6 @@ struct vfs_fn_pointers {
ssize_t (*listxattr_fn)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
ssize_t (*flistxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size);
int (*removexattr_fn)(struct vfs_handle_struct *handle, const char *path, const char *name);
- int (*lremovexattr_fn)(struct vfs_handle_struct *handle, const char *path, const char *name);
int (*fremovexattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name);
int (*setxattr_fn)(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags);
int (*fsetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags);
@@ -815,8 +814,6 @@ ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle,
size_t size);
int smb_vfs_call_removexattr(struct vfs_handle_struct *handle,
const char *path, const char *name);
-int smb_vfs_call_lremovexattr(struct vfs_handle_struct *handle,
- const char *path, const char *name);
int smb_vfs_call_fremovexattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, const char *name);
int smb_vfs_call_setxattr(struct vfs_handle_struct *handle, const char *path,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index e568ed0f49..c324439e3f 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -539,11 +539,6 @@
#define SMB_VFS_NEXT_REMOVEXATTR(handle,path,name) \
smb_vfs_call_removexattr((handle)->next,(path),(name))
-#define SMB_VFS_LREMOVEXATTR(conn,path,name) \
- smb_vfs_call_lremovexattr((conn)->vfs_handles,(path),(name))
-#define SMB_VFS_NEXT_LREMOVEXATTR(handle,path,name) \
- smb_vfs_call_lremovexattr((handle)->next,(path),(name))
-
#define SMB_VFS_FREMOVEXATTR(fsp,name) \
smb_vfs_call_fremovexattr((fsp)->conn->vfs_handles, (fsp), (name))
#define SMB_VFS_NEXT_FREMOVEXATTR(handle,fsp,name) \
diff --git a/source3/lib/system.c b/source3/lib/system.c
index abebb43915..8a381732cd 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1680,43 +1680,6 @@ int sys_removexattr (const char *path, const char *name)
#endif
}
-int sys_lremovexattr (const char *path, const char *name)
-{
-#if defined(HAVE_LREMOVEXATTR)
- return lremovexattr(path, name);
-#elif defined(HAVE_REMOVEXATTR) && defined(XATTR_ADD_OPT)
- int options = XATTR_NOFOLLOW;
- return removexattr(path, name, options);
-#elif defined(HAVE_LREMOVEEA)
- return lremoveea(path, name);
-#elif defined(HAVE_EXTATTR_DELETE_LINK)
- char *s;
- int attrnamespace = (strncmp(name, "system", 6) == 0) ?
- EXTATTR_NAMESPACE_SYSTEM : EXTATTR_NAMESPACE_USER;
- const char *attrname = ((s=strchr_m(name, '.')) == NULL) ? name : s + 1;
-
- return extattr_delete_link(path, attrnamespace, attrname);
-#elif defined(HAVE_ATTR_REMOVE)
- int flags = ATTR_DONTFOLLOW;
- char *attrname = strchr(name,'.') + 1;
-
- if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT;
-
- return attr_remove(path, attrname, flags);
-#elif defined(HAVE_ATTROPEN)
- int ret = -1;
- int attrdirfd = solaris_attropen(path, ".", O_RDONLY|AT_SYMLINK_NOFOLLOW, 0);
- if (attrdirfd >= 0) {
- ret = solaris_unlinkat(attrdirfd, name);
- close(attrdirfd);
- }
- return ret;
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
int sys_fremovexattr (int filedes, const char *name)
{
#if defined(HAVE_FREMOVEXATTR)
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index 406126cade..2454e12b6f 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -488,18 +488,6 @@ static int cap_removexattr(vfs_handle_struct *handle, const char *path, const ch
return SMB_VFS_NEXT_REMOVEXATTR(handle, cappath, capname);
}
-static int cap_lremovexattr(vfs_handle_struct *handle, const char *path, const char *name)
-{
- char *cappath = capencode(talloc_tos(), path);
- char *capname = capencode(talloc_tos(), name);
-
- if (!cappath || !capname) {
- errno = ENOMEM;
- return -1;
- }
- return SMB_VFS_NEXT_LREMOVEXATTR(handle, cappath, capname);
-}
-
static int cap_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *path)
{
char *cappath = capencode(talloc_tos(), path);
@@ -563,7 +551,6 @@ static struct vfs_fn_pointers vfs_cap_fns = {
.fgetxattr_fn = cap_fgetxattr,
.listxattr_fn = cap_listxattr,
.removexattr_fn = cap_removexattr,
- .lremovexattr_fn = cap_lremovexattr,
.fremovexattr_fn = cap_fremovexattr,
.setxattr_fn = cap_setxattr,
.fsetxattr_fn = cap_fsetxattr
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 6979dc6c8d..821a755e06 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -875,28 +875,6 @@ catia_removexattr(vfs_handle_struct *handle, const char *path,
}
static int
-catia_lremovexattr(vfs_handle_struct *handle, const char *path,
- const char *name)
-{
- char *mapped_name = NULL;
- NTSTATUS status;
- ssize_t ret;
-
- status = catia_string_replace_allocate(handle->conn,
- name, &mapped_name, vfs_translate_to_unix);
- if (!NT_STATUS_IS_OK(status)) {
- errno = map_errno_from_nt_status(status);
- return -1;
- }
-
-
- ret = SMB_VFS_NEXT_LREMOVEXATTR(handle, path, mapped_name);
- TALLOC_FREE(mapped_name);
-
- return ret;
-}
-
-static int
catia_setxattr(vfs_handle_struct *handle, const char *path,
const char *name, const void *value, size_t size,
int flags)
@@ -944,7 +922,6 @@ static struct vfs_fn_pointers vfs_catia_fns = {
.getxattr_fn = catia_getxattr,
.listxattr_fn = catia_listxattr,
.removexattr_fn = catia_removexattr,
- .lremovexattr_fn = catia_lremovexattr,
.setxattr_fn = catia_setxattr,
};
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 08ad80f8d3..9704f5edbb 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2028,11 +2028,6 @@ static int vfswrap_removexattr(struct vfs_handle_struct *handle, const char *pat
return sys_removexattr(path, name);
}
-static int vfswrap_lremovexattr(struct vfs_handle_struct *handle, const char *path, const char *name)
-{
- return sys_lremovexattr(path, name);
-}
-
static int vfswrap_fremovexattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name)
{
return sys_fremovexattr(fsp->fh->fd, name);
@@ -2268,7 +2263,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
.listxattr_fn = vfswrap_listxattr,
.flistxattr_fn = vfswrap_flistxattr,
.removexattr_fn = vfswrap_removexattr,
- .lremovexattr_fn = vfswrap_lremovexattr,
.fremovexattr_fn = vfswrap_fremovexattr,
.setxattr_fn = vfswrap_setxattr,
.fsetxattr_fn = vfswrap_fsetxattr,
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 73e41ed265..4457860d2e 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -195,7 +195,6 @@ typedef enum _vfs_op_type {
SMB_VFS_OP_LISTXATTR,
SMB_VFS_OP_FLISTXATTR,
SMB_VFS_OP_REMOVEXATTR,
- SMB_VFS_OP_LREMOVEXATTR,
SMB_VFS_OP_FREMOVEXATTR,
SMB_VFS_OP_SETXATTR,
SMB_VFS_OP_FSETXATTR,
@@ -323,7 +322,6 @@ static struct {
{ SMB_VFS_OP_LISTXATTR, "listxattr" },
{ SMB_VFS_OP_FLISTXATTR, "flistxattr" },
{ SMB_VFS_OP_REMOVEXATTR, "removexattr" },
- { SMB_VFS_OP_LREMOVEXATTR, "lremovexattr" },
{ SMB_VFS_OP_FREMOVEXATTR, "fremovexattr" },
{ SMB_VFS_OP_SETXATTR, "setxattr" },
{ SMB_VFS_OP_FSETXATTR, "fsetxattr" },
@@ -2022,20 +2020,6 @@ static int smb_full_audit_removexattr(struct vfs_handle_struct *handle,
return result;
}
-static int smb_full_audit_lremovexattr(struct vfs_handle_struct *handle,
- const char *path,
- const char *name)
-{
- int result;
-
- result = SMB_VFS_NEXT_LREMOVEXATTR(handle, path, name);
-
- do_log(SMB_VFS_OP_LREMOVEXATTR, (result >= 0), handle,
- "%s|%s", path, name);
-
- return result;
-}
-
static int smb_full_audit_fremovexattr(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const char *name)
@@ -2294,7 +2278,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
.listxattr_fn = smb_full_audit_listxattr,
.flistxattr_fn = smb_full_audit_flistxattr,
.removexattr_fn = smb_full_audit_removexattr,
- .lremovexattr_fn = smb_full_audit_lremovexattr,
.fremovexattr_fn = smb_full_audit_fremovexattr,
.setxattr_fn = smb_full_audit_setxattr,
.fsetxattr_fn = smb_full_audit_fsetxattr,
diff --git a/source3/modules/vfs_onefs_shadow_copy.c b/source3/modules/vfs_onefs_shadow_copy.c
index 531f9b4b83..ac61852d3d 100644
--- a/source3/modules/vfs_onefs_shadow_copy.c
+++ b/source3/modules/vfs_onefs_shadow_copy.c
@@ -587,15 +587,6 @@ onefs_shadow_copy_removexattr(vfs_handle_struct *handle, const char *path,
}
static int
-onefs_shadow_copy_lremovexattr(vfs_handle_struct *handle, const char *path,
- const char *name)
-{
- SHADOW_NEXT(LREMOVEXATTR,
- (handle, cpath ?: path, name),
- int);
-}
-
-static int
onefs_shadow_copy_setxattr(vfs_handle_struct *handle, const char *path,
const char *name, const void *value, size_t size,
int flags)
@@ -663,7 +654,6 @@ static struct vfs_fn_pointers onefs_shadow_copy_fns = {
.getxattr_fn = onefs_shadow_copy_getxattr,
.listxattr_fn = onefs_shadow_copy_listxattr,
.removexattr_fn = onefs_shadow_copy_removexattr,
- .lremovexattr_fn = onefs_shadow_copy_lremovexattr,
.setxattr_fn = onefs_shadow_copy_setxattr,
.lsetxattr_fn = onefs_shadow_copy_lsetxattr,
.is_offline_fn = onefs_shadow_copy_is_offline,
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 544baa44f7..24356ece1f 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -1377,33 +1377,6 @@ static int shadow_copy2_removexattr(vfs_handle_struct *handle,
return ret;
}
-static int shadow_copy2_lremovexattr(vfs_handle_struct *handle,
- const char *fname, const char *aname)
-{
- time_t timestamp;
- char *stripped;
- int ret, saved_errno;
- char *conv;
-
- if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, fname,
- &timestamp, &stripped)) {
- return -1;
- }
- if (timestamp == 0) {
- return SMB_VFS_NEXT_LREMOVEXATTR(handle, fname, aname);
- }
- conv = shadow_copy2_convert(talloc_tos(), handle, stripped, timestamp);
- TALLOC_FREE(stripped);
- if (conv == NULL) {
- return -1;
- }
- ret = SMB_VFS_NEXT_LREMOVEXATTR(handle, conv, aname);
- saved_errno = errno;
- TALLOC_FREE(conv);
- errno = saved_errno;
- return ret;
-}
-
static int shadow_copy2_setxattr(struct vfs_handle_struct *handle,
const char *fname,
const char *aname, const void *value,
@@ -1530,7 +1503,6 @@ static struct vfs_fn_pointers vfs_shadow_copy2_fns = {
.getxattr_fn = shadow_copy2_getxattr,
.listxattr_fn = shadow_copy2_listxattr,
.removexattr_fn = shadow_copy2_removexattr,
- .lremovexattr_fn = shadow_copy2_lremovexattr,
.setxattr_fn = shadow_copy2_setxattr,
.chmod_acl_fn = shadow_copy2_chmod_acl,
.chflags_fn = shadow_copy2_chflags,
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 747fc79bd2..ac96893cc4 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -2032,25 +2032,6 @@ static int smb_time_audit_removexattr(struct vfs_handle_struct *handle,
return result;
}
-static int smb_time_audit_lremovexattr(struct vfs_handle_struct *handle,
- const char *path, const char *name)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_LREMOVEXATTR(handle, path, name);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("lremovexattr", timediff);
- }
-
- return result;
-}
-
static int smb_time_audit_fremovexattr(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const char *name)
@@ -2376,7 +2357,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
.listxattr_fn = smb_time_audit_listxattr,
.flistxattr_fn = smb_time_audit_flistxattr,
.removexattr_fn = smb_time_audit_removexattr,
- .lremovexattr_fn = smb_time_audit_lremovexattr,
.fremovexattr_fn = smb_time_audit_fremovexattr,
.setxattr_fn = smb_time_audit_setxattr,
.fsetxattr_fn = smb_time_audit_fsetxattr,
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 923bd7c9a2..f8a4199470 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -2180,13 +2180,6 @@ int smb_vfs_call_removexattr(struct vfs_handle_struct *handle,
return handle->fns->removexattr_fn(handle, path, name);
}
-int smb_vfs_call_lremovexattr(struct vfs_handle_struct *handle,
- const char *path, const char *name)
-{
- VFS_FIND(lremovexattr);
- return handle->fns->lremovexattr_fn(handle, path, name);
-}
-
int smb_vfs_call_fremovexattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, const char *name)
{
diff --git a/source3/wscript b/source3/wscript
index cbf77bd5bd..b091e0ca65 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -230,7 +230,7 @@ attropen attr_remove attr_removef attr_set attr_setf
bindtextdomain _chdir __chdir chflags chmod _close __close _closedir
__closedir crypt16 delproplist devnm dgettext dirfd
DNSServiceRegister _dup __dup _dup2 __dup2 endmntent execl
-extattr_delete_fd extattr_delete_link extattr_get_fd extattr_get_file
+extattr_delete_fd extattr_get_fd extattr_get_file
extattr_get_link extattr_list_fd extattr_list_file
extattr_set_fd extattr_set_file _facl __facl _fchdir
__fchdir fchmod fchown _fcntl __fcntl fcvt fcvtl fdatasync
@@ -243,7 +243,7 @@ getgrent getgrnam getgrouplist getgrset getmntent getpagesize
getproplist get_proplist_entry getpwanam getpwent_r getrlimit gettext
glob grantpt hstrerror initgroups innetgr
inotify_init listea listxattr
-llseek _llseek __llseek lremoveea lremovexattr _lseek __lseek
+llseek _llseek __llseek _lseek __lseek
_lstat __lstat lutimes
__lxstat memalign mknod mlock mlockall munlock munlockall
_open __open _opendir __opendir