| 1 |
/* |
| 2 |
Copyright (C) 2014-2026 Free Software Foundation, Inc. |
| 3 |
|
| 4 |
This file is part of GNU Inetutils. |
| 5 |
|
| 6 |
GNU Inetutils is free software: you can redistribute it and/or modify |
| 7 |
it under the terms of the GNU General Public License as published by |
| 8 |
the Free Software Foundation, either version 3 of the License, or (at |
| 9 |
your option) any later version. |
| 10 |
|
| 11 |
GNU Inetutils is distributed in the hope that it will be useful, but |
| 12 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
General Public License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License |
| 17 |
along with this program. If not, see `http://www.gnu.org/licenses/'. */ |
| 18 |
|
| 19 |
#ifdef KRB5 |
| 20 |
# include <sys/socket.h> |
| 21 |
# include <netinet/in.h> |
| 22 |
|
| 23 |
# ifdef HAVE_KRB5_h |
| 24 |
# include <krb5.h> |
| 25 |
# endif |
| 26 |
|
| 27 |
# define SERVICE "host" |
| 28 |
|
| 29 |
extern int kerberos_auth (krb5_context * ctx, int verbose, char **cname, |
| 30 |
const char *sname, int sock, char *cmd, |
| 31 |
unsigned short port, krb5_keyblock ** key, |
| 32 |
const char *realm); |
| 33 |
|
| 34 |
extern int get_auth (int infd, krb5_context * ctx, krb5_auth_context * actx, |
| 35 |
krb5_keyblock ** key, const char **err_msg, |
| 36 |
int *protoversion, int *cksumtype, char **cksum, |
| 37 |
size_t *cksumlen, char *srvname); |
| 38 |
|
| 39 |
extern int kcmd (krb5_context * ctx, int *sock, char **ahost, |
| 40 |
unsigned short rport, char *locuser, char **remuser, |
| 41 |
char *cmd, int *fd2p, char *service, const char *realm, |
| 42 |
krb5_keyblock ** key, struct sockaddr_in *laddr, |
| 43 |
struct sockaddr_in *raddr, long opts); |
| 44 |
|
| 45 |
extern int krcmd (krb5_context * ctx, char **ahost, unsigned short rport, |
| 46 |
char **remuser, char *cmd, int *fd2p, const char *realm); |
| 47 |
|
| 48 |
extern int krcmd_mutual (krb5_context * ctx, char **ahost, |
| 49 |
unsigned short rport, char **remuser, |
| 50 |
char *cmd, int *fd2p, const char *realm, |
| 51 |
krb5_keyblock ** key); |
| 52 |
|
| 53 |
#endif /* KRB5 */ |