Module: Landlock::Native

Defined in:
lib/landlock/native.rb

Class Method Summary collapse

Class Method Details

.abi_versionObject



10
11
12
# File 'lib/landlock/native.rb', line 10

def abi_version
  Landlock.abi_version
end

.add_net_rule(fd, port, access_mask) ⇒ Object



22
23
24
# File 'lib/landlock/native.rb', line 22

def add_net_rule(fd, port, access_mask)
  Landlock.__send__(:_add_net_rule, fd, port, access_mask)
end

.add_path_rule(fd, path, access_mask) ⇒ Object



18
19
20
# File 'lib/landlock/native.rb', line 18

def add_path_rule(fd, path, access_mask)
  Landlock.__send__(:_add_path_rule, fd, path, access_mask)
end

.close_fd(fd) ⇒ Object



30
31
32
# File 'lib/landlock/native.rb', line 30

def close_fd(fd)
  Landlock.__send__(:_close_fd, fd)
end

.create_ruleset(fs_handled, net_handled, scoped) ⇒ Object



14
15
16
# File 'lib/landlock/native.rb', line 14

def create_ruleset(fs_handled, net_handled, scoped)
  Landlock.__send__(:_create_ruleset, fs_handled, net_handled, scoped)
end

.restrict_self(fd) ⇒ Object



26
27
28
# File 'lib/landlock/native.rb', line 26

def restrict_self(fd)
  Landlock.__send__(:_restrict_self, fd)
end

.seccomp_deny_network!Object



34
35
36
# File 'lib/landlock/native.rb', line 34

def seccomp_deny_network!
  Landlock.seccomp_deny_network!
end