From: Jeremy Allison Date: Sat, 15 May 2021 01:20:14 +0000 (-0700) Subject: s3: VFS: hpuxacl: Remove hpuxacl_sys_acl_delete_def_file(). X-Git-Tag: tevent-0.11.0~834 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9cde624d2a41c57dd9a270dec3a153f644533b8b;p=thirdparty%2Fsamba.git s3: VFS: hpuxacl: Remove hpuxacl_sys_acl_delete_def_file(). No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Noel Power --- diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c index 0095fbe9504..ec09e3b9ee9 100644 --- a/source3/modules/vfs_hpuxacl.c +++ b/source3/modules/vfs_hpuxacl.c @@ -341,62 +341,6 @@ int hpuxacl_sys_acl_set_fd(vfs_handle_struct *handle, SMB_ACL_TYPE_ACCESS, theacl); } - -/* - * delete the default ACL of a directory - * - * This is achieved by fetching the access ACL and rewriting it - * directly, via the hpux system call: the ACL_SET call on - * directories writes both the access and the default ACL as provided. - * - * XXX: posix acl_delete_def_file returns an error if - * the file referred to by path is not a directory. - * this function does not complain but the actions - * have no effect on a file other than a directory. - * But sys_acl_delete_default_file is only called in - * smbd/posixacls.c after having checked that the file - * is a directory, anyways. So implementing the extra - * check is considered unnecessary. --- Agreed? XXX - */ -int hpuxacl_sys_acl_delete_def_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname) -{ - SMB_ACL_T smb_acl; - int ret = -1; - HPUX_ACL_T hpux_acl; - int count; - - DEBUG(10, ("entering hpuxacl_sys_acl_delete_def_file.\n")); - - smb_acl = hpuxacl_sys_acl_get_file(handle, smb_fname->base_name, - SMB_ACL_TYPE_ACCESS); - if (smb_acl == NULL) { - DEBUG(10, ("getting file acl failed!\n")); - goto done; - } - if (!smb_acl_to_hpux_acl(smb_acl, &hpux_acl, &count, - SMB_ACL_TYPE_ACCESS)) - { - DEBUG(10, ("conversion smb_acl -> hpux_acl failed.\n")); - goto done; - } - if (!hpux_acl_sort(hpux_acl, count)) { - DEBUG(10, ("resulting acl is not valid!\n")); - goto done; - } - ret = acl(discard_const_p(char, smb_fname->base_name), - ACL_SET, count, hpux_acl); - if (ret != 0) { - DEBUG(10, ("settinge file acl failed!\n")); - } - - done: - DEBUG(10, ("hpuxacl_sys_acl_delete_def_file %s.\n", - ((ret != 0) ? "failed" : "succeeded" ))); - TALLOC_FREE(smb_acl); - return ret; -} - /* * delete the default ACL of a directory * @@ -1217,7 +1161,6 @@ static struct vfs_fn_pointers hpuxacl_fns = { .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd, .sys_acl_set_fd_fn = hpuxacl_sys_acl_set_fd, - .sys_acl_delete_def_file_fn = hpuxacl_sys_acl_delete_def_file, .sys_acl_delete_def_fd_fn = hpuxacl_sys_acl_delete_def_fd, }; diff --git a/source3/modules/vfs_hpuxacl.h b/source3/modules/vfs_hpuxacl.h index be21afddb0e..26562da499f 100644 --- a/source3/modules/vfs_hpuxacl.h +++ b/source3/modules/vfs_hpuxacl.h @@ -49,9 +49,6 @@ int hpuxacl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl); -int hpuxacl_sys_acl_delete_def_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname); - int hpuxacl_sys_acl_delete_def_fd(vfs_handle_struct *handle, files_struct *fsp);