USERFN
Section: Howard\'s C library (3 -lhoward)
Updated: $Revision: 1.1 $
Index
Return to Main Contents
NAME
userfn - copy full name of user
SYNOPSIS
#include <stdio.h>
#include <howard/port.h>
#include <howard/malf.h>
bStrT userfn (
buffer)
bStrT buffer;
COPYRIGHT
Copyright © 1989 Howard Lee Gayle
DESCRIPTION
userfn
copies into the area to which
buffer
points the full (real) name of the user running the process
that called it.
It first tries to get the user's login name with
getlogin(3),
then gets the password entry with
getpwnam.
If that fails, it gets the password entry with
getpwuid.
In either case, it then calls
getpwf
to get the full name.
RETURNS
On success, a pointer to the NUL in
buffer
at the end of the copied full name.
NULL if the full name is empty or there is no password entry.
SEE ALSO
getpwent(3),
getpwf(3 -lhoward).
LICENSE
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 1,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
AUTHOR
Howard Gayle,
TN/ETX/T/BG,
Ericsson Telecom AB,
S-126 25 Stockholm,
Sweden,
howard@ericsson.se,
uunet!ericsson.se!howard,
Phone: +46 8 719 5565,
FAX: +46 8 719 9598,
Telex: 14910 ERIC S
Index
- NAME
-
- SYNOPSIS
-
- COPYRIGHT
-
- DESCRIPTION
-
- RETURNS
-
- SEE ALSO
-
- LICENSE
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 21:53:04 GMT, February 02, 2023