NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: group file line length



    Date:        Mon, 10 Mar 2014 20:47:42 +1300
    From:        Mark Davies <mark%ecs.vuw.ac.nz@localhost>
    Message-ID:  <201403102047.43278.mark%ecs.vuw.ac.nz@localhost>

  | On both systems GETGR_R_SIZE_MAX is 1024, so whats going on 
  | here?

The buffer has to hold both the user names, and the pointers to the
user names, on amd64 the pointers are 8 bytes each, on i386 they're
4 bytes each, multiple that 4 byte difference by the number of user names
in your long group line, and you'll account for the difference in the
available string length (note: the space for the pointers, for all
names listed, is grabbed before space for any of the names, so it
is an easy calculation to make).

kre



Home | Main Index | Thread Index | Old Index