1
Fork 0
Commit Graph

256 Commits

Author SHA1 Message Date
Motiejus Jakštys 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
Motiejus Jakštys 34049d13f0 group members are now slices 2022-03-26 12:06:07 +02:00
Motiejus Jakštys 88d88af111 wip cloneArray
may not turn out to be useful though
2022-03-26 11:12:04 +02:00
Motiejus Jakštys 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
Motiejus Jakštys 347f0a1392 Write the file
Also move DB and Corpus to their own files while doing that.
2022-03-24 12:36:08 +02:00
Motiejus Jakštys 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
Motiejus Jakštys 886382d900 clean up build a bit 2022-03-20 08:46:54 +01:00
Motiejus Jakštys b220dd92e3 iovec 2022-03-20 08:42:51 +01:00
Motiejus Jakštys 787fbcf375 [cmph] do our own definitions
so we don't import headers any more.
2022-03-20 08:42:22 +01:00
Motiejus Jakštys f4012c8694 constructing header 2022-03-18 18:22:35 +01:00
Motiejus Jakštys bb3577f7b3 fix one-off bugs 2022-03-18 18:11:45 +01:00
Motiejus Jakštys 0331364da2 test ergonomics
thanks tsmanner
2022-03-18 17:55:45 +01:00
Motiejus Jakštys e4e845384f endianess and nblocks 2022-03-18 17:48:33 +01:00
Motiejus Jakštys 692d80cdd7 corpus: add root 2022-03-18 06:34:28 +01:00
Motiejus Jakštys 4daa6fd38a sections: store offsets in indices 2022-03-18 06:17:52 +01:00
Motiejus Jakštys a426c46efa tidy up imports 2022-03-18 05:52:21 +01:00
Motiejus Jakštys 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
Motiejus Jakštys 85552c1302 make section names more consistent 2022-03-17 06:26:08 +01:00
Motiejus Jakštys 5ee8469ec5 tidy up the header structure 2022-03-17 06:10:39 +01:00
Motiejus Jakštys d526f1fab8 fix shell unit test 2022-03-16 07:12:35 +02:00
Motiejus Jakštys c721fa6d5d split bdz int and str tests 2022-03-16 07:08:57 +02:00
Motiejus Jakštys e142621753 nits in tests 2022-03-16 06:59:12 +02:00
Motiejus Jakštys 9c2f0969dc sections: gc on error 2022-03-16 06:57:35 +02:00
Motiejus Jakštys 8a4bb62613 shr user and group offsets
by 3 bits, all of them.
2022-03-15 10:56:50 +02:00
Motiejus Jakštys 249cdb1a31 remove corpus.users and corpus.groups
These use cases are now fully replaced with MultiArrayList
2022-03-15 10:07:05 +02:00
Motiejus Jakštys 0a0559824a Bdz index helper 2022-03-15 08:09:28 +02:00
Motiejus Jakštys 92ee170d54 bdz/cmph nits 2022-03-15 06:35:48 +02:00
Motiejus Jakštys 6bf3e10eed test packed users iterator 2022-03-15 06:27:03 +02:00
Motiejus Jakštys 2c4e61d0ed remove redundant sections 2022-03-13 14:22:49 +02:00
Motiejus Jakštys 3b2f135d5c refactor ShellReader, so it can be included 2022-03-10 19:20:25 +02:00
Motiejus Jakštys 1751f6c996 replace PackedUserHash with simple PackedUser
passing hashes is OK
2022-03-10 19:20:25 +02:00
Motiejus Jakštys c78a2c0def Implement Groupmembers and Groups section without tests 2022-03-10 19:20:25 +02:00
Motiejus Jakštys d6ba7bed63 group_members 2022-03-10 19:20:25 +02:00
Motiejus Jakštys 4cc655de24 store members_offset as a varint 2022-03-10 13:02:38 +02:00
Motiejus Jakštys ba56ff8d3b user gids are unpadded 2022-03-10 13:02:38 +02:00
Motiejus Jakštys 8fbd605b8d use Multi where appropriate 2022-03-10 13:02:38 +02:00
Motiejus Jakštys 15e018389a username2groups -> user2groups 2022-03-10 13:02:38 +02:00
Motiejus Jakštys c79741f4e2 groupname2users -> group2users 2022-03-10 13:02:38 +02:00
Motiejus Jakštys 9aa52e5a69 offsets are u64, indices are u32 2022-03-10 13:02:38 +02:00
Motiejus Jakštys fc469acbf9 offsets are u64 2022-03-10 13:02:38 +02:00
Motiejus Jakštys d2ace3e125 remove redundant fields 2022-03-10 13:02:38 +02:00
Motiejus Jakštys 9bf0a35689 add a struct for all sections 2022-03-10 13:02:38 +02:00
Motiejus Jakštys 24d984d712 bdz.search_u32: search directly 2022-03-06 18:18:35 +02:00
Motiejus Jakštys c6a133d175 another completed section 2022-03-06 18:03:22 +02:00
Motiejus Jakštys 1caf3f1184 some explicit errors in function signatures 2022-03-06 18:01:52 +02:00
Motiejus Jakštys d3be68b51d generalize Shell2Index for hash and test stubs 2022-03-06 17:55:29 +02:00
Motiejus Jakštys a6349cd114 wip writing of users 2022-03-06 13:11:06 +02:00
Motiejus Jakštys e3fd1c833c userGids unit test 2022-03-06 09:57:44 +02:00
Motiejus Jakštys efd3cfc367 expose `len` to the delta-compressed iterator 2022-03-06 09:39:18 +02:00
Motiejus Jakštys 039aeb80dd delta decompression iterator 2022-03-06 06:37:24 +02:00