_PATH_PASSWD "/etc/passwd"
Description
Defines to "//etc//passwd"
_PATH_MASTERPASSWD "/etc/master.passwd"
Description
Defines to "//etc//master.passwd"
_MASTERPASSWD "master.passwd"
Description
"master.passwd"
_PATH_MP_DB "/etc/pwd.db"
Description
Defines to "//etc//pwd.db"
_PATH_SMP_DB "/etc/spwd.db"
Description
Defines to "//etc//spwd.db"
_PATH_PWD_MKDB "/usr/sbin/pwd_mkdb"
Description
Defines to "//usr//sbin//pwd_mkdb"
_PASSWORD_LEN 128
Description
max length, not counting NULL
Interface status: |
externallyDefinedApi |
|
typedef __time_t time_t;
Description
Used for time in seconds.
Interface status: |
externallyDefinedApi |
|
IMPORT_C struct passwd* getpwnam(const char *);
Description
Parameters
Return value
See also:
Interface status: |
externallyDefinedApi |
|
IMPORT_C struct passwd* getpwuid(uid_t);
Description
Parameters
Return value
See also:
Interface status: |
externallyDefinedApi |
|
IMPORT_C void endpwent(void);
Description
Refer to getpwent(void)
getpwent(void)
for the documentation
See also:
Interface status: |
externallyDefinedApi |
|
IMPORT_C struct passwd* getpwent(void);
Description
Note: This description also covers the following functions - getpwnam(const char *)
getpwnam(const char *)
getpwnam_r(const char *,struct passwd *,char *,size_t,struct passwd **)
getpwnam_r(const char *,struct passwd *,char *,size_t,struct passwd **)
getpwuid(uid_t)
getpwuid(uid_t)
getpwuid_r(uid_t,struct passwd *,char *,size_t,struct passwd **)
getpwuid_r(uid_t,struct passwd *,char *,size_t,struct passwd **)
setpwent(void)
setpwent(void)
endpwent(void)
endpwent(void)
These APIs belongs to set which are only build supported and not available functionally. The reason why only build support
is extended to these APIs is that Symbian operating system does not support the creation of multiple users and groups in its
environment. Moreover it may not make sense to have multiple users and groups in the context of a mobile environment. We refer
to the structure
#include <pwd.h>
struct passwd {
char *pw_name; /* user name */
char *pw_passwd; /* encrypted password */
uid_t pw_uid; /* user uid */
gid_t pw_gid; /* user gid */
time_t pw_change; /* password change time */
char *pw_class; /* user access class */
char *pw_gecos; /* Honeywell login info */
char *pw_dir; /* home directory */
char *pw_shell; /* default shell */
time_t pw_expire; /* account expiration */
int pw_fields; /* internal: fields filled in */
};
The functions getpwnam and getpwuid returns the default values for a single user system i.e., pw_name,pw_passwd,pw_uid and
pw_gid set to root,NULL,0 and 0 respectively in case the input parameter uid/login is 0/ root else the error number is set
and NULL is returned by the APIs.
The getpwent when called the first time by an application returns the pointer to a valid passwd structure,that of the simulated
single-user group.Subsequent calls return NULL until setpwent is called
The functions getpwnam_r, and getpwuid_r are thread-safe versions of getpwnam, and getpwuid, respectively. The caller must
provide storage for the results of the search in the pwd, buffer, bufsize, and result arguments. When these functions are
successful, the pwd argument will be filled-in, and a pointer to that argument will be stored in result. If an entry is not
found or an error occurs, result will be set to NULL.
The setpwent function sets the library such that subsequent getpwent call returns a filled passwd structure.
endpwent function sets up the library such that the subsequent getpwent call returns NULL.
Bugs:
The functions getpwent, getpwnam, and getpwuid, leave their results in an internal static object and return a pointer to that
object. Subsequent calls to the same function will modify the same object. The functions getpwent, endpwent, and setpwent
are fairly useless in a networked environment and should be avoided, if possible.
Return value
struct passwd passwd * |
The functions getpwent, getpwnam, and getpwuid return a valid pointer to a passwd structure on success or NULL if the entry
is not found or if an error occurs. If an error does occur, errno will be set. The functions getpwnam_r, and getpwuid_r return
0 if no error occurred, or an error number to indicate failure. It is not an error if a matching entry is not found. (Thus,
if result is NULL and the return value is 0, no matching entry exists.) The endpwent and setpwent functions have no return
value.
|
|
See also:
Interface status: |
externallyDefinedApi |
|
IMPORT_C void setpwent(void);
Description
Refer to getpwent(void)
getpwent(void)
for the documentation
See also:
Interface status: |
externallyDefinedApi |
|
IMPORT_C int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **);
Description
Parameters
Return value
See also:
Interface status: |
externallyDefinedApi |
|
IMPORT_C int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **);
Description
Parameters
Return value
See also: