Thread View: comp.sys.next.sysadmin
3 messages
3 total messages
Started by Douglas Scott
Thu, 09 Apr 1992 17:09
Mach equivalent of cuserid() ??
Author: Douglas Scott
Date: Thu, 09 Apr 1992 17:09
Date: Thu, 09 Apr 1992 17:09
14 lines
951 bytes
951 bytes
Does the NeXT have an equivalent of the subroutine cuserid()? The Sun man page
describes it as follows:
cuserid() returns a pointer to a string representing the
login name under which the owner of the current process is
logged in.
Thanks!
--
Douglas Scott (805)893-8352
Center for Computer Music Research and Composition
University of California, Santa Barbara
Internet: (NeXTMail ok) <doug@foxtrot.ccmrc.ucsb.edu>
Re: Mach equivalent of cuserid() ??
Author: Patrick Robinson
Date: Thu, 09 Apr 1992 17:49
Date: Thu, 09 Apr 1992 17:49
9 lines
639 bytes
639 bytes
Douglas Scott writes > Does the NeXT have an equivalent of the subroutine cuserid()? Check out getpwent(3). You can use struct passwd *pw_ent = getpwuid(getuid()); and then check pw_ent->pw_name -Patrick Robinson pgr@ramandu.ext.vt.edu
Re: Mach equivalent of cuserid() ??
Author: Nik Gervae
Date: Fri, 10 Apr 1992 23:36
Date: Fri, 10 Apr 1992 23:36
38 lines
1601 bytes
1601 bytes
In article <4084@ucsbcsl.ucsb.edu> doug@foxtrot.ccmrc.ucsb.edu (Douglas Scott)
writes:
> Does the NeXT have an equivalent of the subroutine cuserid()? The Sun man
page
> describes it as follows:
>
> cuserid() returns a pointer to a string representing the
> login name under which the owner of the current process is
> logged in.
From NeXTstep reference, volume 2 (release 2 page 3-65):
NXHomeDirectory(), NXUserName()
SUMMARY
Get user's home directory and name
LIBRARY
libNeXT_s.a
SYNOPSIS
#import <appkit/Application.h>
const char *NXHomeDirectory(void)
const char *NXUserName(void)
DESCRIPTION
These functions return the user's home directory and name,
both of which are cached at launch time. If the user's id
has changed since launch time or since the last time either
of these functions was called, the values are recomputed
using the standard C library function getpwuid(). (getpwuid()
is described in its UNIX manual page.)
RETURN
NXHomeDirectory() returns a pointer to the full pathname of
the user's home directory. NXUserName() returns a pointer to
the user's name.
--
Nik Gervae
Software Publications
ngervae@next.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads