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§
Published shares keyed by lowercase name.
guid: [u8; 16]Server GUID used by extended-security negotiate.
domain: StringNT domain / workgroup name.
server_name: StringNetBIOS server name.
users: HashMap<String, String>Configured accounts: lowercased username → password.
allow_guest: boolWhen no users are configured every principal maps to guest.
require_signing: boolReject traffic from authenticated sessions that does not carry a valid signature ([MS-SMB2] §3.3.5.2.3 signing policy).
encrypt: boolSeal 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.
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§
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§fn clone(&self) -> ServerShared
fn clone(&self) -> ServerShared
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more