patch-include_rpcsecgss_rpc_auth_h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. --- librpcsecgss-0.19.orig/include/rpcsecgss/rpc/auth.h 2009-07-29 18:24:50.000000000 +0200
  2. +++ librpcsecgss-0.19/include/rpcsecgss/rpc/auth.h 2014-05-19 15:33:04.338267038 +0200
  3. @@ -44,7 +44,6 @@
  4. #ifndef _RPC_AUTH_H
  5. #define _RPC_AUTH_H
  6. -#include <sys/cdefs.h>
  7. #define MAX_AUTH_BYTES 400
  8. #define MAXNETNAMELEN 255 /* maximum length of network user's name */
  9. @@ -84,9 +83,13 @@ union des_block {
  10. char c[8];
  11. };
  12. typedef union des_block des_block;
  13. -__BEGIN_DECLS
  14. -extern bool_t xdr_des_block __P((XDR *, des_block *));
  15. -__END_DECLS
  16. +#ifdef __cplusplus
  17. +extern "C" {
  18. +#endif
  19. +extern bool_t xdr_des_block (XDR *, des_block *);
  20. +#ifdef __cplusplus
  21. +}
  22. +#endif
  23. /*
  24. * Authentication info. Opaque to client.
  25. @@ -106,24 +109,24 @@ typedef struct __rpc_auth {
  26. struct opaque_auth ah_verf;
  27. union des_block ah_key;
  28. struct auth_ops {
  29. - void (*ah_nextverf) __P((struct __rpc_auth *));
  30. + void (*ah_nextverf) (struct __rpc_auth *);
  31. /* nextverf & serialize */
  32. - int (*ah_marshal) __P((struct __rpc_auth *, XDR *));
  33. + int (*ah_marshal) (struct __rpc_auth *, XDR *);
  34. /* validate verifier */
  35. - int (*ah_validate) __P((struct __rpc_auth *,
  36. - struct opaque_auth *));
  37. + int (*ah_validate) (struct __rpc_auth *,
  38. + struct opaque_auth *);
  39. /* refresh credentials */
  40. - int (*ah_refresh) __P((struct __rpc_auth *));
  41. + int (*ah_refresh) (struct __rpc_auth *);
  42. /* destroy this structure */
  43. - void (*ah_destroy) __P((struct __rpc_auth *));
  44. + void (*ah_destroy) (struct __rpc_auth *);
  45. /* prepare to refresh credentials by destroying gss context */
  46. - void (*ah_prep_refresh) __P((struct __rpc_auth *));
  47. + void (*ah_prep_refresh) (struct __rpc_auth *);
  48. /* returns number of retries remaining for this rpc session */
  49. - int (*ah_get_retries) __P((struct __rpc_auth *));
  50. + int (*ah_get_retries) (struct __rpc_auth *);
  51. /* encode data for wire */
  52. - int (*ah_wrap) __P((struct __rpc_auth *, XDR *, xdrproc_t, caddr_t));
  53. + int (*ah_wrap) (struct __rpc_auth *, XDR *, xdrproc_t, caddr_t);
  54. /* decode data for wire */
  55. - int (*ah_unwrap) __P((struct __rpc_auth *, XDR *, xdrproc_t, caddr_t));
  56. + int (*ah_unwrap) (struct __rpc_auth *, XDR *, xdrproc_t, caddr_t);
  57. } *ah_ops;
  58. caddr_t ah_private;
  59. @@ -210,15 +213,19 @@ int authany_unwrap(struct __rpc_auth *,
  60. * int len;
  61. * int *aup_gids;
  62. */
  63. -__BEGIN_DECLS
  64. +#ifdef __cplusplus
  65. +extern "C" {
  66. +#endif
  67. struct sockaddr_in;
  68. -extern AUTH *authunix_create __P((char *, int, int, int, int *));
  69. -extern AUTH *authunix_create_default __P((void));
  70. -extern AUTH *authnone_create __P((void));
  71. -extern AUTH *authdes_create __P((char *, u_int,
  72. - struct sockaddr_in *, des_block *));
  73. -extern bool_t xdr_opaque_auth __P((XDR *, struct opaque_auth *));
  74. -__END_DECLS
  75. +extern AUTH *authunix_create (char *, int, int, int, int *);
  76. +extern AUTH *authunix_create_default (void);
  77. +extern AUTH *authnone_create (void);
  78. +extern AUTH *authdes_create (char *, u_int,
  79. + struct sockaddr_in *, des_block *);
  80. +extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *);
  81. +#ifdef __cplusplus
  82. +}
  83. +#endif
  84. #define AUTH_NONE 0 /* no authentication */
  85. #define AUTH_NULL 0 /* backward compatibility */