Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error checking paths during startup #48

Closed
Lekensteyn opened this issue Mar 29, 2019 · 0 comments · Fixed by #74
Closed

Improve error checking paths during startup #48

Lekensteyn opened this issue Mar 29, 2019 · 0 comments · Fixed by #74
Assignees
Labels
bug Something isn't working good first issue Good for newcomers PR attached security review Issues found during Cloudflare internal security review
Milestone

Comments

@Lekensteyn
Copy link

In src/main.rs, there are some code paths that ignore errors. Among the possibly problematic ones are:

  • When run as root, any failure to change user/group IDs will not result in a fatal error. This might might increase the risk of running with unnecessary privileged. (btw, the option name is misspelled, fixed small errors #43 was incomplete.)
    if !matches.is_present("disable-drop-priviliges") {
        drop_privileges().ok();
    }
  • When running backgrounded (without --foreground), any errors will result in the application being foregrounded anyway. This may be contrary to user expectations.
        match daemonize.start() {
            Ok(_) => println!("Success, daemonized"),
            Err(e) => eprintln!("Error, {}", e),
        }
@Lekensteyn Lekensteyn added bug Something isn't working good first issue Good for newcomers labels Mar 29, 2019
@vkrasnov vkrasnov added the security review Issues found during Cloudflare internal security review label Mar 29, 2019
@vkrasnov vkrasnov self-assigned this Mar 29, 2019
@vkrasnov vkrasnov added this to the v2.0.1 milestone Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers PR attached security review Issues found during Cloudflare internal security review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants