News for hackers. Stuff that matters.
Re:Strong_password Rubygem hijacked by redsymbol on Sunday July 07, 2019 @08:59PM (#20379104)
> few libraries actually have a good excuse to do I/O (though logging might be thorny).

Yeah, logging would be tricky...

Maybe a "logging" capability could be created. Separated from other I/O.

Such a capability would be weird, and nonstandard, and messy, cutting across several several abstraction layers. But if pulled off, it might be worth the effort.

Re:Strong_password Rubygem hijacked by viraptor on Sunday July 07, 2019 @10:09PM (#20379399)
That's solved in similar frameworks by separating open and read/write. You open (or inherit from somewhere) a logging socket, drop the open privileges, retain the permission to write to the log socket.
Re:Strong_password Rubygem hijacked by masklinn on Monday July 08, 2019 @01:51AM (#20380202)
This discussion is basically inventing a per-library pledge(2).
Re:Strong_password Rubygem hijacked by viraptor on Monday July 08, 2019 @03:32AM (#20380660)
or apparmor, selinux, grsec, tomoyo, ... But those systems can't integrate into scripting language per-library use case without some serious thread / IPC overhead.
Re:Strong_password Rubygem hijacked by masklinn on Monday July 08, 2019 @03:42AM (#20380709)
These others can achieve what's intended, but the entire flavour of the discussion is a dead ringer for pledge's purpose and interface, which is much simpler and very much internal to the software (a self-check of sorts).
Re:Strong_password Rubygem hijacked by Anagmate on Wednesday July 10, 2019 @07:08AM (#20400828)
Haskell indirectly solves this by separating `trace` (a form of logging) from IO (trace is a procedure that logs function call while all other IO must be contained in an IO monad).