Commit Graph

330 Commits

Author SHA1 Message Date
9e80d6676b move CGroup to Group 2022-04-19 10:46:02 +03:00
be9bf3f51c CGroup is extern struct 2022-04-19 10:42:24 +03:00
70120051c8 members is a pointer now 2022-04-19 10:34:40 +03:00
ce827a9ae6 CGroup.name is [*]u8 now 2022-04-19 10:24:32 +03:00
3eeb0a8332 getgrgid 2022-04-19 10:08:37 +03:00
d4ba5a9a58 Add CGroupPtr 2022-04-19 07:18:41 +03:00
3c507ffe08 pointer size checker 2022-04-19 06:11:37 +03:00
64bd5df633 replace member strlen with getgr_max and getpw_max
This way we can use buffers in both Zig and C, without the performance
or size penalty.
2022-04-18 19:35:26 +03:00
c6bd3f5cb8 storing getgr_max and getpw_max 2022-04-18 13:11:20 +03:00
71f5284399 wip: getgr_max and getpw_max 2022-04-18 11:15:14 +03:00
130aea7cf5 complete the test for getgrnam 2022-04-18 06:57:34 +03:00
c1e20db0bd ugly: make getgrnam test pass 2022-04-18 06:53:06 +03:00
63acece1a4 trivial style 2022-04-18 06:48:31 +03:00
28e8f11f91 getgrnam works, except for memory leaks 2022-04-17 08:58:57 +03:00
67360962c3 fix Group.init to copy appropriately 2022-04-16 06:24:55 +03:00
5968d8494e add CGroup 2022-04-16 05:36:49 +03:00
a655d8a88a wip group clone/new 2022-04-10 23:30:12 +02:00
3447fce9f7 wip groupmembers is 2-alloc away. 2022-04-10 21:00:41 +02:00
3e9cfcbdbf wip fromLine 2022-04-10 20:58:43 +02:00
41ed32994f add strlen for PackedUser strings 2022-04-08 20:05:39 +03:00
c343bf64fb Revert "wip groupmembers is 2-alloc away."
This reverts commit 7c41cbabe7.

Not doing this now.
2022-04-08 16:08:03 +03:00
7c41cbabe7 wip groupmembers is 2-alloc away. 2022-04-08 15:05:56 +03:00
0766175915 wip groupMemberNames 2022-04-07 12:23:50 +03:00
d4d3729bf0 Group.members: fake sentinel at clone time 2022-04-03 14:56:01 +03:00
5704deb6b3 make Group.members an array with sentinel
Triggers a bug in the compiler, similar to
https://github.com/ziglang/zig/issues/7517
2022-04-03 14:48:53 +03:00
34049d13f0 group members are now slices 2022-03-26 12:06:07 +02:00
88d88af111 wip cloneArray
may not turn out to be useful though
2022-03-26 11:12:04 +02:00
fad7c9fbaf DB.header is becoming a pointer
Also, move User, PackedUser, Group, PackedGroup to better-fit places.
2022-03-26 10:40:35 +02:00
347f0a1392 Write the file
Also move DB and Corpus to their own files while doing that.
2022-03-24 12:36:08 +02:00
a8b45911aa weekend changes
- move main.zig to it's own package, create lib/
- rename AllSections to DB, remove intermediate tuples
- iovec does not allocate
- remove error{Overflow} from almost everywhere
2022-03-23 12:01:13 +02:00
886382d900 clean up build a bit 2022-03-20 08:46:54 +01:00
b220dd92e3 iovec 2022-03-20 08:42:51 +01:00
787fbcf375 [cmph] do our own definitions
so we don't import headers any more.
2022-03-20 08:42:22 +01:00
f4012c8694 constructing header 2022-03-18 18:22:35 +01:00
bb3577f7b3 fix one-off bugs 2022-03-18 18:11:45 +01:00
0331364da2 test ergonomics
thanks tsmanner
2022-03-18 17:55:45 +01:00
e4e845384f endianess and nblocks 2022-03-18 17:48:33 +01:00
692d80cdd7 corpus: add root 2022-03-18 06:34:28 +01:00
4daa6fd38a sections: store offsets in indices 2022-03-18 06:17:52 +01:00
a426c46efa tidy up imports 2022-03-18 05:52:21 +01:00
4e36d7850e rewrite shells
- Shell is up to 256 bytes long.
- Store up to 255 shells in the Shells area.
- Remove padding from the User struct.
2022-03-17 17:07:33 +01:00
85552c1302 make section names more consistent 2022-03-17 06:26:08 +01:00
5ee8469ec5 tidy up the header structure 2022-03-17 06:10:39 +01:00
d526f1fab8 fix shell unit test 2022-03-16 07:12:35 +02:00
c721fa6d5d split bdz int and str tests 2022-03-16 07:08:57 +02:00
e142621753 nits in tests 2022-03-16 06:59:12 +02:00
9c2f0969dc sections: gc on error 2022-03-16 06:57:35 +02:00
8a4bb62613 shr user and group offsets
by 3 bits, all of them.
2022-03-15 10:56:50 +02:00
249cdb1a31 remove corpus.users and corpus.groups
These use cases are now fully replaced with MultiArrayList
2022-03-15 10:07:05 +02:00
0a0559824a Bdz index helper 2022-03-15 08:09:28 +02:00