[colug-432] best ID function

Tim Randles tim.randles at gmail.com
Mon May 13 13:53:15 EDT 2013


getpwuid


On Mon, May 13, 2013 at 11:46 AM, Rick Troth <rmt at casita.net> wrote:

> from C?
>
> On Mon, May 13, 2013 at 12:47 PM, Jeff Frontz <jeff.frontz at gmail.com>
> wrote:
> > I use "id -un".  Works on linux and MacOS (under ksh).
> >
> >
> >
> >
> > On Mon, May 13, 2013 at 11:58 AM, Rick Troth <rmt at casita.net> wrote:
> >>
> >> There must be two dozen ways to extract the username.
> >> I've coded two or three in the past.  Before I do it again, what would
> >> y'all recommend?
> >>
> >> In this case, I need the username, not the UID.
> >> I'm writing a jail that will run another program for which the
> >> username is one of the arguments.
> >>
> >> --
> >> -- R;   <><
> >> _______________________________________________
> >> colug-432 mailing list
> >> colug-432 at colug.net
> >> http://lists.colug.net/mailman/listinfo/colug-432
> >
> >
> >
> > _______________________________________________
> > colug-432 mailing list
> > colug-432 at colug.net
> > http://lists.colug.net/mailman/listinfo/colug-432
> >
>
>
>
> --
> -- R;   <><
> _______________________________________________
> colug-432 mailing list
> colug-432 at colug.net
> http://lists.colug.net/mailman/listinfo/colug-432
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20130513/cd3bd7b0/attachment.html 


More information about the colug-432 mailing list