Skip to content

add eaccess on freebsd, dragonfly and linux#1842

Merged
bors[bot] merged 1 commit intonix-rust:masterfrom
SteveLauC:eaccess
Oct 13, 2022
Merged

add eaccess on freebsd, dragonfly and linux#1842
bors[bot] merged 1 commit intonix-rust:masterfrom
SteveLauC:eaccess

Conversation

@SteveLauC
Copy link
Copy Markdown
Member

@SteveLauC SteveLauC commented Oct 10, 2022

man pages

difference between eaccess and access/faccessat

IMHO, eaccess uses effective identifiers to perform the permission check while access/faccessat use real IDs.

Fixes #1373

Copy link
Copy Markdown
Collaborator

@rtzoeller rtzoeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than one nitpitck regarding capitalization, this looks good. I'm firing up a DragonFly VM to make sure the test passes right now.

Comment thread CHANGELOG.md Outdated
Comment thread src/unistd.rs
@rtzoeller
Copy link
Copy Markdown
Collaborator

Failures look unrelated - I'll put up a fix.

@SteveLauC
Copy link
Copy Markdown
Member Author

CI failed due to:

 Documenting nix v0.25.0 (/tmp/cirrus-ci-build)
error: unclosed HTML tag `newline`
    --> src/unistd.rs:2207:5
     |
2207 | /     /// Unless otherwise noted, the maximum length, in bytes, of a utility's
2208 | |     /// input line (either standard input or another file), when the utility is
2209 | |     /// described as processing text files. The length includes room for the
2210 | |     /// trailing <newline>.
     | |___________________________^
     |
     = note: `-D rustdoc::invalid-html-tags` implied by `-D warnings`

error: could not document `nix`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2018 --crate-type lib --crate-name nix src/lib.rs --target x86_64-unknown-openbsd -o /tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/doc --cfg 'feature="acct"' --cfg 'feature="aio"' --cfg 'feature="default"' --cfg 'feature="dir"' --cfg 'feature="env"' --cfg 'feature="event"' --cfg 'feature="feature"' --cfg 'feature="fs"' --cfg 'feature="hostname"' --cfg 'feature="inotify"' --cfg 'feature="ioctl"' --cfg 'feature="kmod"' --cfg 'feature="memoffset"' --cfg 'feature="mman"' --cfg 'feature="mount"' --cfg 'feature="mqueue"' --cfg 'feature="net"' --cfg 'feature="personality"' --cfg 'feature="pin-utils"' --cfg 'feature="poll"' --cfg 'feature="process"' --cfg 'feature="pthread"' --cfg 'feature="ptrace"' --cfg 'feature="quota"' --cfg 'feature="reboot"' --cfg 'feature="resource"' --cfg 'feature="sched"' --cfg 'feature="signal"' --cfg 'feature="socket"' --cfg 'feature="term"' --cfg 'feature="time"' --cfg 'feature="ucontext"' --cfg 'feature="uio"' --cfg 'feature="user"' --cfg 'feature="zerocopy"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat -C metadata=2723785ec589deb8 -L dependency=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps -L dependency=/tmp/cirrus-ci-build/target/debug/deps --extern 'noprelude:alloc=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps/liballoc-cefae6e37cb01259.rlib' --extern bitflags=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps/libbitflags-8c96ba2681f4f5c9.rmeta --extern cfg_if=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps/libcfg_if-92db29032dce5076.rmeta --extern 'noprelude:compiler_builtins=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps/libcompiler_builtins-9ee6b9ef06d17383.rlib' --extern 'noprelude:core=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps/libcore-97dc4a26801a04cc.rlib' --extern libc=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps/liblibc-8f31bb7d988a9354.rmeta --extern memoffset=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps/libmemoffset-301ee3a096d2bdab.rmeta --extern 'noprelude:panic_unwind=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps/libpanic_unwind-7306a5c96c0fb635.rlib' --extern pin_utils=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps/libpin_utils-a646df117d5315e0.rmeta --extern 'noprelude:proc_macro=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps/libproc_macro-4d9932796ae3a1c0.rlib' --extern 'noprelude:std=/tmp/cirrus-ci-build/target/x86_64-unknown-openbsd/debug/deps/libstd-97706563a2c3cdf9.rlib' -Z unstable-options -D warnings --crate-version 0.25.0` (exit status: 1)

@rtzoeller
Copy link
Copy Markdown
Collaborator

Other than one nitpitck regarding capitalization, this looks good. I'm firing up a DragonFly VM to make sure the test passes right now.

Confirmed tests pass on DragonFly (FreeBSD and Linux should be covered by CI).

Copy link
Copy Markdown
Collaborator

@rtzoeller rtzoeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors bors bot merged commit 0d6cc18 into nix-rust:master Oct 13, 2022
@SteveLauC SteveLauC deleted the eaccess branch October 13, 2022 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement eaccess/faccessat on platforms that support it

2 participants