]> git.cameronkatri.com Git - pw-darwin.git/commit
Add four utility functions related to struct grp processing modeled in-part
authorSean Farley <scf@FreeBSD.org>
Wed, 23 Apr 2008 00:49:13 +0000 (00:49 +0000)
committerSean Farley <scf@FreeBSD.org>
Wed, 23 Apr 2008 00:49:13 +0000 (00:49 +0000)
commit97cc03f4f3328180c8f49cd61c406bb7bc8a2dcb
treead0ea3d8e0c37a4fc81d211a9bcd68f4eb950de4
parent5fba38d0ad9b28b48e7927838169aca2983c6ae9
Add four utility functions related to struct grp processing modeled in-part
after similar calls related to struct pwd in libutil/pw_util.c:
  - gr_equal()
    Perform a deep comparison of two struct grp's.  It does a thorough, yet
    unoptimized comparison of all the members regardless of order.

  - gr_make()
    Create a string (see group(5)) from a struct grp.

  - gr_dup()
    Duplicate a struct grp.  Returns a value that is a single contiguous
    block of memory.

  - gr_scan()
    Create a struct grp from a string (as produced by gr_make()).

MFC after: 3 weeks
libutil/gr_util.c [new file with mode: 0644]
libutil/libutil.h