Skip to content

Support privilege dropping? #74

@mperham

Description

@mperham

Since RubyDNS will often bind to privileged port 53, it will be run as root. Ideally it will drop after binding.

http://timetobleed.com/5-things-you-dont-know-about-user-ids-that-will-destroy-you/

uid = Etc.getpwnam("nobody").uid
Process::Sys.setuid(uid)

Pseudocode:

RubyDNS.run_server(INTERFACES, user: 'nobody') do
  ...
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions