/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SMBFS_NTACL_H
#define _SMBFS_NTACL_H
/*
* Internal functions for dealing with
* NT Security data structures.
*/
/*
* Internal form of an NT SID
* Same as on the wire, but possibly byte-swapped.
*/
typedef struct i_ntsid {
} i_ntsid_t;
/*
* Internal form of an NT ACE - first the header.
* See MS SDK: ACE_HEADER (For MS, it's the OtW form)
* Note: ace_size here is the in-memoy size, not OtW.
*/
typedef struct i_ntace_hdr {
/*
* Simple ACE for types: ACCESS_ALLOWED through SYSTEM_ALARM
* See MS SDK: ACCESS_ALLOWED_ACE, ACCESS_DENIED_ACE,
* SYSTEM_AUDIT_ACE, SYSTEM_ALARM_ACE.
*
* The above are the only types that appear in a V2 ACL.
* Note that in the Windows SDK, the SID is stored as
* "flat" data after the ACE header. This implementation
* stores the SID as a pointer instead.
*/
typedef struct i_ntace_v2 {
} i_ntace_v2_t;
/*
* A union for convenience of the conversion code.
* There are lots more ACE types, ignored for now.
*/
typedef union i_ntace_u {
} i_ntace_t;
/*
*/
typedef struct i_ntacl {
} i_ntacl_t;
/*
* Internal form of an NT Security Descriptor (SD)
*/
typedef struct i_ntsd {
} i_ntsd_t;
/*
* Import a raw SD (mb chain) into "internal" form.
* (like "absolute" form per. NT docs)
* Returns allocated data in sdp
*/
/*
* Export an "internal" SD into an raw SD (mb chain).
* (a.k.a "self-relative" form per. NT docs)
* Returns allocated mbchain in mbp.
*/
/*
* Convert an internal SD to a ZFS-style ACL.
*/
#ifdef _KERNEL
#else /* _KERNEL */
/* See also: lib/libsmbfs/netsmb/smbfs_acl.h */
#endif /* _KERNEL */
/*
* Convert a ZFS-style ACL to an internal SD.
* Always need to pass uid+gid, either the new
* (when setting them) or existing, so that any
* owner@ or group@ ACEs can be translated.
*/
#ifdef _KERNEL
#else /* _KERNEL */
/* See also: lib/libsmbfs/netsmb/smbfs_acl.h */
#endif /* _KERNEL */
/*
* Free an i_ntsd_t from md_get_ntsd() or smbfs_acl_zfs2sd().
* See also: lib/libsmbfs/netsmb/smbfs_acl.h
*/
void smbfs_acl_free_sd(struct i_ntsd *);
/*
* Convert an NT SID to string format.
*/
#endif /* _SMBFS_NTACL_H */