summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-02 12:43:15 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-05 13:39:00 +1000
commitb2f7cfa848def91b6ea458e1ad14af8e96ad4ca3 (patch)
treeed0de7fcf8e2b614029ae64ffc5e263ed587a36b /source3
parent52113b3bd25b12c766985be7abd042d984c924e6 (diff)
downloadsamba-b2f7cfa848def91b6ea458e1ad14af8e96ad4ca3.tar.gz
samba-b2f7cfa848def91b6ea458e1ad14af8e96ad4ca3.tar.bz2
samba-b2f7cfa848def91b6ea458e1ad14af8e96ad4ca3.zip
s3-vfs: Remove unused lgetxattr call from VFS modules, system.c and configure
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in2
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/include/vfs.h4
-rw-r--r--source3/include/vfs_macros.h5
-rw-r--r--source3/lib/system.c51
-rw-r--r--source3/modules/vfs_cap.c14
-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.c31
-rw-r--r--source3/modules/vfs_time_audit.c21
-rw-r--r--source3/smbd/vfs.c8
-rw-r--r--source3/wscript2
14 files changed, 2 insertions, 193 deletions
diff --git a/source3/configure.in b/source3/configure.in
index e278a390b0..58dd1c2307 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1301,7 +1301,7 @@ case "$host_os" in
*)
AC_SEARCH_LIBS(getxattr, [attr])
AC_CHECK_FUNCS(getxattr,[
- AC_CHECK_FUNCS(lgetxattr fgetxattr listxattr llistxattr flistxattr removexattr lremovexattr fremovexattr setxattr lsetxattr fsetxattr)
+ AC_CHECK_FUNCS(fgetxattr listxattr llistxattr flistxattr removexattr lremovexattr fremovexattr setxattr lsetxattr fsetxattr)
])
AC_CHECK_FUNCS(getea,[
AC_CHECK_FUNCS(fgetea lgetea listea flistea llistea removeea fremoveea lremoveea setea fsetea lsetea)
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 303ea9ccb4..2872ada33d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -351,7 +351,6 @@ int sys_setgroups(gid_t UNUSED(primary_gid), int setlen, gid_t *gidset);
int sys_popen(const char *command);
int sys_pclose(int fd);
ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t size);
-ssize_t sys_lgetxattr (const char *path, const char *name, void *value, size_t size);
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_llistxattr (const char *path, char *list, size_t size);
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 585214f77b..d1aa9e96dc 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -398,7 +398,6 @@ struct vfs_fn_pointers {
/* EA operations. */
ssize_t (*getxattr_fn)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
- ssize_t (*lgetxattr_fn)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
ssize_t (*fgetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size);
ssize_t (*listxattr_fn)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
ssize_t (*llistxattr_fn)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
@@ -805,9 +804,6 @@ int smb_vfs_call_sys_acl_free_qualifier(struct vfs_handle_struct *handle,
ssize_t smb_vfs_call_getxattr(struct vfs_handle_struct *handle,
const char *path, const char *name, void *value,
size_t size);
-ssize_t smb_vfs_call_lgetxattr(struct vfs_handle_struct *handle,
- const char *path, const char *name, void *value,
- size_t size);
ssize_t smb_vfs_call_fgetxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, const char *name,
void *value, size_t size);
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 68165fe092..e35630a629 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -519,11 +519,6 @@
#define SMB_VFS_NEXT_GETXATTR(handle,path,name,value,size) \
smb_vfs_call_getxattr((handle)->next,(path),(name),(value),(size))
-#define SMB_VFS_LGETXATTR(conn,path,name,value,size) \
- smb_vfs_call_lgetxattr((conn)->vfs_handles,(path),(name),(value),(size))
-#define SMB_VFS_NEXT_LGETXATTR(handle,path,name,value,size) \
- smb_vfs_call_lgetxattr((handle)->next,(path),(name),(value),(size))
-
#define SMB_VFS_FGETXATTR(fsp,name,value,size) \
smb_vfs_call_fgetxattr((fsp)->conn->vfs_handles, (fsp), (name),(value),(size))
#define SMB_VFS_NEXT_FGETXATTR(handle,fsp,name,value,size) \
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 5ba3aebd69..70df46605d 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1365,57 +1365,6 @@ ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t si
#endif
}
-ssize_t sys_lgetxattr (const char *path, const char *name, void *value, size_t size)
-{
-#if defined(HAVE_LGETXATTR)
- return lgetxattr(path, name, value, size);
-#elif defined(HAVE_GETXATTR) && defined(XATTR_ADD_OPT)
- int options = XATTR_NOFOLLOW;
- return getxattr(path, name, value, size, 0, options);
-#elif defined(HAVE_LGETEA)
- return lgetea(path, name, value, size);
-#elif defined(HAVE_EXTATTR_GET_LINK)
- char *s;
- ssize_t retval;
- int attrnamespace = (strncmp(name, "system", 6) == 0) ?
- EXTATTR_NAMESPACE_SYSTEM : EXTATTR_NAMESPACE_USER;
- const char *attrname = ((s=strchr_m(name, '.')) == NULL) ? name : s + 1;
-
- if((retval=extattr_get_link(path, attrnamespace, attrname, NULL, 0)) >= 0) {
- if(retval > size) {
- errno = ERANGE;
- return -1;
- }
- if((retval=extattr_get_link(path, attrnamespace, attrname, value, size)) >= 0)
- return retval;
- }
-
- DEBUG(10,("sys_lgetxattr: extattr_get_link() failed with: %s\n", strerror(errno)));
- return -1;
-#elif defined(HAVE_ATTR_GET)
- int retval, flags = ATTR_DONTFOLLOW;
- int valuelength = (int)size;
- char *attrname = strchr(name,'.') + 1;
-
- if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT;
-
- retval = attr_get(path, attrname, (char *)value, &valuelength, flags);
-
- return retval ? retval : valuelength;
-#elif defined(HAVE_ATTROPEN)
- ssize_t ret = -1;
- int attrfd = solaris_attropen(path, name, O_RDONLY|AT_SYMLINK_NOFOLLOW, 0);
- if (attrfd >= 0) {
- ret = solaris_read_xattr(attrfd, value, size);
- close(attrfd);
- }
- return ret;
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size)
{
#if defined(HAVE_FGETXATTR)
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index d5682720cd..716e5dce80 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -454,19 +454,6 @@ static ssize_t cap_getxattr(vfs_handle_struct *handle, const char *path, const c
return SMB_VFS_NEXT_GETXATTR(handle, cappath, capname, value, size);
}
-static ssize_t cap_lgetxattr(vfs_handle_struct *handle, const char *path, const char *name, void *value, size_t
-size)
-{
- char *cappath = capencode(talloc_tos(), path);
- char *capname = capencode(talloc_tos(), name);
-
- if (!cappath || !capname) {
- errno = ENOMEM;
- return -1;
- }
- return SMB_VFS_NEXT_LGETXATTR(handle, cappath, capname, value, size);
-}
-
static ssize_t cap_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *path, void *value, size_t size)
{
char *cappath = capencode(talloc_tos(), path);
@@ -596,7 +583,6 @@ static struct vfs_fn_pointers vfs_cap_fns = {
.sys_acl_set_file_fn = cap_sys_acl_set_file,
.sys_acl_delete_def_file_fn = cap_sys_acl_delete_def_file,
.getxattr_fn = cap_getxattr,
- .lgetxattr_fn = cap_lgetxattr,
.fgetxattr_fn = cap_fgetxattr,
.listxattr_fn = cap_listxattr,
.llistxattr_fn = cap_llistxattr,
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 5834ead2a8..c34edf7073 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -831,28 +831,6 @@ catia_getxattr(vfs_handle_struct *handle, const char *path,
}
static ssize_t
-catia_lgetxattr(vfs_handle_struct *handle, const char *path,
- const char *name, void *value, size_t size)
-{
- 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_LGETXATTR(handle, path, mapped_name, value, size);
- TALLOC_FREE(mapped_name);
-
- return ret;
-}
-
-static ssize_t
catia_listxattr(vfs_handle_struct *handle, const char *path,
char *list, size_t size)
{
@@ -1009,7 +987,6 @@ static struct vfs_fn_pointers vfs_catia_fns = {
.sys_acl_set_file_fn = catia_sys_acl_set_file,
.sys_acl_delete_def_file_fn = catia_sys_acl_delete_def_file,
.getxattr_fn = catia_getxattr,
- .lgetxattr_fn = catia_lgetxattr,
.listxattr_fn = catia_listxattr,
.llistxattr_fn = catia_llistxattr,
.removexattr_fn = catia_removexattr,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 49c948f8af..ed1ee707e2 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2008,11 +2008,6 @@ static ssize_t vfswrap_getxattr(struct vfs_handle_struct *handle,const char *pat
return sys_getxattr(path, name, value, size);
}
-static ssize_t vfswrap_lgetxattr(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size)
-{
- return sys_lgetxattr(path, name, value, size);
-}
-
static ssize_t vfswrap_fgetxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size)
{
return sys_fgetxattr(fsp->fh->fd, name, value, size);
@@ -2279,7 +2274,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
/* EA operations. */
.getxattr_fn = vfswrap_getxattr,
- .lgetxattr_fn = vfswrap_lgetxattr,
.fgetxattr_fn = vfswrap_fgetxattr,
.listxattr_fn = vfswrap_listxattr,
.llistxattr_fn = vfswrap_llistxattr,
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 34c7a848e6..a35c210d2b 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -191,7 +191,6 @@ typedef enum _vfs_op_type {
/* EA operations. */
SMB_VFS_OP_GETXATTR,
- SMB_VFS_OP_LGETXATTR,
SMB_VFS_OP_FGETXATTR,
SMB_VFS_OP_LISTXATTR,
SMB_VFS_OP_LLISTXATTR,
@@ -322,7 +321,6 @@ static struct {
{ SMB_VFS_OP_SYS_ACL_FREE_ACL, "sys_acl_free_acl" },
{ SMB_VFS_OP_SYS_ACL_FREE_QUALIFIER, "sys_acl_free_qualifier" },
{ SMB_VFS_OP_GETXATTR, "getxattr" },
- { SMB_VFS_OP_LGETXATTR, "lgetxattr" },
{ SMB_VFS_OP_FGETXATTR, "fgetxattr" },
{ SMB_VFS_OP_LISTXATTR, "listxattr" },
{ SMB_VFS_OP_LLISTXATTR, "llistxattr" },
@@ -1974,20 +1972,6 @@ static ssize_t smb_full_audit_getxattr(struct vfs_handle_struct *handle,
return result;
}
-static ssize_t smb_full_audit_lgetxattr(struct vfs_handle_struct *handle,
- const char *path, const char *name,
- void *value, size_t size)
-{
- ssize_t result;
-
- result = SMB_VFS_NEXT_LGETXATTR(handle, path, name, value, size);
-
- do_log(SMB_VFS_OP_LGETXATTR, (result >= 0), handle,
- "%s|%s", path, name);
-
- return result;
-}
-
static ssize_t smb_full_audit_fgetxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const char *name, void *value, size_t size)
@@ -2338,7 +2322,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
.sys_acl_free_acl_fn = smb_full_audit_sys_acl_free_acl,
.sys_acl_free_qualifier_fn = smb_full_audit_sys_acl_free_qualifier,
.getxattr_fn = smb_full_audit_getxattr,
- .lgetxattr_fn = smb_full_audit_lgetxattr,
.fgetxattr_fn = smb_full_audit_fgetxattr,
.listxattr_fn = smb_full_audit_listxattr,
.llistxattr_fn = smb_full_audit_llistxattr,
diff --git a/source3/modules/vfs_onefs_shadow_copy.c b/source3/modules/vfs_onefs_shadow_copy.c
index c9b6f08096..09df2f8f3e 100644
--- a/source3/modules/vfs_onefs_shadow_copy.c
+++ b/source3/modules/vfs_onefs_shadow_copy.c
@@ -569,15 +569,6 @@ onefs_shadow_copy_getxattr(vfs_handle_struct *handle, const char *path,
}
static ssize_t
-onefs_shadow_copy_lgetxattr(vfs_handle_struct *handle, const char *path,
- const char *name, void *value, size_t size)
-{
- SHADOW_NEXT(LGETXATTR,
- (handle, cpath ?: path, name, value, size),
- ssize_t);
-}
-
-static ssize_t
onefs_shadow_copy_listxattr(vfs_handle_struct *handle, const char *path,
char *list, size_t size)
{
@@ -689,7 +680,6 @@ static struct vfs_fn_pointers onefs_shadow_copy_fns = {
.sys_acl_set_file_fn = onefs_shadow_copy_sys_acl_set_file,
.sys_acl_delete_def_file_fn = onefs_shadow_copy_sys_acl_delete_def_file,
.getxattr_fn = onefs_shadow_copy_getxattr,
- .lgetxattr_fn = onefs_shadow_copy_lgetxattr,
.listxattr_fn = onefs_shadow_copy_listxattr,
.llistxattr_fn = onefs_shadow_copy_llistxattr,
.removexattr_fn = onefs_shadow_copy_removexattr,
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 755a9b616c..441a68a30c 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -1321,36 +1321,6 @@ static ssize_t shadow_copy2_getxattr(vfs_handle_struct *handle,
return ret;
}
-static ssize_t shadow_copy2_lgetxattr(vfs_handle_struct *handle,
- const char *fname, const char *aname,
- void *value, size_t size)
-{
- time_t timestamp;
- char *stripped;
- ssize_t ret;
- int saved_errno;
- char *conv;
-
- if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, fname,
- &timestamp, &stripped)) {
- return -1;
- }
- if (timestamp == 0) {
- return SMB_VFS_NEXT_LGETXATTR(handle, fname, aname, value,
- size);
- }
- conv = shadow_copy2_convert(talloc_tos(), handle, stripped, timestamp);
- TALLOC_FREE(stripped);
- if (conv == NULL) {
- return -1;
- }
- ret = SMB_VFS_NEXT_LGETXATTR(handle, conv, aname, value, size);
- saved_errno = errno;
- TALLOC_FREE(conv);
- errno = saved_errno;
- return ret;
-}
-
static ssize_t shadow_copy2_listxattr(struct vfs_handle_struct *handle,
const char *fname,
char *list, size_t size)
@@ -1589,7 +1559,6 @@ static struct vfs_fn_pointers vfs_shadow_copy2_fns = {
.mkdir_fn = shadow_copy2_mkdir,
.rmdir_fn = shadow_copy2_rmdir,
.getxattr_fn = shadow_copy2_getxattr,
- .lgetxattr_fn = shadow_copy2_lgetxattr,
.listxattr_fn = shadow_copy2_listxattr,
.removexattr_fn = shadow_copy2_removexattr,
.lremovexattr_fn = shadow_copy2_lremovexattr,
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 035f2df406..8d7c7439f2 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -1952,26 +1952,6 @@ static ssize_t smb_time_audit_getxattr(struct vfs_handle_struct *handle,
return result;
}
-static ssize_t smb_time_audit_lgetxattr(struct vfs_handle_struct *handle,
- const char *path, const char *name,
- void *value, size_t size)
-{
- ssize_t result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_LGETXATTR(handle, path, name, value, size);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("lgetxattr", timediff);
- }
-
- return result;
-}
-
static ssize_t smb_time_audit_fgetxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const char *name, void *value,
@@ -2434,7 +2414,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
.sys_acl_free_acl_fn = smb_time_audit_sys_acl_free_acl,
.sys_acl_free_qualifier_fn = smb_time_audit_sys_acl_free_qualifier,
.getxattr_fn = smb_time_audit_getxattr,
- .lgetxattr_fn = smb_time_audit_lgetxattr,
.fgetxattr_fn = smb_time_audit_fgetxattr,
.listxattr_fn = smb_time_audit_listxattr,
.llistxattr_fn = smb_time_audit_llistxattr,
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 33f2701704..93c268f6fa 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -2150,14 +2150,6 @@ ssize_t smb_vfs_call_getxattr(struct vfs_handle_struct *handle,
return handle->fns->getxattr_fn(handle, path, name, value, size);
}
-ssize_t smb_vfs_call_lgetxattr(struct vfs_handle_struct *handle,
- const char *path, const char *name, void *value,
- size_t size)
-{
- VFS_FIND(lgetxattr);
- return handle->fns->lgetxattr_fn(handle, path, name, value, size);
-}
-
ssize_t smb_vfs_call_fgetxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, const char *name,
void *value, size_t size)
diff --git a/source3/wscript b/source3/wscript
index eb4e0ff51b..dcf2b9d415 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -242,7 +242,7 @@ getcwd _getcwd __getcwd getdents __getdents getdirentries
getgrent getgrnam getgrouplist getgrset getmntent getpagesize
getproplist get_proplist_entry getpwanam getpwent_r getrlimit gettext
glob grantpt hstrerror initgroups innetgr
-inotify_init lgetea lgetxattr listea listxattr llistea llistxattr
+inotify_init listea listxattr llistea llistxattr
llseek _llseek __llseek lremoveea lremovexattr _lseek __lseek
lsetea lsetxattr _lstat __lstat lutimes
__lxstat memalign mknod mlock mlockall munlock munlockall