1
Fork 0
Commit Graph

242 Commits

Author SHA1 Message Date
Motiejus Jakštys 292bc4e4e0 shrink turbo-analyze
https://github.com/ziglang/zig/issues/12061
2022-07-09 21:02:03 +03:00
Motiejus Jakštys 02ddc548f5 debugging libnss_turbo.so.2 2022-07-09 19:04:19 +03:00
Motiejus Jakštys ac71195144 use SplitBackwardsIterator from stdlib 2022-07-09 17:49:11 +03:00
Motiejus Jakštys 9f884b96f7 build libnss_turbo.so.2.0.0 2022-07-09 17:33:13 +03:00
Motiejus Jakštys 78ac541e49 libnss: pass state explicitly 2022-07-09 16:51:44 +03:00
Motiejus Jakštys f327fb24ba tests for initgroups_dyn 2022-07-09 16:12:10 +03:00
Motiejus Jakštys 5fa4a71ddf use omit_members sometimes 2022-07-09 05:38:19 +03:00
Motiejus Jakštys 434f9e1571 wip initgroups_dyn 2022-07-08 06:29:42 +03:00
Motiejus Jakštys df14c1fc67 refactor libnss.zig 2022-07-07 21:23:10 +03:00
Motiejus Jakštys 98db4ce0b2 wip: setgrent/setpwent + endpwent/endgrent 2022-07-07 16:42:45 +03:00
Motiejus Jakštys 50e116275c group names are sentinel-terminated 2022-07-07 14:39:40 +03:00
Motiejus Jakštys 5f49a9f881 wip: getgrnam_r and getgrgid_r 2022-07-07 06:54:27 +03:00
Motiejus Jakštys 1995da9a77 nit: naming 2022-07-07 06:14:49 +03:00
Motiejus Jakštys a63c60cc6f passwd fields now have sentinels 2022-07-06 17:14:54 +03:00
Motiejus Jakštys 4a3d43561f the test seems to work 2022-07-06 16:47:10 +03:00
Motiejus Jakštys a2893a366e getpwnam_r and getpwuid_r 2022-07-06 16:29:21 +03:00
Motiejus Jakštys 64f6af6e94 libnss: better handling of env vars 2022-07-06 14:06:50 +03:00
Motiejus Jakštys 59eae5fa3b libnss: shorter code 2022-07-06 13:53:51 +03:00
Motiejus Jakštys 9bd922a55a better comptime 2022-07-06 13:29:36 +03:00
Motiejus Jakštys efdc919195 wip libnss 2022-07-06 13:19:15 +03:00
Motiejus Jakštys 4e9f609131 show endianess better 2022-07-06 12:38:56 +03:00
Motiejus Jakštys f2570529d7 add missing args 2022-07-06 12:35:17 +03:00
Motiejus Jakštys 6c6d9d9c2c replace users_arr and groups_arr with smaller arrays
RSS savings are trivial, it was not worth it.
2022-07-06 12:32:52 +03:00
Motiejus Jakštys 86d5c026be avoid use of groups_arr 2022-07-06 12:18:53 +03:00
Motiejus Jakštys 97dde99d5e unix2db: use correct file permissions 2022-07-06 11:30:50 +03:00
Motiejus Jakštys cb9250010e inverse headers 2022-07-06 11:17:52 +03:00
Motiejus Jakštys 9f69a972ee analyze: show begin/end 2022-07-06 11:16:20 +03:00
Motiejus Jakštys 09de309b6e turbo-analyze now shows something 2022-07-06 10:23:46 +03:00
Motiejus Jakštys 601b1b4a6e split calculation of lengths and offsets 2022-07-06 08:42:15 +03:00
Motiejus Jakštys 65b0fa774d wip: turbo-analyze 2022-07-05 09:09:32 +03:00
Motiejus Jakštys 84eb2ca6f0 change allocator to raw_c_allocator 2022-07-05 06:03:25 +03:00
Motiejus Jakštys 1546871e2d use buffered reader 2022-07-05 06:03:25 +03:00
Motiejus Jakštys 752b0bac6f pack differently 2022-07-05 06:03:25 +03:00
Motiejus Jakštys eaccd00960 handle duplicate gid 2022-07-04 06:09:03 +03:00
Motiejus Jakštys e6b9d43646 slice pointer and unit test fixes 2022-07-04 05:46:56 +03:00
Motiejus Jakštys c39f89d995 realistic bugfixes 2022-07-03 09:44:09 +03:00
Motiejus Jakštys 2e4229d613 main: trivial errors 2022-07-03 06:39:33 +03:00
Motiejus Jakštys c294d149fc fix unix2db 2022-07-02 21:19:42 +03:00
Motiejus Jakštys e79cdaffde fix user writing 2022-07-02 16:24:47 +03:00
Motiejus Jakštys 83fa0c8733 better char debugging experience 2022-07-02 16:17:10 +03:00
Motiejus Jakštys 186796fffc user.fromLine tests 2022-07-02 09:14:02 +03:00
Motiejus Jakštys e7fb0c18d4 User.fromLine 2022-06-29 13:55:53 +03:00
Motiejus Jakštys 5d171883a7 home + shell validators 2022-06-29 13:49:20 +03:00
Motiejus Jakštys 7911287261 gecos validator 2022-06-29 13:37:36 +03:00
Motiejus Jakštys 942c05f348 name validation 2022-06-29 10:48:37 +03:00
Motiejus Jakštys b703eeb37c wip fromLine tests 2022-06-28 19:55:33 +03:00
Motiejus Jakštys f30510f122 wrap errors in real code with quotes 2022-06-28 16:44:44 +03:00
Motiejus Jakštys 71f94d0600 fix error wrapping 2022-06-28 16:41:10 +03:00
Motiejus Jakštys 3872f2af40 fix split_rev 2022-06-28 16:04:23 +03:00
Motiejus Jakštys 0865965762 wip: failure tests 2022-06-22 21:16:13 +03:00
Motiejus Jakštys 7d73667250 code style 2022-06-22 21:06:20 +03:00
Motiejus Jakštys a4d5be6fab wip error context 2022-06-22 20:59:58 +03:00
Motiejus Jakštys 6aa4b01692 wip handling errors in top level 2022-06-22 16:23:04 +03:00
Motiejus Jakštys 62b643dbc2 ErrCtx: splitRev 2022-06-22 15:36:22 +03:00
Motiejus Jakštys 675125be05 beginnings of using ErrCtx 2022-06-15 13:34:37 +03:00
Motiejus Jakštys eb6003c957 wip ErrCtx 2022-06-15 12:56:19 +03:00
Motiejus Jakštys 72f6c9c6f4 don't be smart about memory continuity 2022-06-12 13:38:10 +03:00
Motiejus Jakštys 9b803b84d2 add ErrContext 2022-06-12 13:27:12 +03:00
Motiejus Jakštys 12561d9f3a wip: full smoke test 2022-06-07 13:14:50 +03:00
Motiejus Jakštys e2d20bb805 formatting 2022-06-07 06:30:18 +03:00
Motiejus Jakštys a5c24ace80 writing to the db 2022-06-07 05:59:00 +03:00
Motiejus Jakštys 31b5bb2d72 Group.fromReader 2022-06-07 05:39:16 +03:00
Motiejus Jakštys e238db9b60 unix2db: first stab at flag parsing 2022-06-06 10:01:15 +03:00
Motiejus Jakštys 20bfa60f26 fixes for zig 0.10.0-dev.2473+e498fb155 2022-06-05 23:11:18 +03:00
Motiejus Jakštys d71f0d615b fix one of stage2 errors 2022-05-25 09:48:39 +03:00
Motiejus Jakštys c602b7a039 rename lib to src 2022-05-25 09:42:42 +03: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 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