2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afsconfig.h>
11 #include <afs/param.h>
14 #if defined(AFS_AIX41_ENV)
15 #include <sys/types.h>
16 #include <sys/param.h>
22 #include <sys/socket.h>
27 #include <afs/kauth.h>
28 #include <afs/kautils.h>
30 #include "aix_auth_prototypes.h"
33 afs_authenticate(char *userName
, char *response
, int *reenter
, char **message
)
35 char *reason
, *pword
, prompt
[256];
37 int code
, unixauthneeded
, password_expires
= -1;
44 sprintf(prompt
, "Enter AFS password for %s: ", userName
);
45 pword
= getpass(prompt
);
46 if (strlen(pword
) == 0) {
48 ("Unable to read password because zero length passord is illegal\n");
49 *message
= malloc(256);
51 "Unable to read password because zero length passord is illegal\n");
56 if ((pwd
= getpwnam(userName
)) == NULL
) {
57 *message
= malloc(256);
58 sprintf(*message
, "getpwnam for user failed\n");
63 ka_UserAuthenticateGeneral(KA_USERAUTH_VERSION
+ KA_USERAUTH_DOSETPAG
,
64 userName
, (char *)0, (char *)0, pword
, 0,
65 &password_expires
, 0, &reason
)) {
68 *message
= malloc(1024);
69 sprintf(*message
, "Unable to authenticate to AFS because %s.\n",
73 aix_ktc_setup_ticket_file(userName
);
78 afs_chpass(char *userName
, char *oldPasswd
, char *newPasswd
, char **message
)
84 afs_passwdexpired(char *userName
, char **message
)
90 afs_passwdrestrictions(char *userName
, char *newPasswd
, char *oldPasswd
,
97 afs_getpasswd(char * userName
)
103 #endif /* AFS_AIX41_ENV */