Skip to content

setresuid doesn't support no-change for any of its arguments #931

Open
ritzk/nix
#1
@sevagh

Description

@sevagh

Hello. The nix docs link to the Linux manpage for setresuid: http://man7.org/linux/man-pages/man2/setresuid.2.html

In Linux you can pass -1 as a parameter of setresuid. How can I do this in nix since the parameters are of type u32?

error[E0600]: cannot apply unary operator `-` to type `u32`
 --> src/main.rs:9:72
  |
9 |     match setresuid(Uid::from_raw(-1), Uid::from_raw(1), Uid::from_raw(-1)) {
  |                                                                        ^^ cannot apply unary operator `-`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions