2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * This is a helper file to get/set Windows security descriptor. This is used by 2N/A * A security descriptor can be in either absolute or self-relative format. 2N/A * In absolute format, a security descriptor contains pointers to its 2N/A * information, not the information itself. In self-relative format, a security 2N/A * descriptor stores the security descriptor structure and associated security 2N/A * information in a contiguous block of memory. 2N/A * The security descriptor that the SMB server sends over the wire via 2N/A * NetrShareGetInfo is in self-relative format. The following functions 2N/A * are used in converting a security descriptor from absolute to self-relative 2N/A * - srvsvc_sd_set_relative() 2N/A * - srvsvc_acl_set_relative() 2N/A * - srvsvc_ace_set_relative() 2N/A * The security descriptor that is set on the SMB server via NetrShareSetInfo 2N/A * is in absolute format. The following functions are used in converting a 2N/A * security descriptor from self-relative to absolute format. 2N/A * - srvsvc_sd_set_absolute() 2N/A * - srvsvc_acl_set_absolute() 2N/A * - srvsvc_ace_set_absolute() 2N/A/* Size of offset members in mslm_security_descriptor structure */ 2N/A * This method sets Security Descriptor on a share path. 2N/A * ERROR_NOT_ENOUGH_MEMORY 2N/A * ERROR_INVALID_SECURITY_DESCR 2N/A * ERROR_INTERNAL_ERROR 2N/A * ERROR_PATH_NOT_FOUND 2N/A * This method returns a Security Descriptor of a share path in self relative 2N/A * format. Call to this function with NULL buffer, returns the size of the 2N/A * security descriptor, which can be used to allocate buffer. 2N/A * ERROR_NOT_ENOUGH_MEMORY 2N/A * ERROR_INVALID_SECURITY_DESCR 2N/A * ERROR_INVALID_PARAMETER 2N/A * ERROR_INTERNAL_ERROR 2N/A * ERROR_PATH_NOT_FOUND 2N/A * This method converts an ACE from absolute (pointer) to 2N/A * self relative (flat buffer) format. 2N/A * Returns Win32 error codes. 2N/A * This method converts an ACL from absolute (pointer) to 2N/A * self relative (flat buffer) format. 2N/A * Returns an initialized mslm_acl structure on success. 2N/A * Returns NULL on failure. 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A * This method converts Security Descriptor from absolute (pointer) to 2N/A * self relative (flat buffer) format. 2N/A * Returns Win32 error codes. 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A * This method converts an ACE from self relative (flat buffer) to 2N/A * absolute (pointer) format. 2N/A * Returns Win32 error codes. 2N/A * This method converts an ACL from self relative (flat buffer) to 2N/A * absolute (pointer) format. 2N/A * Returns an initialized smb_acl_t structure on success. 2N/A * Returns NULL on failure. 2N/A * This method converts Security Descriptor from self relative (flat buffer) to 2N/A * absolute (pointer) format. 2N/A * Returns Win32 error codes. 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A * This method maps NT status codes into Win 32 error codes. 2N/A * This method operates on status codes that are related 2N/A * to processing of Security Descriptor.