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

Remove ability to change user/group - Issue #144 #154

Merged
merged 3 commits into from May 3, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions bin/rmt-cli
Expand Up @@ -14,12 +14,8 @@ require 'rmt/config'

# don't run as root
if Process.euid == 0

group = Settings&.[](:cli)&.[](:group) || RMT::DEFAULT_GROUP
user = Settings&.[](:cli)&.[](:user) || RMT::DEFAULT_USER

Process::Sys.setegid(Etc.getgrnam(group).gid)
Process::Sys.seteuid(Etc.getpwnam(user).uid)
Process::Sys.seteuid(Etc.getpwnam(RMT::DEFAULT_USER).uid)
Process::Sys.setegid(Etc.getgrnam(RMT::DEFAULT_GROUP).gid)
end

relative_load_paths = %w[lib lib/rmt app/models app/services].map { |dir| File.join(rmt_path, dir) }
Expand Down
4 changes: 0 additions & 4 deletions config/rmt.yml
Expand Up @@ -32,10 +32,6 @@ mirroring:
rails:
port: 4224

cli:
user: _rmt
group: nginx

http_client:
verbose: false
proxy:
Expand Down
6 changes: 6 additions & 0 deletions package/rmt-server.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 3 08:50:43 UTC 2018 - tmuntaner@suse.com

- Removed ability to change user/group through configuration (GH-144)
See: https://github.com/SUSE/rmt/pull/154

-------------------------------------------------------------------
Thu Apr 26 14:58:45 UTC 2018 - tmuntaner@suse.com

Expand Down
4 changes: 0 additions & 4 deletions package/rmt.conf
Expand Up @@ -20,10 +20,6 @@ mirroring:
rails:
port: 4224

cli:
user: _rmt
group: nginx

http_client:
verbose: false
proxy:
Expand Down