X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fatalk%2Fuam.h;h=e161b6859c1771c89288382b623b956808c09799;hb=ecfc96169ab669b578e53fa8e13592934fe37788;hp=49e6a6f1298bf9df3dcbc1ab08b774686c8b2f41;hpb=e981ef3742f42adc4cb7d2b71f95bee8ca6b201c;p=netatalk.git diff --git a/include/atalk/uam.h b/include/atalk/uam.h index 49e6a6f1..e161b685 100644 --- a/include/atalk/uam.h +++ b/include/atalk/uam.h @@ -9,6 +9,11 @@ #include #include +#ifdef TRU64 +#include +#include +#endif /* TRU64 */ + /* just a label for exported bits */ #define UAM_MODULE_EXPORT @@ -23,6 +28,7 @@ #define UAM_SERVER_LOGIN (1 << 0) #define UAM_SERVER_CHANGEPW (1 << 1) #define UAM_SERVER_PRINTAUTH (1 << 2) +#define UAM_SERVER_LOGIN_EXT (1 << 3) /* options */ #define UAM_OPTION_USERNAME (1 << 0) /* get space for username */ @@ -33,6 +39,13 @@ #define UAM_OPTION_HOSTNAME (1 << 5) /* get host name */ #define UAM_OPTION_COOKIE (1 << 6) /* cookie handle */ #define UAM_OPTION_PROTOCOL (1 << 7) /* DSI or ASP */ +#define UAM_OPTION_CLIENTNAME (1 << 8) /* get client IP address */ +#define UAM_OPTION_KRB5SERVICE (1 << 9) /* service name for krb5 principal */ +#define UAM_OPTION_MACCHARSET (1 << 10) /* mac charset handle */ +#define UAM_OPTION_UNIXCHARSET (1 << 11) /* unix charset handle */ +#define UAM_OPTION_SESSIONINFO (1 << 12) /* unix charset handle */ +#define UAM_OPTION_KRB5REALM (1 << 13) /* krb realm */ +#define UAM_OPTION_FQDN (1 << 14) /* fully qualified name */ /* some password options. you pass these in the length parameter and * get back the corresponding option. not all of these are implemented. */ @@ -41,6 +54,9 @@ #define UAM_PASSWD_MAXFAIL (1 << 2) /* not implemented yet. */ #define UAM_PASSWD_EXPIRETIME (1 << 3) /* not implemented yet. */ +/* max lenght of username */ +#define UAM_USERNAMELEN 255 + /* i'm doing things this way because os x server's dynamic linker * support is braindead. it also allows me to do a little versioning. */ struct uam_export { @@ -49,24 +65,42 @@ struct uam_export { void (*uam_cleanup)(void); }; +#define SESSIONKEY_LEN 64 +#define SESSIONTOKEN_LEN 8 + +struct session_info { + void *sessionkey; /* random session key */ + size_t sessionkey_len; + void *cryptedkey; /* kerberos/gssapi crypted key */ + size_t cryptedkey_len; + void *sessiontoken; /* session token sent to the client on FPGetSessionToken*/ + size_t sessiontoken_len; +}; + /* register and unregister uams with these functions */ extern int uam_register __P((const int, const char *, const char *, ...)); extern void uam_unregister __P((const int, const char *)); /* helper functions */ -extern struct passwd *uam_getname __P((char *, const int)); +extern struct passwd *uam_getname __P((void*, char *, const int)); extern int uam_checkuser __P((const struct passwd *)); /* afp helper functions */ extern int uam_afp_read __P((void *, char *, int *, int (*)(void *, void *, const int))); extern int uam_afpserver_option __P((void *, const int, void *, int *)); +#ifdef TRU64 +extern void uam_afp_getcmdline __P((int *, char ***)); +extern int uam_sia_validate_user __P((sia_collect_func_t *, int, char **, + char *, char *, char *, int, char *, + char *)); +#endif /* TRU64 */ /* switch.c */ #define UAM_AFPSERVER_PREAUTH (0) #define UAM_AFPSERVER_POSTAUTH (1 << 0) extern int uam_afpserver_action __P((const int /*id*/, const int /*switch*/, - int (**)(), int (**)())); + int (*)(), int (**)())); #endif