64 lines
1.9 KiB
Diff
64 lines
1.9 KiB
Diff
diff -urp audit-3.0.orig/audisp/plugins/remote/audisp-remote.c audit-3.0/audisp/plugins/remote/audisp-remote.c
|
|
--- audit-3.0.orig/audisp/plugins/remote/audisp-remote.c 2019-06-07 17:08:36.000000000 -0400
|
|
+++ audit-3.0/audisp/plugins/remote/audisp-remote.c 2019-07-13 11:37:45.000000000 -0400
|
|
@@ -1,5 +1,5 @@
|
|
/* audisp-remote.c --
|
|
- * Copyright 2008-2012,2016,2018 Red Hat Inc., Durham, North Carolina.
|
|
+ * Copyright 2008-2012,2016,2018,2019 Red Hat Inc., Durham, North Carolina.
|
|
* All Rights Reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
@@ -98,7 +98,7 @@ static int ar_write (int, const void *,
|
|
credentials. These are the ones we talk to the server with. */
|
|
gss_ctx_id_t my_context;
|
|
|
|
-#define KEYTAB_NAME "/etc/audisp/audisp-remote.key"
|
|
+#define KEYTAB_NAME "/etc/audit/audisp-remote.key"
|
|
#define CCACHE_NAME "MEMORY:audisp-remote"
|
|
|
|
#define REQ_FLAGS GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG | GSS_C_INTEG_FLAG | GSS_C_CONF_FLAG
|
|
@@ -978,7 +989,14 @@ static int negotiate_credentials (void)
|
|
|
|
static int stop_sock(void)
|
|
{
|
|
+
|
|
if (sock >= 0) {
|
|
+ if (USE_GSS) {
|
|
+ OM_uint32 minor_status;
|
|
+ gss_delete_sec_context(&minor_status, &my_context,
|
|
+ GSS_C_NO_BUFFER);
|
|
+ my_context = GSS_C_NO_CONTEXT;
|
|
+ }
|
|
shutdown(sock, SHUT_RDWR);
|
|
close(sock);
|
|
}
|
|
@@ -995,11 +1013,8 @@ static int stop_transport(void)
|
|
switch (config.transport)
|
|
{
|
|
case T_TCP:
|
|
- rc = stop_sock();
|
|
- break;
|
|
case T_KRB5:
|
|
- // FIXME: shutdown kerberos
|
|
- rc = -1;
|
|
+ rc = stop_sock();
|
|
break;
|
|
default:
|
|
rc = -1;
|
|
@@ -1142,6 +1157,7 @@ static int init_transport(void)
|
|
switch (config.transport)
|
|
{
|
|
case T_TCP:
|
|
+ case T_KRB5:
|
|
rc = init_sock();
|
|
// We set this so that it will retry the connection
|
|
if (rc == ET_TEMPORARY)
|
|
@@ -1589,6 +1605,7 @@ static int relay_event(const char *s, si
|
|
switch (config.transport)
|
|
{
|
|
case T_TCP:
|
|
+ case T_KRB5:
|
|
rc = relay_sock(s, len);
|
|
break;
|
|
default:
|