Skip to content

CapRights0

[Source]

Version 0 of the capsicum cap_rights_t structure.

class ref CapRights0

Constructors

create

[Source]

Initialises with no rights.

new ref create()
: CapRights0 ref^

Returns


from

[Source]

Initialises with the rights from a FileCaps.

new ref from(
  caps: Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] box)
: CapRights0 ref^

Parameters

Returns


descriptor

[Source]

Initialises with the rights on the given file descriptor.

new ref descriptor(
  fd: I32 val)
: CapRights0 ref^

Parameters

Returns


Public Functions

set

[Source]

fun ref set(
  cap: U64 val)
: None val

Parameters

Returns


unset

[Source]

fun ref unset(
  cap: U64 val)
: None val

Parameters

Returns


limit

[Source]

Limits the fd to the encoded rights.

fun box limit(
  fd: I32 val)
: Bool val

Parameters

Returns


merge

[Source]

Merge the rights in that into this.

fun ref merge(
  that: CapRights0 ref)
: None val

Parameters

Returns


remove

[Source]

Remove the rights in that from this.

fun ref remove(
  that: CapRights0 ref)
: None val

Parameters

Returns


clear

[Source]

Clear all rights.

fun ref clear()
: None val

Returns


contains

[Source]

Check that this is a superset of the rights in that.

fun box contains(
  that: CapRights0 ref)
: Bool val

Parameters

Returns