|
Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!
Kernel Functions for Drivers ddi_cred(9F)
NAME
ddi_cred, crgetuid, crgetruid, crgetsuid, crgetgid,
crgetrgid, crgetsgid, crgetzoneid, crgetgroups, crgetngroups
- access and change parts of the cred_t structure
SYNOPSIS
#include <sys/cred.h>
uid_t crgetuid(const cred_t *cr);
uid_t crgetruid(const cred_t *cr);
uid_t crgetsuid(const cred_t *cr);
gid_t crgetgid(const cred_t *cr);
gid_t crgetrgid(const cred_t *cr);
gid_t crgetsgid(const cred_t *cr);
zoneid_t crgetzoneid(const cred_t *cr);
const gid_t *crgetgroups(const cred_t *cr);
int crgetngroups(const cred_t *cr);
int crsetresuid(cred_t *cr, uid_t ruid, uid_t euid, uid_t
suid);
int crsetresgid(cred_t *cr, gid_t rgid, gid_t egid, gid_t
sgid);
int crsetugid(cred_t *cr, uid_t uid, gid_t gid);
int crsetgroups(cred_t *cr, int ngroups, gid_t gids);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
cr
pointer to the user credential structure
uid, ruid, euid, suid
new user id, real, effective and saved user id
SunOS 5.10 Last change: 6 Aug 2003 1
Kernel Functions for Drivers ddi_cred(9F)
gid, rgid, egid, sgid
new group id, real, effective and saved group id
ngroups
number of groups in the group array
gids
pointer to array of new groups
DESCRIPTION
The user credential is a shared, read-only, ref-counted data
structure. Its actual size and layout are subject to change.
The functions described in this page allow the programmer to
retrieve fields from the structure and to initialize newly
allocated credential structures.
crgetuid(), crgetruid(), and crgetsuid() return, respec-
tively, the effective, real, and saved user id from the user
credential pointed to by cr.
crgetgid(), crgetrgid(), and crgetsgid() return, respec-
tively, the effective, real, and saved group id from the
user credential pointed to by cr.
crgetzoneid() returns the zone id from the user credential
pointed to by cr.
crgetgroups() returns the group list of the user credential
pointed to by cr.
crgetngroups() returns the number of groups in the user
credential pointed to by cr.
crsetresuid() sets the real, effective and saved user id.
All but one can be specified as -1, which causes the origi-
nal value not to change.
crsetresgid() sets the real, effective and saved group id.
All but one can be specified as -1, which causes the origi-
nal value not to change.
crsetugid() initializes the real, effective and saved user
id all to uid. It initializes the real, effective, and saved
SunOS 5.10 Last change: 6 Aug 2003 2
Kernel Functions for Drivers ddi_cred(9F)
group id all to gid.
crsetgroups() sets the number of groups in the user creden-
tial to ngroups and copies the groups from gids to the user
credential. If ngroups is 0, gids need not point to valid
storage.
It is an error to call this any of the crset*() functions on
a user credential structure that was newly allocated.
RETURN VALUES
The crget*() functions return the requested information.
The crset*id() functions return 0 on success and -1 if any
of the specified ids are invalid. The functions might cause
a system panic if called on a user credential structure that
is referenced by other parts of the system.
CONTEXT
These functions can be called from user and kernel contexts.
ATTRIBUTES
See attributes(5) for a description of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Architecture | All |
|_____________________________|_____________________________|
| Interface Stability | Evolving |
|_____________________________|_____________________________|
SEE ALSO
attributes(5), privileges(5), drv_priv(9F)
Writing Device Drivers
SunOS 5.10 Last change: 6 Aug 2003 3
Man(1) output converted with
man2html and wrapped by fishsponge
This page was generated on Wed Sep 12 11:28:24 GMT 2007
|
Your favourite pages:
No pages logged yet... Top 10 most popular pages:
prstat man page (24548 hits) (Solaris 10 11_06)
netcat man page (17695 hits) (Suse Linux 10.1)
ssh-socks5-proxy-connect man page (13536 hits) (Solaris 10 11_06)
signal man page (12551 hits) (Suse Linux 10.1)
startproc man page (11991 hits) (Suse Linux 10.1)
raidctl man page (11358 hits) (Solaris 10 11_06)
adv_cap_autoneg man page (10288 hits) (Solaris 10 11_06)
sqlite3 man page (9729 hits) (openSUSE 10.2)
CPAN man page (8947 hits) (Suse Linux 10.1)
BusyBox man page (7702 hits) (Suse Linux 10.1)
|