Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 278931 Details for
Bug 244350
TTY input audit support
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
The patch submitted upstream
readline-5.2.patch (text/plain), 2.63 KB, created by
Miloslav Trmač
on 2007-12-06 00:04:15 UTC
(
hide
)
Description:
The patch submitted upstream
Filename:
MIME Type:
Creator:
Miloslav Trmač
Created:
2007-12-06 00:04:15 UTC
Size:
2.63 KB
patch
obsolete
>diff -urN --exclude build readline/config.h.in readline-5.2/config.h.in >--- readline/config.h.in 2006-09-12 22:02:00.000000000 +0200 >+++ readline-5.2/config.h.in 2007-12-06 00:51:01.000000000 +0100 >@@ -23,6 +23,9 @@ > > #undef __CHAR_UNSIGNED__ > >+/* Define if you have <linux/audit.h> and it defines AUDIT_USER_TTY */ >+#undef HAVE_DECL_AUDIT_USER_TTY >+ > /* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */ > #undef STAT_MACROS_BROKEN > >diff -urN --exclude build readline/configure.in readline-5.2/configure.in >--- readline/configure.in 2006-09-28 18:04:24.000000000 +0200 >+++ readline-5.2/configure.in 2007-12-06 00:46:27.000000000 +0100 >@@ -158,6 +158,8 @@ > #endif > ]]) > >+AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include <linux/audit.h>]]) >+ > BASH_SYS_SIGNAL_VINTAGE > BASH_SYS_REINSTALL_SIGHANDLERS > >diff -urN --exclude build readline/readline.c readline-5.2/readline.c >--- readline/readline.c 2006-08-16 21:00:36.000000000 +0200 >+++ readline-5.2/readline.c 2007-12-06 00:51:15.000000000 +0100 >@@ -55,6 +55,12 @@ > extern int errno; > #endif /* !errno */ > >+#if defined (HAVE_DECL_AUDIT_USER_TTY) >+# include <sys/socket.h> >+# include <linux/audit.h> >+# include <linux/netlink.h> >+#endif >+ > /* System-specific feature definitions and include files. */ > #include "rldefs.h" > #include "rlmbutil.h" >@@ -292,7 +298,47 @@ > rl_visible_prompt_length = rl_expand_prompt (rl_prompt); > return 0; > } >- >+ >+#if defined (HAVE_DECL_AUDIT_USER_TTY) >+/* Report STRING to the audit system. */ >+static void >+audit_tty (char *string) >+{ >+ struct sockaddr_nl addr; >+ struct msghdr msg; >+ struct nlmsghdr nlm; >+ struct iovec iov[2]; >+ size_t size; >+ int fd; >+ >+ size = strlen (string) + 1; >+ fd = socket (AF_NETLINK, SOCK_RAW, NETLINK_AUDIT); >+ if (fd < 0) >+ return; >+ nlm.nlmsg_len = NLMSG_LENGTH (size); >+ nlm.nlmsg_type = AUDIT_USER_TTY; >+ nlm.nlmsg_flags = NLM_F_REQUEST; >+ nlm.nlmsg_seq = 0; >+ nlm.nlmsg_pid = 0; >+ iov[0].iov_base = &nlm; >+ iov[0].iov_len = sizeof (nlm); >+ iov[1].iov_base = string; >+ iov[1].iov_len = size; >+ addr.nl_family = AF_NETLINK; >+ addr.nl_pid = 0; >+ addr.nl_groups = 0; >+ msg.msg_name = &addr; >+ msg.msg_namelen = sizeof (addr); >+ msg.msg_iov = iov; >+ msg.msg_iovlen = 2; >+ msg.msg_control = NULL; >+ msg.msg_controllen = 0; >+ msg.msg_flags = 0; >+ (void)sendmsg (fd, &msg, 0); >+ close (fd); >+} >+#endif >+ > /* Read a line of input. Prompt with PROMPT. An empty PROMPT means > none. A return value of NULL means that EOF was encountered. */ > char * >@@ -326,6 +372,11 @@ > rl_clear_signals (); > #endif > >+#if defined (HAVE_DECL_AUDIT_USER_TTY) >+ if (value != NULL) >+ audit_tty (value); >+#endif >+ > return (value); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 244350
:
157073
| 278931