Commit Graph

20 Commits

Author SHA1 Message Date
Kartik K. Agaram 0abd09dc05 rendering improvement 2022-01-02 22:52:57 -08:00
Kartik K. Agaram e3cef7ee56 bugfix: policies must end in newline
I believe kilo kinda naturally enforces that. We'll see.
2022-01-02 22:38:28 -08:00
Kartik K. Agaram a901203227 start on a view of audit events 2022-01-02 22:13:47 -08:00
Kartik K. Agaram 2d0bb4438c editing file permissions 2022-01-02 21:33:49 -08:00
Kartik K. Agaram d0111f1839 editable file permissions
Extremely cruddy implementation:
- I'm still unclear on how to represent the advice function:
  - How to handle errors when loading user configuration?
    Currently I refuse to start.
  - Whole function? More errors to handle in header and so on. What if
    the function is renamed?
  - Just body? Needs more structured editing support.
- Lots of duplication, particularly between the permissions in the menu
  and the permissions screen.

I don't know how to show the hostname at the time of connect() or
bind(), so networking is going to remain a boolean for now. It's also
unclear what effective constraints we can impose on what gets discussed
with a specific hostname. Everything outside the computer is out of
one's control.

One trick I learned is for consistently grabbing ASan logs on abort:
It's always safe to redirect stderr with ncurses!
2022-01-02 19:59:30 -08:00
Kartik K. Agaram a2081ee612 fork a new editor widget for non-code 2022-01-02 16:55:23 -08:00
Kartik K. Agaram f6aaf2fd1d better follow kilo's naming conventions 2022-01-02 16:52:36 -08:00
Kartik K. Agaram 2b1609f09b copy tweak 2022-01-02 15:52:02 -08:00
Kartik K. Agaram df5cd41637 rename 2022-01-02 15:46:46 -08:00
Kartik K. Agaram 762b77f68b sandbox: tweaks to warning copy 2022-01-02 12:49:31 -08:00
Kartik K. Agaram 40a0aca6e3 spacing 2021-12-26 00:04:28 -08:00
Kartik K. Agaram 04a062e94d start persisting sandboxing settings
Zero guarantees of compatibility at this point.
2021-12-25 21:36:31 -08:00
Kartik K. Agaram e7dc519c40 reorg 2021-12-25 21:26:47 -08:00
Kartik K. Agaram 16d949e259 file open() is now sandboxed
In the process we now also have a mechanism for Teliva to overlay errors
while apps run. Might make sense to make that available to apps as well.
But I'm starting to realize that any app access to the Teliva areas of
the screen is fraught with risk.
2021-12-25 18:55:01 -08:00
Kartik K. Agaram f5ab71b4e1 flesh out very preliminary UI
Our sandboxing model is a blunt caricature, just two booleans. But let's
see how far this gets us.

Still doesn't persist, and definitely has no effect.
2021-12-25 18:51:05 -08:00
Kartik K. Agaram 12cb565077 delete a couple more hacky function prototypes 2021-12-25 16:21:40 -08:00
Kartik K. Agaram dbbb396003 . 2021-12-25 16:16:48 -08:00
Kartik K. Agaram a36edb74f0 mock sandbox status and some initial colors
Current plan:
  - two booleans to gate file and network access, respectively
  - false shows as green, true shows as orange
  - if _both_ booleans are true, then both show as red to indicate that
    there are no protections.
2021-12-25 16:08:31 -08:00
Kartik K. Agaram 526d37e4ac fix menu colors in all color schemes
It looks like attron doesn't actually enable colors near 256, even
though https://linux.die.net/man/3/attron suggests it does.

  > COLOR_PAIR values can only be OR'd with attributes if the pair
  > number is less than 256.
2021-12-25 14:59:18 -08:00
Kartik K. Agaram bb6e79aa0d reorg: pull Teliva-specific stuff out of lua.c
It should now be easier to diff against the Lua 5.1 sources upstream.
2021-12-25 13:33:37 -08:00