Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtlogin / solaris.h
1 /* $XConsortium: solaris.h /main/7 1996/10/30 11:12:37 drk $ */
2 /*******************************************************************************
3 **
4 **  solaris.h 1.9 95/09/10 
5 **
6 **  Copyright 1993, 1994, 1995 Sun Microsystems, Inc.  All rights reserved.
7 **
8 **  This file contains header info specific to Sun Solaris login
9 *******************************************************************************/
10 /*                                                                      *
11  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
12  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
13  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
14  * (c) Copyright 1993, 1994 Novell, Inc.                                *
15  */
16 /*******************************************************************************
17 **
18 **  RESTRICTED CONFIDENTIAL INFORMATION:
19 **
20 **  The information in this document is subject to special
21 **  restrictions in a confidential disclosure agreement between
22 **  HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
23 **  document outside HP, IBM, Sun, USL, SCO, or Univel without
24 **  Sun's specific written approval.  This document and all copies
25 **  and derivative works thereof must be returned or destroyed at
26 **  Sun's request.
27 **
28 **  Copyright 1994 Sun Microsystems, Inc.  All rights reserved.
29 **
30 *******************************************************************************/
31
32
33 #ifndef _DTLOGIN_SOLARIS_H
34 #define _DTLOGIN_SOLARIS_H
35
36 #include <sys/types.h>
37
38 #ifdef PAM
39 #include    <security/pam_appl.h>
40 #define SOLARIS_SUCCESS PAM_SUCCESS
41 #endif
42
43 #ifdef SUNAUTH
44 #include    <security/ia_appl.h>
45 #define SOALRIS_SUCCESS IA_SUCCESS
46 #endif
47
48
49 /* Solaris utmp mgt flags */
50
51 #define SOLARIS_UPDATE_ENTRY    1       /* Update an existing entry */
52 #define SOLARIS_NOLOG           2       /* Don't log the new session */
53 #define SOLARIS_LOGIN           4       /* login type entry (sigh...) */
54  
55 /* Errors returned by solaris_setutmp_mgmt/solaris_reset_utmp_mgmt() */
56 #define SOLARIS_NOENTRY         27      /* No entry found */
57 #define SOLARIS_ENTRYFAIL       28      /* Couldn't edit the entry */
58
59 /* user credential UID/GID erros */ 
60 #define SOLARIS_BAD_GID         29      /* Invalid Group ID */
61 #define SOLARIS_INITGROUP_FAIL  30      /* group IDs init failed */
62 #define SOLARIS_BAD_UID         31      /* Invaid User ID */
63 #define SOLARIS_SETGROUP_FAIL   32      /* Set of group IDs failed */
64
65 /*
66  *      External procedure declarations
67  */
68
69
70 extern int solaris_authentication(char*, char*, char*, char*, char*);
71 extern int solaris_accounting(char*, char*, char[], char*, 
72                               char*, pid_t, int, int);
73 extern int solaris_setcred(char*, char *, uid_t, gid_t);
74 extern int solaris_setdevperm(char *, uid_t, gid_t);
75 extern int solaris_resetdevperm(char *);
76
77 extern int audit_login_save_host(char *host);
78 extern int audit_login_save_ttyn(char *ttyn);
79 extern int audit_login_save_port(void);
80 extern int audit_login_success(void);
81 extern int audit_login_save_pw(struct passwd *pwd);
82 extern int audit_login_bad_pw(void);
83 extern int audit_login_maxtrys(void);
84
85
86 #endif /* _DTLOGIN_SOLARIS_H */