1. 19 Dec, 2016 1 commit
    • Mike Hibler's avatar
      Another speed up for the 'pw' command. · 4e90c06e
      Mike Hibler authored
      A recent commit to 10-STABLE caught my attention since it was a speed
      up of the 'pw' command. Probably not a huge issue in our environment,
      but I incorporated it into our patch.
  2. 22 Nov, 2016 1 commit
    • Mike Hibler's avatar
      Optimize the case of a "usermod -G" which changes only a few groups. · 9ab75810
      Mike Hibler authored
      The handling of group file changes via the -G option is abysmal.
      It creates a new copy of the installed group file on every group line
      changed, fsync'ing after the new copy is made. On top of that, it implements
      a new group list by first removing the user from all existing groups and then
      reading them to every group in the new list, thereby maximizing the number of
      group lines changed!
      On the Emulab mothership where, for example, the "geniuser" user is in
      some 450+ groups, adding them to a new group entailed changing 450+ lines
      twice, resulting in over 900 copies of the 2000 line group file being
      written. This took about 17 minutes.
      The change here is modest, just check where the group line needs to be
      changed or not before doing anything. In the case above, adding a single
      group for a user, we only write the group file once. This takes about 0.8