Commit Graph

41 Commits

Author SHA1 Message Date
auronandace 4f2059cae7 remove sys_types from grp header 2026-05-10 15:51:37 +01:00
Speedy_Lex eff610eac6 Fix many clippy lints 2026-05-07 00:05:07 +02:00
Connor-GH 7c8259dfd6 fix some lints caught by Clippy
Most of these changes are very simple. Among the changes made involve
taking advantage of auto-deref (`(*val).foo()` -> `val.foo()`) and
removing instances where we create a ref and immediately dereference it
(`&*val` -> `val`). There was a pretty neat case in `posix_openpt` where
some pointer verbosity was able to be reduced by using the more modern C
strings rather than the byte strings with an explicit NUL at the end.

Additionally, `exit()` now calls `unreachable!()` at the end. We
previously did `loop {}`, but clippy didn't like this. It can be up for
debate whether we want to make this `unreachable_unchecked` or similar.

There is only one change that might cause any sort of concern, and that
is the change from `.skip_while(!p).next()` -> `.find(p)`. This, like
everything else, was caught in a Clippy lint but I believe it deserves
some explanation because it isn't immediately obvious. Info about the
lint is here: https://rust-lang.github.io/rust-clippy/rust-1.89.0/index.html#skip_while_next
2026-04-30 19:02:35 -05:00
Peter Limkilde Svendsen fbccaff46c Move setgroups() to grp.h 2026-04-13 22:56:56 +02:00
auronandace 6d0030b765 make usize as size_t as per spec 2026-04-02 13:59:14 +01:00
auronandace 83eb95a496 verify grp header includes 2026-03-31 09:15:51 +01:00
auronandace 2f90dcd08e correct the strncmp check in getgrnam_r 2026-03-13 12:44:46 +00:00
auronandace 6933287a94 enforce borrow-as-ptr clippy lint 2026-03-01 19:54:31 +00:00
auronandace 874e11b147 grp and inttypes cleanup 2026-02-19 15:51:33 +00:00
auronandace 20bdf30526 remove allow warnings and add some lints 2026-02-15 21:38:08 +00:00
auronandace 64f18ca89a add unused_mut lint 2026-02-08 09:00:14 +00:00
sourceturner defd2ce7c3 Deny deny-unsafe_op_in_unsafe_fn on the crate level 2026-01-21 00:41:57 +01:00
auronandace 329c7c42f8 only import needed types 2025-12-11 15:10:03 +00:00
auronandace a1b23a3dbf update and add spec links to grp 2025-12-11 15:06:57 +00:00
Jeremy Soller 82084440ad Support nightly-2025-10-03 2025-10-03 21:51:10 -06:00
Wildan M 0636af21a4 Add shadow.h support 2025-09-19 14:04:55 +07:00
Wildan Mubarok 2f35c4a665 Fix getgrouplist len 2025-09-15 21:29:27 +00:00
Wildan Mubarok 94fbdd5159 Fix grp implementation 2025-09-15 21:14:53 +00:00
Wildan Mubarok 2c4bd8d061 Fix grp.h and gid_t/uid_t for Go 2025-07-21 00:15:02 +00:00
Josh Megnauth 51c04d2470 Use C string literals & deprecate c_str! 2025-03-14 21:17:53 -04:00
Josh Megnauth 14988e33b2 Unsafe blocks: getopt.h, grp.h 2024-12-13 01:20:24 -05:00
Derick Eddington 572f211be0 Fix getgrgid_r. 2024-07-06 22:47:55 -07:00
Derick Eddington 7c81de68b8 Fix header::grp::parse_grp. 2024-07-06 22:47:55 -07:00
Peter Limkilde Svendsen a7137512fa Use standard casing and mangling for internal errno 2024-03-01 00:25:42 +00:00
Peter Limkilde Svendsen 9093f6bc47 Use Cell representation for errno 2024-02-29 14:07:40 +00:00
Jeremy Soller 8313fc1c77 Fix array pointer mismatch in parse_grp 2024-02-10 14:27:50 -07:00
Jeremy Soller a2321e4b2b Add initgroups 2024-01-16 20:00:57 -07:00
Jeremy Soller 92b56f3f92 Format 2024-01-03 11:46:29 -07:00
4lDO2 75d1c67ca2 Switch to a lightweight CStr wrapper 2023-11-04 18:29:38 +00:00
Ian Douglas Scott f195c8c126 Correctly parse /etc/passwd and /etc/group on Redox
Redox uses `;` as separators in these files, and doesn't have the
"password" flag in `/etc/group`. With these, it seems to parse fine.
2023-11-01 19:31:46 -07:00
4lDO2 ae46e37ca7 Run rustfmt 2023-10-26 15:51:04 +02:00
4lDO2 7fce3c5734 Fix grp.h soundness and incorrect ::libc usage. 2023-10-26 15:34:55 +02:00
Jacob Schneider 2f887ae434 Groups 2023-08-21 12:05:16 +00:00
jD91mZM2 593925ceb4 Unambiguate all include guards
GNU binutils also uses _FNMATCH_H for a guard, maybe along others!
2020-06-29 11:34:51 +02:00
jD91mZM2 c7d499d4f2 Upgrade to the 2018 edition
I didn't think it'd be this useful first, but thank god for `cargo fix --edition`!
2019-08-04 19:05:45 +02:00
Mateusz Mikuła 63a1319e50 Cbindgen update 2019-07-10 10:08:39 +00:00
Jeremy Soller 22ca2e5f7b Export group struct 2019-01-15 21:08:08 -07:00
Jeremy Soller a39f170ed3 Reenable grp header (for git) 2018-12-02 12:35:38 -07:00
Jeremy Soller 950b4526c7 - Disable output of empty header files
- Remove incorrect header styles
- Use export.replace where header style was previously needed
- Check compilation of tests using system gcc
2018-11-26 21:35:02 -07:00
Jeremy Soller 7ab700315d Fix warnings and add c_str 2018-08-26 15:15:29 -06:00
Jeremy Soller c20ce5ffed Large reorganization of headers (WIP) 2018-08-26 08:11:35 -06:00