[Lazarus] Supported Lazarus platforms

Marco van de Voort marcov at stack.nl
Mon Feb 25 12:52:36 CET 2008


On Fri, Feb 22, 2008 at 12:44:35PM +0200, Graeme Geldenhuys wrote:
> On 22/02/2008, Marco van de Voort <marcov at stack.nl> wrote:
> >
> > Like? Note that the password stuff is now in both 2.2.1 and 2.3.x in the
> >  "users" package.
> 
> getgrgid()  - Used for getting the Group ID Name from the Group ID.
> getpwuid() - Used for getting the User Name from the User ID.
 
> Both of these are used in a FileGrid component (eg: File Open Dialog)
> to display a files User and Group names like  graemeg:users    instead
> of  5000:3000

Yes these are in users. So if you have snapshots (both 2.2.1 and 2.3.1) of
february or later, simply use units "grp" and "pwd". Also have a look at
"users" where Michael stuffed some wrappers (though I don't particularly
like them). The source is in fpc/packages/users/src

If you don't use recent snapshots, just get these units from the snapshot
and use them with your current versions.

Don't forget to prefix the function names with "fp", as done in the entire
RTL for libc primitives to escape naming conflicts.
 
> My work-around for FreeBSD is to display the numeric values only. I'm
> thinking of looking up the values manually in /etc/groups and
> /etc/passwd but was told it can be inaccurate.

Depends who you make software for. If you make it for some embedded device
that you fully control you can. If it is somehow for general customers
compensation, don't. Sooner or later you'll run into places that have
central authentication systems for lots of machines (and Stack is one of
them which is why I revamped these units). There are even places that link
them to Active Directory via LDAP.




More information about the Lazarus mailing list