* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-/* NOTE: This is an experimental module, not yet finished. JRA. */
-
#include "includes.h"
#include "smbd/smbd.h"
#include "librpc/gen_ndr/xattr.h"
again:
- tmp = TALLOC_REALLOC_ARRAY(ctx, val, uint8_t, size);
+ tmp = talloc_realloc(ctx, val, uint8_t, size);
if (tmp == NULL) {
TALLOC_FREE(val);
return NT_STATUS_NO_MEMORY;
}
unbecome_root();
if (ret) {
- errno = saved_errno;
DEBUG(5, ("store_acl_blob_fsp: setting attr failed for file %s"
"with error %s\n",
fsp_str_dbg(fsp),
- strerror(errno) ));
- return map_nt_error_from_unix(errno);
+ strerror(saved_errno) ));
+ errno = saved_errno;
+ return map_nt_error_from_unix(saved_errno);
}
return NT_STATUS_OK;
}
static struct vfs_fn_pointers vfs_acl_xattr_fns = {
.connect_fn = connect_acl_xattr,
- .opendir = opendir_acl_common,
- .mkdir = mkdir_acl_common,
- .rmdir = rmdir_acl_common,
- .open = open_acl_common,
- .create_file = create_file_acl_common,
- .unlink = unlink_acl_common,
- .chmod = chmod_acl_module_common,
- .fchmod = fchmod_acl_module_common,
- .fget_nt_acl = fget_nt_acl_common,
- .get_nt_acl = get_nt_acl_common,
- .fset_nt_acl = fset_nt_acl_common,
- .chmod_acl = chmod_acl_acl_module_common,
- .fchmod_acl = fchmod_acl_acl_module_common,
- .sys_acl_set_file = sys_acl_set_file_xattr,
- .sys_acl_set_fd = sys_acl_set_fd_xattr
+ .rmdir_fn = rmdir_acl_common,
+ .unlink_fn = unlink_acl_common,
+ .chmod_fn = chmod_acl_module_common,
+ .fchmod_fn = fchmod_acl_module_common,
+ .fget_nt_acl_fn = fget_nt_acl_common,
+ .get_nt_acl_fn = get_nt_acl_common,
+ .fset_nt_acl_fn = fset_nt_acl_common,
+ .chmod_acl_fn = chmod_acl_acl_module_common,
+ .fchmod_acl_fn = fchmod_acl_acl_module_common,
+ .sys_acl_set_file_fn = sys_acl_set_file_xattr,
+ .sys_acl_set_fd_fn = sys_acl_set_fd_xattr
};
NTSTATUS vfs_acl_xattr_init(void)