Commit | Line | Data |
---|---|---|
805e021f CE |
1 | /* |
2 | * Copyright 2000, International Business Machines Corporation and others. | |
3 | * All Rights Reserved. | |
4 | * | |
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 | |
8 | */ | |
9 | ||
10 | #include <afsconfig.h> | |
11 | #include <afs/param.h> | |
12 | ||
13 | ||
14 | #if defined(AFS_AIX41_ENV) && !defined(AFS_AIX51_ENV) | |
15 | #include <sys/types.h> | |
16 | #include <sys/param.h> | |
17 | #include <stdio.h> | |
18 | #include <locale.h> | |
19 | #include <nl_types.h> | |
20 | #include <pwd.h> | |
21 | #include <netdb.h> | |
22 | #include <sys/socket.h> | |
23 | #include <sys/file.h> | |
24 | #include <errno.h> | |
25 | #include <usersec.h> | |
26 | ||
27 | #include <afs/kauth.h> | |
28 | #include <afs/kautils.h> | |
29 | ||
30 | #include "aix_auth_prototypes.h" | |
31 | ||
32 | int | |
33 | afs_initialize(struct secmethod_table *meths) | |
34 | { | |
35 | /* | |
36 | * Initialize kauth package here so we don't have to call it | |
37 | * each time we call the authenticate routine. | |
38 | */ | |
39 | ka_Init(0); | |
40 | memset(meths, 0, sizeof(struct secmethod_table)); | |
41 | /* | |
42 | * Initialize the exported interface routines. Except the authenticate one | |
43 | * the others are currently mainly noops. | |
44 | */ | |
45 | meths->method_chpass = afs_chpass; | |
46 | meths->method_authenticate = afs_authenticate; | |
47 | meths->method_passwdexpired = afs_passwdexpired; | |
48 | meths->method_passwdrestrictions = afs_passwdrestrictions; | |
49 | ||
50 | /* | |
51 | * These we need to bring in because, for afs users, /etc/security/user's | |
52 | * "registry" must non-local (i.e. DCE) since otherwise it assumes it's a | |
53 | * local domain and uses valid_crypt(passwd) to validate the afs passwd | |
54 | * which, of course, will fail. NULL return from these routine simply | |
55 | * means use the local version ones after all. | |
56 | */ | |
57 | meths->method_getgrgid = afs_getgrgid; | |
58 | meths->method_getgrset = afs_getgrset; | |
59 | meths->method_getgrnam = afs_getgrnam; | |
60 | meths->method_getpwnam = afs_getpwnam; | |
61 | meths->method_getpwuid = afs_getpwuid; | |
62 | return (0); | |
63 | } | |
64 | ||
65 | #endif /* AFS_AIX41_ENV && !AFS_AIX51_ENV */ |