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

compose: Migrate content of /etc/{passwd,group} to /usr/lib more sanely #19

Merged
merged 1 commit into from
Jul 11, 2014

Commits on Jul 10, 2014

  1. compose: Migrate content of /etc/{passwd,group} to /usr/lib more sanely

    I had an epiphany today while working on
    https://bugzilla.redhat.com/show_bug.cgi?id=1098304 - I realized that
    I can just do an install, and then copy over everything except the
    root entries from /etc/passwd into /usr/lib/passwd.
    
    No need for a patched shadow-utils.  No need to modify the
    /etc/nsswitch.conf before doing the install root.  It totally works.
    I have no idea why I originally overcomplicated this.
    
    The thing that sucks a bit about this code is that I have to drop to
    the FILE * APIs so that I can use the glibc APIs for processing
    group/shadow.
    
    Also, the way I deduplicated the code paths for processing
    passwd/group is crappy, but I think it's better than duplicating them
    (as systemd-sysusers does).
    
    The good: We don't need a two-step RPM transaction, we don't need
              a patch for shadow-utils, it's just saner
    The bad: Code is not the most beautiful?  Not really bad.
    The ugly: I didn't think of this in the first place and spent
              months beating my head against the wall of shadow-utils...
    cgwalters committed Jul 10, 2014
    1 Configuration menu
    Copy the full SHA
    827e711 View commit details
    Browse the repository at this point in the history