Age | Commit message (Collapse) | Author |
|
Fix tests. No change in documentation.
Resolves #1030.
|
|
|
|
These were previously missing on musl and mips targets because of
missing definitions in the libc crate.
|
|
|
|
|
|
|
|
1255: Remove several deprecated constants and functions r=asomers a=asomers
* `unistd::daemon` on Apple
* `unistd::pipe2` on Apple
* `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` on Apple
* `sys::event::FilterFlag::NOTE_REAP` on Apple
* `sys::ptrace::ptrace` on Android and Linux
All have been deprecated for more than two releases and one year.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
* `unistd::daemon` on Apple
* `unistd::pipe2` on Apple
* `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` on Apple
* `sys::event::FilterFlag::NOTE_REAP` on Apple
* `sys::ptrace::ptrace` on Android and Linux
All have been deprecated for more than two releases and one year.
|
|
|
|
|
|
- Make sure all tests pass the CI
- Redox does not (yet) have passwd functions, so remove it
|
|
|
|
FIFOs are not supported (yet?) by RedoxFS, so disable it
|
|
|
|
Some things are not implemented yet in redox, so a lot of annotations
were added to remove functions when compiling for redox. Those functions
will hopefully be added in time, but for now it's better to have partial
support than none.
Blocked by https://github.com/rust-lang/libc/pull/1438
|
|
std::convert::Infallible has been available since Rust 1.34 and nix
currently targets Rust 1.36 or later so this should not cause
problems.
Fixes #1238
|
|
See https://netbsd.gw.com/cgi-bin/man-cgi?pipe2+2+NetBSD-current and
http://man7.org/linux/man-pages/man2/pipe.2.html
|
|
Functions such as Group::from_anything use reserve_double_buffer_size
in a loop, expecting it to return ERANGE if the passed limit is
reached.
However, the returned vector is passed as pointer to a libc function
that writes data into memory and doesn't update the length of the
Vec. Because of this, the previous code would never return ERANGE and
the calling loops would never exit if they hit a case where the
required buffer was larger than the maximum buffer.
This fixes the problem by checking the capacity rather than the
length.
Signed-off-by: Steven Danna <steve@chef.io>
|
|
|
|
|
|
http://man7.org/linux/man-pages/man3/sysconf.3.html says that the
corresponding variable is obsolete, but I think that just means the
constant defined in limits.h is obsolete. Checking the value using
sysconf is still valid.
|
|
This adds the linkat function which is part of POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/linkat.html
and widely implmented on Unix-Family platforms.
Add back trailing whitespace removed on previous force push
|
|
This was a collaborative work between Johannes Schilling
<dario@deaktualisierung.org>, Fredrick Brennan <copypaste@kittens.ph>
and myself.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
|
|
ignore mkfifoat in OSX and andriod
|
|
|
|
1121: Fix #1093 r=asomers a=tathanhdinh
Hello,
This PR fixes the problem discovered in #1093.
Thanks for any comment.
1130: unistd: getgrouplist: Rework code to use `reserve_double_buffer_size` r=asomers a=otavio
The buffer resize logic can be simplified reusing the
`reserve_double_buffer_size` method.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Co-authored-by: Ta Thanh Dinh <tathanhdinh@gmail.com>
Co-authored-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
The buffer resize logic can be simplified reusing the
`reserve_double_buffer_size` method.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
Use `reserve_double_buffer_size` up to NGROUPS_MAX as limit.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
We are preparing the use of `reserve_double_buffer_size` but for this,
some logic need to be reworked so we are doing some rename preparing
for the next patch which adds its use.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
|
|
We now have a `reserve_double_buffer_size` method which reserves the
double of buffer, up to a limit, allowing it to be reused on other
methods in future.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
Only two instances remain:
* For the deprecated sys::socket::CmsgSpace::new. We should probably
just remove that method.
* For sys::termios::Termios::default_uninit. This will require some
more thought.
Fixes #1096
|
|
|
|
This adds the unlinkat function, which is part of POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlinkat.html
and widely implmented on Unix-family platforms.
Implement unlinkat - Update comments to unlink at and breakup tests
Changes made based on comments from pull request #1058
Implement unlinkat - Update should_panic for more precise check
Updae should_panic attribute for more precise check. Also remove
some dead code and note the pull request ID.
Implement unlinkat - Update error handling to use unwrap_err
The previous patch failed testing on two targets that returned EPERM
as the Sys error instead of EISDIR. This patch changes from using the
should_panic attribute to using the unwrap_err and matching against
the result.
Implement Unlinkat - Passing tests should not print anything. Fix.
Implement unlinkat - Update location of commit comment in the CHANGELOG
Implement unlinkat - Remove newline
|
|
|
|
|
|
This is for the benefit of those platforms that do not provide setresuid
nor setresgid, like macOS.
|
|
Several symbols are now marked as deprecated on OSX. Fix the build by
marking these symbols' Nix wrappers as deprecated, too.
|
|
1) lutimes doesn't exist on OpenBSD so it needs to be under conditional
compilation.
The only "reference" that I could find related to this is the discussion
here: https://github.com/rust-lang/libc/pull/790 .
2) fexecve doesn't exist on OpenBSD so add conditional compilation for it
in unistd and in related tests.
The only "reference" that I could find is a mention that fexecve is
not implemented on OpenBSD in the manual pages for signal(3) and
sigaction(2):
Official repository (search for "fexecve"):
https://cvsweb.openbsd.org/src/lib/libc/sys/sigaction.2?rev=1.75&content-type=text/x-cvsweb-markup
Github mirror:
https://github.com/openbsd/src/blob/master/lib/libc/sys/sigaction.2#L619
3) AIO doesn't work on OpenBSD so put test_aio_drop under conditional
compilation.
4) Add relevant changelog entries.
P.S. On OpenBSD remains the issue of test_scm_rights which builds
correctly but fails at runtime.
|
|
|
|
try! is not available in Rust 2018
|
|
I previously advocated for the latter syntax on stylistic grounds. But
it generates less efficient code, because it creates a new lambda
function for each usage. The optimizer does not combine them. This
change saves about 6KB of code.
|
|
|
|
|
|
This patch adds a wrapper for the acct(2) syscall, with two functions
for enabling and disabling process accounting.
|
|
|
|
This also adds a test for truncate (obviously) but, while doing so, also
adds a test for the already-existing ftruncate.
|
|
Correct references to user ids to group ids.
|