Skip to main content

ServerShared

Struct ServerShared 

Source
pub struct ServerShared {
Show 15 fields pub shares: HashMap<String, Share>, pub guid: [u8; 16], pub domain: String, pub server_name: String, pub users: HashMap<String, String>, pub allow_guest: bool, pub require_signing: bool, pub encrypt: bool, pub locks: Arc<LockManager>, pub share_modes: Arc<ShareModeTable>, pub oplocks: Arc<OplockTable>, pub leases: Arc<LeaseTable>, pub durables: Arc<dyn HandleStore>, pub sessions: Arc<SessionTable>, pub app_instances: Arc<AppInstanceTable>,
}
Expand description

Global (per-process) server configuration and user database.

Fields§

§shares: HashMap<String, Share>

Published shares keyed by lowercase name.

§guid: [u8; 16]

Server GUID used by extended-security negotiate.

§domain: String

NT domain / workgroup name.

§server_name: String

NetBIOS server name.

§users: HashMap<String, String>

Configured accounts: lowercased username → password.

§allow_guest: bool

When no users are configured every principal maps to guest.

§require_signing: bool

Reject traffic from authenticated sessions that does not carry a valid signature ([MS-SMB2] §3.3.5.2.3 signing policy).

§encrypt: bool

Seal sessions when the client supports encryption (SMB2_SESSION_FLAG_ENCRYPT_DATA, [MS-SMB2] §2.2.5.2).

§locks: Arc<LockManager>

Server-wide byte-range lock table ([MS-SMB2] §2.2.26) shared across connections so conflicting locks from different clients are detected.

§share_modes: Arc<ShareModeTable>

Server-wide open share-mode table for sharing-violation detection ([MS-FSA] §2.1.5.1).

§oplocks: Arc<OplockTable>

Server-wide oplock table ([MS-SMB2] §2.2.23) — at most one exclusive oplock per file, broken when a second open contends.

§leases: Arc<LeaseTable>

Server-wide lease table ([MS-SMB2] §2.2.23.2) — one caching lease per file path, broken down when an open with a different lease key contends.

§durables: Arc<dyn HandleStore>

Durable handles preserved across connection drops ([MS-SMB2] §3.3.1.10), behind a pluggable store (in-memory, redb, or a replicated backend).

§sessions: Arc<SessionTable>

Established sessions, shared so channels can bind ([MS-SMB2] §3.3.5.5.3).

§app_instances: Arc<AppInstanceTable>

Application-instance opens for client failover ([MS-SMB2] §3.3.5.9.13).

Implementations§

Source§

impl ServerShared

Source

pub fn share_infos(&self) -> Vec<ShareInfo>

Share table as advertised through srvsvc NetShareEnum level 1 ([MS-SRVS] §2.2.4.26): disk shares carry STYPE_DISK, the virtual IPC$ share carries STYPE_IPC|STYPE_SPECIAL.

Trait Implementations§

Source§

impl Clone for ServerShared

Source§

fn clone(&self) -> ServerShared

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more