00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _WINBIND_NSS_HPUX_H
00024 #define _WINBIND_NSS_HPUX_H
00025
00026 #include <nsswitch.h>
00027
00028 #define NSS_STATUS_SUCCESS NSS_SUCCESS
00029 #define NSS_STATUS_NOTFOUND NSS_NOTFOUND
00030 #define NSS_STATUS_UNAVAIL NSS_UNAVAIL
00031 #define NSS_STATUS_TRYAGAIN NSS_TRYAGAIN
00032
00033 #ifdef HAVE_SYNCH_H
00034 #include <synch.h>
00035 #endif
00036 #ifdef HAVE_PTHREAD_H
00037 #include <pthread.h>
00038 #endif
00039
00040 typedef enum {
00041 NSS_SUCCESS,
00042 NSS_NOTFOUND,
00043 NSS_UNAVAIL,
00044 NSS_TRYAGAIN
00045 } nss_status_t;
00046
00047 typedef nss_status_t NSS_STATUS;
00048
00049 struct nss_backend;
00050
00051 typedef nss_status_t (*nss_backend_op_t)(struct nss_backend *, void *args);
00052
00053 struct nss_backend {
00054 nss_backend_op_t *ops;
00055 int n_ops;
00056 };
00057 typedef struct nss_backend nss_backend_t;
00058 typedef int nss_dbop_t;
00059
00060 #include <errno.h>
00061 #include <netdb.h>
00062 #include <limits.h>
00063
00064 #ifndef NSS_INCLUDE_UNSAFE
00065 #define NSS_INCLUDE_UNSAFE 1
00066 #endif
00067
00068 enum nss_netgr_argn {
00069 NSS_NETGR_MACHINE,
00070 NSS_NETGR_USER,
00071 NSS_NETGR_DOMAIN,
00072 NSS_NETGR_N
00073 };
00074
00075 enum nss_netgr_status {
00076 NSS_NETGR_FOUND,
00077 NSS_NETGR_NO,
00078 NSS_NETGR_NOMEM
00079 };
00080
00081 typedef unsigned nss_innetgr_argc;
00082 typedef char **nss_innetgr_argv;
00083
00084 struct nss_innetgr_1arg {
00085 nss_innetgr_argc argc;
00086 nss_innetgr_argv argv;
00087 };
00088
00089 typedef struct {
00090 void *result;
00091 char *buffer;
00092 int buflen;
00093 } nss_XbyY_buf_t;
00094
00095 extern nss_XbyY_buf_t *_nss_XbyY_buf_alloc(int struct_size, int buffer_size);
00096 extern void _nss_XbyY_buf_free(nss_XbyY_buf_t *);
00097
00098 union nss_XbyY_key {
00099 uid_t uid;
00100 gid_t gid;
00101 const char *name;
00102 int number;
00103 struct {
00104 long net;
00105 int type;
00106 } netaddr;
00107 struct {
00108 const char *addr;
00109 int len;
00110 int type;
00111 } hostaddr;
00112 struct {
00113 union {
00114 const char *name;
00115 int port;
00116 } serv;
00117 const char *proto;
00118 } serv;
00119 void *ether;
00120 };
00121
00122 typedef struct nss_XbyY_args {
00123 nss_XbyY_buf_t buf;
00124 int stayopen;
00125
00126
00127
00128
00129
00130 int (*str2ent)(const char *instr, int instr_len, void *ent, char *buffer, int buflen);
00131 union nss_XbyY_key key;
00132
00133 void *returnval;
00134 int erange;
00135 int h_errno;
00136 nss_status_t status;
00137 } nss_XbyY_args_t;
00138
00139 #endif