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

enhanced default configuration #194

Merged
merged 7 commits into from
Nov 19, 2015

Conversation

sebastianschauenburg
Copy link

I noticed /etc/ being chmod'ed when the $keys_file is located at "/etc/ntp.keys". The original configuration causes permissions in /etc/ to be recursively changed. I've mitigated this by checking if there are at least 2 directories above the $keys_file (the $keys_file should at least be in /etc/ or /usr/local/ if it's custom compiled). Furthermore changed the default permissions from 0755 to 0640, since the execute bit automatically set by puppet on directories. Usually the service group of this daemon is named 'ntp', as such changed the group. Is this a welcome contribution right now?

@hunner
Copy link
Contributor

hunner commented Feb 26, 2015

For the recursive permissions thing, #212 seems to fix that.

I'm not sure why the module is even managing the parent directory, but not the keys_file itself. Original commit 0235486

@hunner hunner closed this Feb 26, 2015
@hunner hunner reopened this Feb 26, 2015
@hunner
Copy link
Contributor

hunner commented Feb 26, 2015

(Closed by accident)

What if we just don't manage the parent directory? I can't figure out why it was originally done that way.

@sebastianschauenburg
Copy link
Author

The parent directory should be managed, but it indeed should be managed separately (example with an optional $config_dir variable) if you want to do it nicely (IMHO). Then you can include sane defaults.

It's also possible to not include the parent directory at all, but then (if ntp has its own configuration directory) an administrator needs to 'notice' that the configuration directory is not managed. I personally would assume it would be managed with sane defaults.

@hunner
Copy link
Contributor

hunner commented Feb 26, 2015

Yeah, to directly manage $config_dir would be a better option. I mean, this bug should have blown up AIX even, as it's keys file is /etc/ntp.keys by default!

Would you like to update this PR to make it more "confdir" centric instead of "keys file" centric?

@sebastianschauenburg
Copy link
Author

Agreed, I'll update it ASAP

@tphoney
Copy link
Contributor

tphoney commented Mar 9, 2015

Thanks for the effort, This needs rebased.

@sebastianschauenburg sebastianschauenburg force-pushed the enhance-default-config branch 2 times, most recently from 196c16a to 0a68feb Compare March 10, 2015 09:43
@sebastianschauenburg
Copy link
Author

@tphoney thanks for the pointer 👍
@hunner please check if my modifications are correct (I also had to modify the spec file)

}
}

if $config_dir {
file { $config_dir:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indented too far

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

@tphoney
Copy link
Contributor

tphoney commented Apr 21, 2015

@hunner ping, did @Swatx response satisfy you ?

@DavidS
Copy link
Contributor

DavidS commented May 28, 2015

This can still be easily merged, @hunner?

@DavidS
Copy link
Contributor

DavidS commented Aug 27, 2015

Cherry-picking this commit on top of master is still quite easy, if someone want's to resurrect this change.

Then it needs a entry for $config_dir in the README and actual unit-tests, instead of removing the existing ones.

Meanwhile, I added a check to avoid managing '/' or '/etc' in #292 to fix the immediate problem.

@igalic
Copy link
Contributor

igalic commented Sep 21, 2015

👍 do it so, number 1.

@hunner hunner merged commit 7d8883a into puppetlabs:master Nov 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants