Unix information relevant to Converse. Used to get the User Information. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- GETUID(2) UNIX Programmer's Manual GETUID(2) NAME getuid, geteuid - get user identity SYNOPSIS #include uid_t getuid(void); uid_t geteuid(void); DESCRIPTION Getuid returns the real user ID of the current process, geteuid the effective user ID. The real user ID identifies the person who is logged in. The effective user ID gives the process additional permis- sions during execution of "set-user-ID" mode processes, which use getuid to determine the real-user-id of the pro- cess that invoked them. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- GETPWUID(3) UNIX Programmer's Manual GETPWUID(3) NAME getpwuid, getpwnam, getpwent, setpwent, endpwent, setpwfile - user database access SYNOPSIS #include #include struct passwd *getpwuid(uid_t uid) struct passwd *getpwnam(const char *name) (ALSO AVAILABLE IN BSD) struct passwd *getpwent(void); void setpwent(void); void endpwent(void); void setpwfile(char *name); DESCRIPTION The getpwuid and getpwnam functions both return a pointer to a passwd structure containing an entry from the system's user (password) database with a matching numeric user ID (uid) or a user login name (name). The passwd structure is defined in the header and includes the following members: struct passwd { /* see getpwent(3) */ char *pw_name; /* name (login name, contains no upper case) */ char *pw_passwd; /* encrypted password */ int pw_uid; /* numerical user ID */ int pw_gid; /* numerical group ID */ int pw_quota; /* unused */ char *pw_comment; /* unused */ char *pw_gecos; /* user's real name, office, extension, home phone */ char *pw_dir; /* initial working directory */ char *pw_shell; /* program to use as Shell */ }; Member Type Member Name Description char * pw_name Login name. uid_t pw_uid Numerical user ID. gid_t pw_gid Numerical group ID. char * pw_dir Pathname of home directory. char * pw_shell Initial user (shell) program. char * pw_passwd User password. (BSD only; not POSIX- compliant) The passwd structure may contain more implementation- specific members than those listed here;see passwd(5) for more information. The BSD routines setpwent, getpwent, endpwent, and setpwfile may be used to scan the user database sequentially. setpwent resets the current user password structure to the first in the database, getpwent reads and returns the next user password entry, and endpwent closes the user password database when processing is complete. In addition, setpwfile may be called to set the database to that given in file name, which is a file in passwd(5) format. Setpwfile doesn't close the previous password file; endpwent should be used before setpwfile. NOTES The value returned points to a static area; if the informa- tion is to be saved, it must be copied. RETURN VALUE A NULL pointer is returned on error or if the requested entry is not found. FILES /etc/passwd - if NetInfo is not running, or if YellowPages is enabled. SEE ALSO getlogin(3), getgrent(3), lookupd(8), netinfo(5), passwd(5) =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- GETHOSTNAME(2) UNIX Programmer's Manual GETHOSTNAME(2) NAME gethostname, sethostname - get/set name of current host SYNOPSIS gethostname(name, namelen) char *name; int namelen; sethostname(name, namelen) char *name; int namelen; DESCRIPTION Gethostname returns the standard host name for the current processor, as previously set by sethostname. The parameter namelen specifies the size of the name array. The returned name is null-terminated unless insufficient space is pro- vided. Sethostname sets the name of the host machine to be name, which has length namelen. This call is restricted to the super-user and is normally used only when the system is bootstrapped. RETURN VALUE If the call succeeds a value of 0 is returned. If the call fails, then a value of -1 is returned and an error code is placed in the global location errno. ERRORS The following errors may be returned by these calls: [EFAULT] The name or namelen parameter gave an invalid address. [EPERM] The caller tried to set the hostname and was not the super-user. SEE ALSO gethostid(2) BUGS Host names are limited to MAXHOSTNAMELEN (from ) characters, currently 256. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-