Code Monkey home page Code Monkey logo

core's People

Contributors

adamhjk avatar baumanj avatar chef-delivery avatar chefsalim avatar christophermaier avatar dmccown avatar elliott-davis avatar fnichol avatar georgemarshall avatar jeremymv2 avatar mwrock avatar raskchanky avatar reset avatar rsertelon avatar smacfarlane avatar smurawski avatar stevendanna avatar thesentinels avatar vegai avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

core's Issues

BoxKeyPair::encrypt functions return type is misleading

The currently return type is Result<Vec<u8>>. This implies that the encrypted values are raw bytes, when in-fact they are bytes that represent a base64 encoded utf8 string. Either the return type should be changed to Result<String> (and comments added to indicate that String is base64 encoded) or the return value should be raw bytes, not base64-encoded.

This caused quite a bit of confusion.

output.rs uses unnecessary unsafe code

There are several AtomicBools that are declared static mut and accessing static mut data requires unsafe code. However, atomics use interior mutability, so it's not necessary to declare these variable static mut; static will suffice and therefore the unsafe code to get/set these atomics can be removed.

Additionally, one of the atomics is named NO_COLOR with the comment:

// I am sorry this isn't named the other way; I can't get an atomic initializer that defaults to
// true. Them's the breaks.

This is no longer true; the following is legal since the introduction of const fn:

static COLOR: AtomicBool = AtomicBool::new(true);

Signals in rapid succession could end up unhandled

The handle_signal function is registered to receive signals, but all it does currently is modify two static atomic variables to indicate that a signal is waiting to be processed and which signal it is. Consumer code calls check_for_signal, which resets the state of these variables before returning the type of signal that is waiting (or None).

In the event that multiple signals are received before check_for_signal is called, all but the last would be functionally ignored. Additionally, there is no way for the code calling check_for_signal to indicate whether it's successfully processed the signal.

Remove misleading implementations of set_permissions and set_owner on Windows

Currently set_permissions and set_owner depend upon chmod and chown. However, on Windows, these functions are implemented as essentially no-ops. This leads to code in habitat and builder which is potentially very misleading.

Once the dependent code is fixed (see habitat-sh/habitat#5591 and habitat-sh/builder#627), the set_permissions and set_owner implementations should be removed from the Windows platform until we can provide proper implementations. This will require additional, nontrivial FFI work since Window's permissions and ownership models are different.

lockdown supervisor directory perms on windows

#5580 accomplished this on Linux but the chmod and chown implementations for Windows in core are no op so that change has no effect on Windows. This will not be quite as simple as providing Windows implementations to those functions since the Windows APIs for accomplishing this are much different. I'm not sure exactly how this will look yet but I am filing this in this repo since this is where the behavior is needed and it will likely include changes here as well as core.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.