windows_permissions/lib.rs
1//! # Windows permissions
2//!
3//! Safe Rust bindings to Windows permissions APIs.
4//!
5//! ## Overview
6//!
7//! This crate provides safe Rust wrappers over several Windows permissions concepts,
8//! including:
9//!
10//! - SID (Security Identifier)
11//! - ACL (Access Control List)
12//! - ACE (Access Control Entry)
13//! - SD (Security Descriptor)
14//!
15//! There are two kinds of abstractions:
16//!
17//! - The primary Windows data structures are available and can be used directly.
18//! - In the `wrappers` crate, there are safe versions of the Windows API functions.
19//! Any Windows API function not implemented should be reported as an issue.
20//!
21//! ## Contributing
22//!
23//! PRs are happily accepted! In general, `unsafe` code should be confined to the
24//! [`wrappers`] module -- the rest of this crate should be implemented
25//! safely based on that code.
26//!
27//! Help wanted:
28//!
29//! - Make [`wrappers`] more complete with additional Windows API functions
30//! - Add new data structures that cover more of the permissions APIs
31
32#![deny(missing_docs)]
33
34#[macro_use]
35extern crate bitflags;
36extern crate winapi;
37
38#[cfg(target_os = "windows")]
39pub mod constants;
40#[cfg(target_os = "windows")]
41pub mod localheap;
42#[cfg(target_os = "windows")]
43pub mod structures;
44#[cfg(target_os = "windows")]
45pub mod utilities;
46#[cfg(target_os = "windows")]
47pub mod wrappers;
48
49#[cfg(target_os = "windows")]
50mod windows_secure;
51
52#[cfg(target_os = "windows")]
53pub use localheap::LocalBox;
54#[cfg(target_os = "windows")]
55pub use structures::{Ace, Acl, SecurityDescriptor, Sid, Trustee};
56#[cfg(target_os = "windows")]
57pub use windows_secure::WindowsSecure;