- Apr 04, 2020
-
-
Daniel McCarney authored
The `fanotify` API[0] is a linux-specific API for notification and interception of filesystem events. In some ways it is similar to `inotify`, but with different advantages/tradeoffs. It is particularly well suited to full filesystem/mount monitoring (vs per directory) and for allowing/denying access to files (`inotify` lacks this capability). The `fanotify` API has been updated several times since it was enabled in Linux 2.6.37. Presently I've only included support for the original `fanotify` features, and the `FAN_MARK_FILESYSTEM` addition made in Linux 4.20. There are subsequent updates in 5.0 and 5.1 not covered in this initial commit. This commit adds the relevant constants and types from `uapi/linux/fanotify.h`[1] and two new functions (`fanotify_init`[2] and `fanotify_wrap`[3]) to `src/unix/linux_like/linux/mod.rs`. While I believe this API is also present on Android I have presently limited my attention to Linux. Although this commit focuses on Linux 4.20.x's `fanotify` API/constants I have skipped adding constants for `FAN_ALL_CLASS_BITS`, `FAN_ALL_INIT_FLAGS`, `FAN_ALL_MARK_FLAGS`, `FAN_ALL_EVENTS`, `FAN_ALL_PERM_EVENTS` and `FAN_ALL_OUTGOING_EVENTS` even though they are present in this kernel version's headers. These defines were deprecated[4] in later releases with instructions to not use them in new programs or extend them with new values. It would be a shame for new Rust programs to use deprecated #defines! [0]: http://man7.org/linux/man-pages/man7/fanotify.7.html [1]: https://github.com/torvalds/linux/blob/d54f4fba889b205e9cd8239182ca5d27d0ac3bc2/include/uapi/linux/fanotify.h [2]: http://man7.org/linux/man-pages/man2/fanotify_init.2.html [3]: http://man7.org/linux/man-pages/man2/fanotify_mark.2.html [4]: https://github.com/torvalds/linux/commit/23c9deeb3285d34fd243abb3d6b9f07db60c3cf4#diff-4c9ca62be6bf38cc08f7ea9daf16e379
-
- Apr 01, 2020
-
-
Yuki Okushi authored
Clean up unnecessary link_name attributes
-
Yuki Okushi authored
Haiku: add futimens and utimensat, remove futimes and cleanup.
-
- Mar 31, 2020
-
-
Yuki Okushi authored
Add triagebot configuration
-
Mark Rousskov authored
This enables assignment through triagebot on this repository, in preparation for the migration from highfive to triagebot for PR assignment.
-
- Mar 29, 2020
-
-
Patrick Mooney authored
-
- Mar 28, 2020
-
-
Niels Sascha Reedijk authored
* Function futimes is not available in Haiku. * Functions futimens and utimensat are. * Cleanup some leftover cfg_attr attributes.
-
- Mar 27, 2020
-
-
Yuki Okushi authored
Add Lockf POSIX to UNIX targets
-
Yuki Okushi authored
Add accept4() for NetBSD, Illumos and Solaris
-
Yuki Okushi authored
Add copy_file_range to linux_like
-
- Mar 26, 2020
-
-
Ivan Tham authored
Fix #1631
-
- Mar 25, 2020
-
-
Sergio Lopez authored
This is a Linux-only feature that was already present as a syscall. Add it just to linux/gnu for the moment, as the musl version bundled in the Rust's x86_64-unknown-linux-musl toolchain doesn't include it yet. Signed-off-by:
Sergio Lopez <slp@redhat.com>
-
- Mar 24, 2020
-
-
Yuki Okushi authored
ci: allow overriding run-docker.sh CARGO_HOME.
-
- Mar 21, 2020
-
-
Daniel authored
The `ci/run-docker.sh` utility script adds a `--volume` argument to the `docker` command to mount the Cargo home directory of the host machine into the container at `/cargo`. Prior to this patch the host's Cargo home directory is assumed to be the `dirname` of the `dirname` of the `cargo` command's path. That works in most cases where the host machine installed rust with vanilla `rustup`. It may fail if the host machine used a different method. For example if the host machine used the Archlinux rustup package[0] then `cargo` is installed to `/usr/bin/cargo` and the `run-docker.sh` script incorrectly mounts `/usr/` to the `/cargo` directory of the test container. This patch allows specifying an explicit `CARGO_HOME` to the `ci/run-docker.sh` script so that users with a non-standard cargo dir can use the utility without modification. By default if no `CARGO_HOME` is set then the legacy behaviour is used and `CARGO_HOME` defaults to the `dirname` of the `dirname` of the `cargo` command is used. [0]: https://wiki.archlinux.org/index.php/rust#Arch_Linux_package
-
Torbjørn Birch Moltu authored
References: * NetBSD (became available with 8.0): http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/socket.h?annotate=1.129&only_with_tag=MAIN http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/sys/accept4.c?annotate=1.2&only_with_tag=MAIN * Illumos: https://illumos.org/man/3socket/accept https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/socket.h https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libsocket/socket/weaks.c * Solaris: https://docs.oracle.com/cd/E88353_01/html/E37843/accept-3c.html
-
Yuki Okushi authored
Add definition of ucontext_t for macOS
-
- Mar 20, 2020
-
-
Alex Crichton authored
-
- Mar 18, 2020
-
-
Yuki Okushi authored
Remove MSVC's wmemchr declaration
-
Lzu Tao authored
-
- Mar 17, 2020
-
-
Yuki Okushi authored
Bump version to 0.2.68
-
Yuki Okushi authored
Add constants from `linux/in.h`
-
Yuki Okushi authored
-
- Mar 16, 2020
-
-
Yuki Okushi authored
Add reenterant shadow.h functions
-
- Mar 15, 2020
-
-
Árni Dagur authored
-
Yuki Okushi authored
Enable `s390x-unknown-linux-gnu` on CI
-
Yuki Okushi authored
-
- Mar 14, 2020
-
-
Yuki Okushi authored
Tweak `MAP_SYNC`
-
Yuki Okushi authored
Add missing AT_ constants
-
Thomas Hurst authored
Add AT_EACCESS to Linux, Solaris, and Fuchsia. Add AT_SYMLINK_FOLLOW, AT_REMOVEDIR, and _AT_TRIGGER to Solaris.
-
Yuki Okushi authored
-
- Mar 13, 2020
-
-
Yuki Okushi authored
Unify mmap flags
-
Yuki Okushi authored
add macOS mount flags
-
Connor Kuehl authored
-
Connor Kuehl authored
-
Connor Kuehl authored
-
Andre Nathan authored
-
Yuki Okushi authored
Reduce checks for demoted apple 32-bit targets
-
- Mar 12, 2020
-
-
Yuki Okushi authored
-
Yuki Okushi authored
Add F_OFD_* constants
-