Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ logname(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

profile

environment

env

login

logname

Purpose

     Returns the login name of the user.

Library

     Programmers Workbench Library (libPW.a)

Syntax

     char *logname ( )

Description

     The  logname   subroutine  returns   a  pointer   to  the
     null-terminated  login  name.    The  logname  subroutine
     extracts the  LOGNAME variable  from the  user's environ-
     ment.

     Note:   The  return values  point  to  static data  whose
     content  is overwritten  by  each call.   This method  of
     determining  a login  name  is subject  to forgery.   For
     better   methods,   see   "cuserid,"    "getlogin,"   and
     "getpwent, getpwuid, getpwnam, setpwent, endpwent."

File

     /etc/profile

Related Information

     In this book:  "profile" and "environment."

     The env and  login commands in AIX  Operating System Com-
     mands Reference.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026