Landlock 25.12.63045

dotnet add package Landlock --version 25.12.63045
                    
NuGet\Install-Package Landlock -Version 25.12.63045
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Landlock" Version="25.12.63045" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Landlock" Version="25.12.63045" />
                    
Directory.Packages.props
<PackageReference Include="Landlock" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Landlock --version 25.12.63045
                    
#r "nuget: Landlock, 25.12.63045"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Landlock@25.12.63045
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Landlock&version=25.12.63045
                    
Install as a Cake Addin
#tool nuget:?package=Landlock&version=25.12.63045
                    
Install as a Cake Tool

Landlock for .NET

A lightweight C# wrapper for the Linux https://landlock.io/ kernel sandboxing feature.

NuGet

📦 Installation

Add the NuGet package:

dotnet add package Landlock

Or visit: https://www.nuget.org/packages/Landlock


🔍 What is Landlock?

Landlock is a Linux kernel security feature (available since Linux 5.13) that lets unprivileged applications restrict their own filesystem access using an allow-list model. Once a ruleset is enforced, the process—and any child processes—can only access explicitly permitted paths, providing simple but effective sandboxing without requiring root privileges or system-wide configuration.


📌 Library Overview

This library provides a clean and idiomatic C# interface for working with Landlock, allowing you to define filesystem rulesets, grant specific directory or file permissions, and enforce permanent access restrictions at runtime. It is intended for sandboxing plugins, securing file operations, or adding defense-in-depth to applications running on Linux.


🛠️ Usage

using Landlock;

var supported = Landlock.IsSupported();

if (supported)
{
    var sandbox = Landlock.CreateRuleset(Landlock.FileSystem.CORE);

    sandbox.AddPathBeneathRule(
        AllowedDir,
        Landlock.FileSystem.READ_FILE,
        Landlock.FileSystem.READ_DIR
    );

    sandbox.Enforce();
}

This example checks for kernel support, creates a ruleset controlling core filesystem operations, allows read access to a specific directory, and enforces the sandbox so the process cannot access anything outside the allowed paths.


🧪 Requirements

  • Linux kernel 5.13+
  • .NET 6.0+
  • No root privileges required

📝 License

MIT License.

Landlock logo © 2024 by Mickaël Salaün is licensed under CC BY-SA 4.0

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
25.12.63045 1,912 12/7/2025
25.12.63002 711 12/3/2025
25.12.63000 681 12/3/2025