posixlogin

Logs the specified user in to the system.

Library:LibC
Classification:Novell
Service:File and Directory I/O

Syntax

  #include <pwd.h> 
   
  int posixlogin (
     char   *user,
     char   *password );
  

Parameters

user

(IN) Points to a user name.

password

(IN) Points to the user's password.

Return Values

If successful, returns 0. Otherwise, returns -1 and sets errno to one of the following:

Decimal

Constant

Description

1

ENOENT

A current working directory was not been established.

5

ENOMEM

Unable to allocate memory for the task.

6

EACCESS

Insufficient rights to the directory.

9

EINVAL

The current working directory is invalid.

21

ERESOURCE

The NICI infrastructure is missing.

24

EAGAIN

Insufficient resources to complete the task.

65

ENAMETOOLONG

A name element is too long.

105

ENOCONTEXT

The calling thread has no context.

108

ENAMEINVAL

The user parameter is missing.

Remarks

The posixlogin function creates the necessary resources to create an identity for the specified user and to embed that identity in the current working directory.

See Also