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

postprocess: Write preserved groups to *both* /etc/group and /usr/lib/gr... #69

Closed
wants to merge 1 commit into from

Conversation

cgwalters
Copy link
Member

...oup

Otherwise, upgraded systems which have modified /etc/group (by e.g.
adding a human user), will actually see the group drop out with bad
consequences.

It's harmless to have it in both, /etc will override /usr.

Fixes #67

…/group

Otherwise, upgraded systems which have modified /etc/group (by e.g.
adding a human user), will actually see the group drop out with bad
consequences.

It's harmless to have it in both, /etc will override /usr.

Fixes #67
@mbarnes
Copy link
Contributor

mbarnes commented Dec 5, 2014

The new logic could be a tad clearer with:

if (id == 0)
deststream = etcdest_stream;
else
deststream = usrdest_stream;

Also I'd suggest a comment before the assertion, since it took me a minute to figure out what that was actually asserting. Maybe something like:

/* Don't write the root entry to /etc twice. */
g_assert (deststream == usrdest_stream);

@cgwalters
Copy link
Member Author

Made both those changes, thanks!

@cgwalters cgwalters closed this Dec 5, 2014
@cgwalters cgwalters deleted the preserve-groups-both branch December 5, 2014 16:48
cgwalters referenced this pull request in cgwalters/rpm-ostree Jan 7, 2015
Due to an intersection of #79 and #69, we ended up continually
accumulating copies in /usr/lib/{passwd,group}.  The fix here is to
deduplicate when constructing the temporary /etc/passwd that the RPM
install will operate on.

Closes: coreos#92
cgwalters referenced this pull request in cgwalters/rpm-ostree Jan 7, 2015
Due to an intersection of #79 and #69, we ended up continually
accumulating copies in /usr/lib/{passwd,group}.  The fix here is to
deduplicate when constructing the temporary /etc/passwd that the RPM
install will operate on.

Closes: coreos#92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

etc-group-members needs to write to *both* files
2 participants