GETPWF

Section: Howard\'s C library (3 -lhoward)
Updated: $Revision: 1.2 $
Index Return to Main Contents
 

NAME

getpwf - copy full name of user from password file entry  

SYNOPSIS

#include <stdio.h>
#include <pwd.h>
#include <howard/port.h>
#include <howard/malf.h>

bStrT getpwf ( passwdPtr, buffer)

struct passwd *passwdPtr;
bStrT buffer;
 

COPYRIGHT

Copyright © 1989 Howard Lee Gayle  

DESCRIPTION

passwdPtr points to a password file entry for a user. getpwf copies the user's full (real) name into the area to which buffer points. It does this in the face of BSD asterisk, ampersand, and comma kludges.  

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.  

EXAMPLE

The password entry
   howard::159:13:*& Gayle,TN 15028,95565,:/u5/howard:/bin/csh
results in "Howard Gayle" in buffer.  

SEE ALSO

getpwent(3), userfn(3 -lhoward).  

BUGS

The BSD asterisk convention is a kludge. It is a convention for password aging. An asterisk at the beginning of the GECOS field is ignored by all software except passwd(1), which removes it when the password is changed. By periodically setting an asterisk on all password entries, it is possible to see which users have not changed their passwords within a given time.

The BSD ampersand convention is a kludge. An ampersand in the GECOS field expands into a capitalized copy of the login name. Users whose login names are one of their real names can thus have slightly shorter password entries. Big deal!

The BSD comma convention is a kludge. BSD treats the GECOS field as a comma-separated list of subfields: full name, room number, office phone, home phone. These additional data should go somewhere else. This kludge eliminates full names with commas, e.g. Henry Ford, Jr. This is probably why he never had a UNIX login.  

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
EXAMPLE
SEE ALSO
BUGS
LICENSE
AUTHOR

This document was created by man2html, using the manual pages.
Time: 21:53:03 GMT, February 02, 2023